Пример #1
0
bool
descends (url u, url base) {
  if (is_or (base)) return descends (u, base[1]) || descends (u, base[2]);
  if (is_concat (u) && is_atomic (base))
    return u[1] == base;
  if (is_concat (u) && is_concat (base))
    return u[1] == base[1] && descends (u[2], base[2]);
  return false;
}
Пример #2
0
properties
tmfs_list_heads_inside (url u, string prj) {
  strings files= as_strings (tmfs_get_project_files (prj));
  properties r;
  for (int i=0; i<N(files); i++) {
    string id= files[i];
    collection pl= tmfs_query (seq ("mirror", id, prj, "?delta"), "?delta");
    if (N(pl) > 0) {
      url v= first (pl);
      if (u == url_here () || descends (v, u))
	r << seq (as_string (v), id);
    }
  }
  merge_sort (r);
  return r;
}
Пример #3
0
bool
is_secure (url u) {
  return descends (u, expand (url_path ("$TEXMACS_SECURE_PATH")));
}