Back to index

texmacs  1.0.7.15
Functions
edit_search.cpp File Reference
#include "Replace/edit_replace.hpp"
#include "Interface/edit_interface.hpp"
#include "drd_std.hpp"
#include "drd_mode.hpp"
#include "analyze.hpp"

Go to the source code of this file.

Functions

static bool is_accessible_path (drd_info drd, tree t, path p)
static bool test_match (tree t, tree pat)

Function Documentation

static bool is_accessible_path ( drd_info  drd,
tree  t,
path  p 
) [static]

Definition at line 125 of file edit_search.cpp.

                                                  {
  if (is_nil (p)) return true;
  return
    drd->is_accessible_child (t, p->item) &&
    (p->item < N(t)) &&
    is_accessible_path (drd, t[p->item], p->next);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bool test_match ( tree  t,
tree  pat 
) [static]

Definition at line 178 of file edit_search.cpp.

                              {
  // FIXME: we use empty strings for wildcards now
  // we should support real wildcards and regular expressions later
  if (pat == "") return true;
  else if (is_atomic (t) || is_atomic (pat)) return t == pat;
  else if ((L(t) != L(pat)) || (N(t) != N(pat))) return false;
  else {
    int i, n= N(t);
    for (i=0; i<n; i++)
      if (!test_match (t[i], pat[i]))
       return false;
    return true;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function: