예제 #1
0
파일: link.cpp 프로젝트: svn2github/texmacs
void
unregister_pointer (string id, observer which) {
  // cout << "Unregister: " << id << " -> " << which << "\n";
  // cout << "Unregister: " << id << " -> " << obtain_tree (which) << "\n";
  list<observer>& l1= id_resolve (id);
  l1= remove (l1, which);
  if (is_nil (l1)) id_resolve->reset (id);
  list<string>& l2= pointer_resolve (which);
  l2= remove (l2, id);
  if (is_nil (l2)) pointer_resolve->reset (which);
}
예제 #2
0
void
persistent_reset (url dir, string key) {
  string v= local_prefix (dir) * key;
  persistent_init_key (dir, key);
  persistent_remove (dir, key, persistent_file [v], persistent_hash [v]);
  persistent_has (v)= false;
  persistent_cache->reset (v);
}
예제 #3
0
파일: web_files.cpp 프로젝트: xywei/texmacs
void
web_cache_invalidate (url name) {
    for (int i=0; i<MAX_CACHED; i++)
        if (web_cache[i] == name->t) {
            web_cache[i]= tree ("");
            web_cache_resolve->reset (name->t);
        }
}
예제 #4
0
파일: web_files.cpp 프로젝트: xywei/texmacs
static url
set_cache (url name, url tmp) {
    web_cache_resolve->reset (web_cache [web_nr]);
    web_cache [web_nr]= name->t;
    web_cache_resolve (name->t)= tmp->t;
    web_nr= (web_nr+1) % MAX_CACHED;
    return tmp;
}
예제 #5
0
파일: link.cpp 프로젝트: svn2github/texmacs
void
unregister_link (soft_link ln) {
  // cout << "Unregister: " << ln->t << "\n";
  int i, n= N(ln->t);
  if (is_atomic (ln->t[0])) {
    type_count (ln->t[0]->label) --;
    if (type_count (ln->t[0]->label) == 0)
      type_count->reset (ln->t[0]->label);
  }
  for (i=1; i<n; i++)
    unregister_vertex (ln->t[i], ln);
}
예제 #6
0
template <class T, class U> void
rel_hashmap_rep<T,U>::find_changes (hashmap<T,U>& CH) {
  int i;
  rel_hashmap<T,U> h (item, next);
  list<hashentry<T,U> > remove;
  for (i=0; i<CH->n; i++) {
    list<hashentry<T,U> > l (CH->a[i]);
    while (!is_nil (l)) {
      if (h [l->item.key] == l->item.im)
	remove= list<hashentry<T,U> > (l->item, remove);
      l=l->next;
    }
  }
  while (!is_nil (remove)) {
    CH->reset (remove->item.key);
    remove= remove->next;
  }
}
예제 #7
0
파일: tm_window.cpp 프로젝트: mgubi/texmacs
void
notify_window_destroy (string name) {
    window_names->reset (name);
}
예제 #8
0
void
cache_reset (string buffer, tree key) {
  tree ckey= tuple (buffer, key);
  cache_data->reset (ckey);
  cache_changed->insert (buffer);
}
예제 #9
0
파일: link.cpp 프로젝트: svn2github/texmacs
void
unregister_vertex (tree v, soft_link ln) {
  list<soft_link>& l= vertex_occurrences (v);
  l= remove (l, ln);
  if (is_nil (l)) vertex_occurrences->reset (v);
}