/misc/src/release/graphviz-2.18-1/src/graphviz-2.18/lib/gvc/regex_win32.c File Reference

#include <sys/types.h>
#include <string.h>
#include <strings.h>
#include "regex_win32.h"
#include <ctype.h>

Include dependency graph for regex_win32.c:

Go to the source code of this file.

Data Structures

union  fail_stack_elt
struct  fail_stack_type
union  register_info_type
struct  compile_stack_elt_t
struct  compile_stack_type

Defines

#define _GNU_SOURCE
#define gettext(msgid)   (msgid)
#define gettext_noop(String)   String
#define Sword   1
#define SWITCH_ENUM_CAST(x)   (x)
#define CHAR_SET_SIZE   256
#define SYNTAX(c)   re_syntax_table[c]
#define ISASCII(c)   1
#define ISBLANK(c)   ((c) == ' ' || (c) == '\t')
#define ISGRAPH(c)   (ISASCII (c) && isprint (c) && !isspace (c))
#define ISPRINT(c)   (ISASCII (c) && isprint (c))
#define ISDIGIT(c)   (ISASCII (c) && isdigit (c))
#define ISALNUM(c)   (ISASCII (c) && isalnum (c))
#define ISALPHA(c)   (ISASCII (c) && isalpha (c))
#define ISCNTRL(c)   (ISASCII (c) && iscntrl (c))
#define ISLOWER(c)   (ISASCII (c) && islower (c))
#define ISPUNCT(c)   (ISASCII (c) && ispunct (c))
#define ISSPACE(c)   (ISASCII (c) && isspace (c))
#define ISUPPER(c)   (ISASCII (c) && isupper (c))
#define ISXDIGIT(c)   (ISASCII (c) && isxdigit (c))
#define NULL   (void *)0
#define SIGN_EXTEND_CHAR(c)   ((((unsigned char) (c)) ^ 128) - 128)
#define REGEX_ALLOCATE   alloca
#define REGEX_REALLOCATE(source, osize, nsize)
#define REGEX_FREE(arg)   ((void)0)
#define REGEX_ALLOCATE_STACK   alloca
#define REGEX_REALLOCATE_STACK(source, osize, nsize)   REGEX_REALLOCATE (source, osize, nsize)
#define REGEX_FREE_STACK(arg)
#define FIRST_STRING_P(ptr)   (size1 && string1 <= (ptr) && (ptr) <= string1 + size1)
#define TALLOC(n, t)   ((t *) malloc ((n) * sizeof (t)))
#define RETALLOC(addr, n, t)   ((addr) = (t *) realloc (addr, (n) * sizeof (t)))
#define RETALLOC_IF(addr, n, t)   if (addr) RETALLOC((addr), (n), t); else (addr) = TALLOC ((n), t)
#define REGEX_TALLOC(n, t)   ((t *) REGEX_ALLOCATE ((n) * sizeof (t)))
#define BYTEWIDTH   8
#define STREQ(s1, s2)   ((strcmp (s1, s2) == 0))
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define false   0
#define true   1
#define STORE_NUMBER(destination, number)
#define STORE_NUMBER_AND_INCR(destination, number)
#define EXTRACT_NUMBER(destination, source)
#define EXTRACT_NUMBER_AND_INCR(destination, source)
#define assert(e)
#define DEBUG_STATEMENT(e)
#define DEBUG_PRINT1(x)
#define DEBUG_PRINT2(x1, x2)
#define DEBUG_PRINT3(x1, x2, x3)
#define DEBUG_PRINT4(x1, x2, x3, x4)
#define DEBUG_PRINT_COMPILED_PATTERN(p, s, e)
#define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2)
#define MATCH_MAY_ALLOCATE
#define INIT_FAILURE_ALLOC   5
#define FAIL_STACK_EMPTY()   (fail_stack.avail == 0)
#define FAIL_STACK_PTR_EMPTY()   (fail_stack_ptr->avail == 0)
#define FAIL_STACK_FULL()   (fail_stack.avail == fail_stack.size)
#define INIT_FAIL_STACK()
#define RESET_FAIL_STACK()   REGEX_FREE_STACK (fail_stack.stack)
#define DOUBLE_FAIL_STACK(fail_stack)
#define PUSH_PATTERN_OP(POINTER, FAIL_STACK)
#define PUSH_FAILURE_POINTER(item)   fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (item)
#define PUSH_FAILURE_INT(item)   fail_stack.stack[fail_stack.avail++].integer = (item)
#define PUSH_FAILURE_ELT(item)   fail_stack.stack[fail_stack.avail++] = (item)
#define POP_FAILURE_POINTER()   fail_stack.stack[--fail_stack.avail].pointer
#define POP_FAILURE_INT()   fail_stack.stack[--fail_stack.avail].integer
#define POP_FAILURE_ELT()   fail_stack.stack[--fail_stack.avail]
#define DEBUG_PUSH(item)
#define DEBUG_POP(item_addr)
#define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code)
#define NUM_REG_ITEMS   3
#define NUM_NONREG_ITEMS   4
#define MAX_FAILURE_ITEMS   (5 * NUM_REG_ITEMS + NUM_NONREG_ITEMS)
#define NUM_FAILURE_ITEMS
#define REMAINING_AVAIL_SLOTS   ((fail_stack).size - (fail_stack).avail)
#define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)
#define MATCH_NULL_UNSET_VALUE   3
#define REG_MATCH_NULL_STRING_P(R)   ((R).bits.match_null_string_p)
#define IS_ACTIVE(R)   ((R).bits.is_active)
#define MATCHED_SOMETHING(R)   ((R).bits.matched_something)
#define EVER_MATCHED_SOMETHING(R)   ((R).bits.ever_matched_something)
#define SET_REGS_MATCHED()
#define REG_UNSET_VALUE   (&reg_unset_dummy)
#define REG_UNSET(e)   ((e) == REG_UNSET_VALUE)
#define PATFETCH(c)
#define PATFETCH_RAW(c)
#define PATUNFETCH   p--
#define TRANSLATE(d)   (translate ? (char) translate[(unsigned char) (d)] : (d))
#define INIT_BUF_SIZE   32
#define GET_BUFFER_SPACE(n)
#define BUF_PUSH(c)
#define BUF_PUSH_2(c1, c2)
#define BUF_PUSH_3(c1, c2, c3)
#define STORE_JUMP(op, loc, to)   store_op1 (op, loc, (int) ((to) - (loc) - 3))
#define STORE_JUMP2(op, loc, to, arg)   store_op2 (op, loc, (int) ((to) - (loc) - 3), arg)
#define INSERT_JUMP(op, loc, to)   insert_op1 (op, loc, (int) ((to) - (loc) - 3), b)
#define INSERT_JUMP2(op, loc, to, arg)   insert_op2 (op, loc, (int) ((to) - (loc) - 3), arg, b)
#define MAX_BUF_SIZE   (1L << 16)
#define REALLOC(p, s)   realloc ((p), (s))
#define EXTEND_BUFFER()
#define MAX_REGNUM   255
#define INIT_COMPILE_STACK_SIZE   32
#define COMPILE_STACK_EMPTY   (compile_stack.avail == 0)
#define COMPILE_STACK_FULL   (compile_stack.avail == compile_stack.size)
#define COMPILE_STACK_TOP   (compile_stack.stack[compile_stack.avail])
#define SET_LIST_BIT(c)
#define GET_UNSIGNED_NUMBER(num)
#define CHAR_CLASS_MAX_LENGTH   6
#define IS_CHAR_CLASS(string)
#define FREE_STACK_RETURN(value)   return (free (compile_stack.stack), value)
#define POINTER_TO_OFFSET(ptr)
#define MATCHING_IN_FIRST_STRING   (dend == end_match_1)
#define PREFETCH()
#define AT_STRINGS_BEG(d)   ((d) == (size1 ? string1 : string2) || !size2)
#define AT_STRINGS_END(d)   ((d) == end2)
#define WORDCHAR_P(d)
#define FREE_VAR(var)   if (var) REGEX_FREE (var); var = NULL
#define FREE_VARIABLES()
#define NO_HIGHEST_ACTIVE_REG   (1 << BYTEWIDTH)
#define NO_LOWEST_ACTIVE_REG   (NO_HIGHEST_ACTIVE_REG + 1)

Typedefs

typedef fail_stack_elt fail_stack_elt_t
typedef unsigned regnum_t
typedef long pattern_offset_t

Enumerations

enum  re_opcode_t {
  no_op = 0, succeed, exactn, anychar,
  charset, charset_not, start_memory, stop_memory,
  duplicate, begline, endline, begbuf,
  endbuf, jump, jump_past_alt, on_failure_jump,
  on_failure_keep_string_jump, pop_failure_jump, maybe_pop_jump, dummy_failure_jump,
  push_dummy_failure, succeed_n, jump_n, set_number_at,
  wordchar, notwordchar, wordbeg, wordend,
  wordbound, notwordbound
}

Functions

char * malloc ()
char * realloc ()
void free ()
reg_syntax_t re_set_syntax (reg_syntax_t syntax)
int re_compile_fastmap (struct re_pattern_buffer *bufp)
void re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs, unsigned num_regs, regoff_t *starts, regoff_t *ends)
int re_search (struct re_pattern_buffer *bufp, const char *string, int size, int startpos, int range, struct re_registers *regs)
int re_search_2 (struct re_pattern_buffer *bufp, const char *string1, int size1, const char *string2, int size2, int startpos, int range, struct re_registers *regs, int stop)
int re_match (struct re_pattern_buffer *bufp, const char *string, int size, int pos, struct re_registers *regs)
int re_match_2 (struct re_pattern_buffer *bufp, const char *string1, int size1, const char *string2, int size2, int pos, struct re_registers *regs, int stop)
const char * re_compile_pattern (const char *pattern, size_t length, struct re_pattern_buffer *bufp)
int regcomp (regex_t *preg, const char *pattern, int cflags)
int regexec (const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags)
size_t regerror (int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
void regfree (regex_t *preg)

Variables

reg_syntax_t re_syntax_options


Define Documentation

#define _GNU_SOURCE

Definition at line 50 of file regex_win32.c.

#define assert (  ) 

Definition at line 953 of file regex_win32.c.

Referenced by beginpath(), build_ranks(), delete_fast_edge(), delete_fast_node(), delete_flat_edge(), dot_position(), dotneato_args_initialize(), endpath(), fast_edge(), fast_node(), fast_nodeapp(), findCComp(), html_path(), insertNodelist(), install_in_rank(), interclexp(), makeSelfEdge(), merge_chain(), merge_oneway(), neato_enqueue(), Pobspath(), pop_obj_state(), Ppolybarriers(), re_compile_fastmap(), rec_reset_vlists(), removeDeglist(), round_corners(), spline_at_y(), stackPop(), UF_remove(), and UF_setname().

#define AT_STRINGS_BEG (  )     ((d) == (size1 ? string1 : string2) || !size2)

Definition at line 3619 of file regex_win32.c.

#define AT_STRINGS_END (  )     ((d) == end2)

Definition at line 3620 of file regex_win32.c.

#define BUF_PUSH (  ) 

Value:

do {                                                                  \
    GET_BUFFER_SPACE (1);                                               \
    *b++ = (unsigned char) (c);                                         \
  } while (0)

Definition at line 1544 of file regex_win32.c.

#define BUF_PUSH_2 ( c1,
c2   ) 

Value:

do {                                                                  \
    GET_BUFFER_SPACE (2);                                               \
    *b++ = (unsigned char) (c1);                                        \
    *b++ = (unsigned char) (c2);                                        \
  } while (0)

Definition at line 1552 of file regex_win32.c.

#define BUF_PUSH_3 ( c1,
c2,
c3   ) 

Value:

do {                                                                  \
    GET_BUFFER_SPACE (3);                                               \
    *b++ = (unsigned char) (c1);                                        \
    *b++ = (unsigned char) (c2);                                        \
    *b++ = (unsigned char) (c3);                                        \
  } while (0)

Definition at line 1561 of file regex_win32.c.

#define BYTEWIDTH   8

Definition at line 353 of file regex_win32.c.

Referenced by re_compile_fastmap().

#define CHAR_CLASS_MAX_LENGTH   6

Definition at line 1717 of file regex_win32.c.

#define CHAR_SET_SIZE   256

Definition at line 159 of file regex_win32.c.

Referenced by regcomp().

#define COMPILE_STACK_EMPTY   (compile_stack.avail == 0)

Definition at line 1674 of file regex_win32.c.

#define COMPILE_STACK_FULL   (compile_stack.avail == compile_stack.size)

Definition at line 1675 of file regex_win32.c.

#define COMPILE_STACK_TOP   (compile_stack.stack[compile_stack.avail])

Definition at line 1678 of file regex_win32.c.

#define DEBUG_POP ( item_addr   ) 

Definition at line 1221 of file regex_win32.c.

#define DEBUG_PRINT1 (  ) 

Definition at line 956 of file regex_win32.c.

Referenced by regcomp().

#define DEBUG_PRINT2 ( x1,
x2   ) 

Definition at line 957 of file regex_win32.c.

#define DEBUG_PRINT3 ( x1,
x2,
x3   ) 

Definition at line 958 of file regex_win32.c.

#define DEBUG_PRINT4 ( x1,
x2,
x3,
x4   ) 

Definition at line 959 of file regex_win32.c.

#define DEBUG_PRINT_COMPILED_PATTERN ( p,
s,
 ) 

Definition at line 960 of file regex_win32.c.

#define DEBUG_PRINT_DOUBLE_STRING ( w,
s1,
sz1,
s2,
sz2   ) 

Definition at line 961 of file regex_win32.c.

#define DEBUG_PUSH ( item   ) 

Definition at line 1220 of file regex_win32.c.

#define DEBUG_STATEMENT (  ) 

Definition at line 955 of file regex_win32.c.

#define DOUBLE_FAIL_STACK ( fail_stack   ) 

Value:

((fail_stack).size > (unsigned) (re_max_failures * MAX_FAILURE_ITEMS) \
   ? 0                                                                  \
   : ((fail_stack).stack = (fail_stack_elt_t *)                         \
        REGEX_REALLOCATE_STACK ((fail_stack).stack,                     \
          (fail_stack).size * sizeof (fail_stack_elt_t),                \
          ((fail_stack).size << 1) * sizeof (fail_stack_elt_t)),        \
                                                                        \
      (fail_stack).stack == NULL                                        \
      ? 0                                                               \
      : ((fail_stack).size <<= 1,                                       \
         1)))

Definition at line 1167 of file regex_win32.c.

#define EVER_MATCHED_SOMETHING (  )     ((R).bits.ever_matched_something)

Definition at line 1450 of file regex_win32.c.

 
#define EXTEND_BUFFER (  ) 

Value:

do {                                                                  \
    unsigned char *old_buffer = bufp->buffer;                           \
    if (bufp->allocated == MAX_BUF_SIZE)                                \
      return REG_ESIZE;                                                 \
    bufp->allocated <<= 1;                                              \
    if (bufp->allocated > MAX_BUF_SIZE)                                 \
      bufp->allocated = MAX_BUF_SIZE;                                   \
    bufp->buffer = (unsigned char *) REALLOC (bufp->buffer, bufp->allocated);\
    if (bufp->buffer == NULL)                                           \
      return REG_ESPACE;                                                \
    /* If the buffer moved, move all the pointers into it.  */          \
    if (old_buffer != bufp->buffer)                                     \
      {                                                                 \
        b = (b - old_buffer) + bufp->buffer;                            \
        begalt = (begalt - old_buffer) + bufp->buffer;                  \
        if (fixup_alt_jump)                                             \
          fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer;\
        if (laststart)                                                  \
          laststart = (laststart - old_buffer) + bufp->buffer;          \
        if (pending_exact)                                              \
          pending_exact = (pending_exact - old_buffer) + bufp->buffer;  \
      }                                                                 \
  } while (0)

Definition at line 1611 of file regex_win32.c.

#define EXTRACT_NUMBER ( destination,
source   ) 

Value:

do {                                                                  \
    (destination) = *(source) & 0377;                                   \
    (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8;           \
  } while (0)

Definition at line 538 of file regex_win32.c.

#define EXTRACT_NUMBER_AND_INCR ( destination,
source   ) 

Value:

do {                                                                  \
    EXTRACT_NUMBER (destination, source);                               \
    (source) += 2;                                                      \
  } while (0)

Definition at line 566 of file regex_win32.c.

Referenced by re_compile_fastmap().

 
#define FAIL_STACK_EMPTY (  )     (fail_stack.avail == 0)

Definition at line 1128 of file regex_win32.c.

Referenced by re_compile_fastmap().

 
#define FAIL_STACK_FULL (  )     (fail_stack.avail == fail_stack.size)

Definition at line 1130 of file regex_win32.c.

 
#define FAIL_STACK_PTR_EMPTY (  )     (fail_stack_ptr->avail == 0)

Definition at line 1129 of file regex_win32.c.

#define false   0

Definition at line 363 of file regex_win32.c.

#define FIRST_STRING_P ( ptr   )     (size1 && string1 <= (ptr) && (ptr) <= string1 + size1)

Definition at line 343 of file regex_win32.c.

#define FREE_STACK_RETURN ( value   )     return (free (compile_stack.stack), value)

Definition at line 1799 of file regex_win32.c.

#define FREE_VAR ( var   )     if (var) REGEX_FREE (var); var = NULL

Definition at line 3643 of file regex_win32.c.

 
#define FREE_VARIABLES (  ) 

Value:

do {                                                                  \
    REGEX_FREE_STACK (fail_stack.stack);                                \
    FREE_VAR ((void*) regstart);                                        \
    FREE_VAR ((void*) regend);                                          \
    FREE_VAR ((void*) old_regstart);                                    \
    FREE_VAR ((void*) old_regend);                                      \
    FREE_VAR ((void*) best_regstart);                                   \
    FREE_VAR ((void*) best_regend);                                     \
    FREE_VAR ((void*) reg_info);                                        \
    FREE_VAR ((void*) reg_dummy);                                       \
    FREE_VAR ((void*) reg_info_dummy);                                  \
  } while (0)

Definition at line 3644 of file regex_win32.c.

#define GET_BUFFER_SPACE (  ) 

Value:

while ((unsigned long) (b - bufp->buffer + (n)) > bufp->allocated)  \
      EXTEND_BUFFER ()

Definition at line 1539 of file regex_win32.c.

#define GET_UNSIGNED_NUMBER ( num   ) 

Value:

{ if (p != pend)                                                      \
     {                                                                  \
       PATFETCH (c);                                                    \
       while (ISDIGIT (c))                                              \
         {                                                              \
           if (num < 0)                                                 \
              num = 0;                                                  \
           num = num * 10 + c - '0';                                    \
           if (p == pend)                                               \
              break;                                                    \
           PATFETCH (c);                                                \
         }                                                              \
       }                                                                \
    }

Definition at line 1688 of file regex_win32.c.

#define gettext ( msgid   )     (msgid)

Definition at line 75 of file regex_win32.c.

Referenced by re_compile_pattern(), and regerror().

#define gettext_noop ( String   )     String

Definition at line 81 of file regex_win32.c.

#define INIT_BUF_SIZE   32

Definition at line 1536 of file regex_win32.c.

#define INIT_COMPILE_STACK_SIZE   32

Definition at line 1672 of file regex_win32.c.

 
#define INIT_FAIL_STACK (  ) 

Value:

do {                                                                  \
    fail_stack.stack = (fail_stack_elt_t *)                             \
      REGEX_ALLOCATE_STACK (INIT_FAILURE_ALLOC * sizeof (fail_stack_elt_t));    \
                                                                        \
    if (fail_stack.stack == NULL)                                       \
      return -2;                                                        \
                                                                        \
    fail_stack.size = INIT_FAILURE_ALLOC;                               \
    fail_stack.avail = 0;                                               \
  } while (0)

Definition at line 1137 of file regex_win32.c.

Referenced by re_compile_fastmap().

#define INIT_FAILURE_ALLOC   5

Definition at line 1068 of file regex_win32.c.

#define INSERT_JUMP ( op,
loc,
to   )     insert_op1 (op, loc, (int) ((to) - (loc) - 3), b)

Definition at line 1580 of file regex_win32.c.

#define INSERT_JUMP2 ( op,
loc,
to,
arg   )     insert_op2 (op, loc, (int) ((to) - (loc) - 3), arg, b)

Definition at line 1584 of file regex_win32.c.

#define IS_ACTIVE (  )     ((R).bits.is_active)

Definition at line 1448 of file regex_win32.c.

#define IS_CHAR_CLASS ( string   ) 

Value:

(STREQ (string, "alpha") || STREQ (string, "upper")                  \
    || STREQ (string, "lower") || STREQ (string, "digit")               \
    || STREQ (string, "alnum") || STREQ (string, "xdigit")              \
    || STREQ (string, "space") || STREQ (string, "print")               \
    || STREQ (string, "punct") || STREQ (string, "graph")               \
    || STREQ (string, "cntrl") || STREQ (string, "blank"))

Definition at line 1719 of file regex_win32.c.

#define ISALNUM (  )     (ISASCII (c) && isalnum (c))

Definition at line 231 of file regex_win32.c.

#define ISALPHA (  )     (ISASCII (c) && isalpha (c))

Definition at line 232 of file regex_win32.c.

#define ISASCII (  )     1

Definition at line 213 of file regex_win32.c.

#define ISBLANK (  )     ((c) == ' ' || (c) == '\t')

Definition at line 221 of file regex_win32.c.

#define ISCNTRL (  )     (ISASCII (c) && iscntrl (c))

Definition at line 233 of file regex_win32.c.

#define ISDIGIT (  )     (ISASCII (c) && isdigit (c))

Definition at line 230 of file regex_win32.c.

#define ISGRAPH (  )     (ISASCII (c) && isprint (c) && !isspace (c))

Definition at line 226 of file regex_win32.c.

#define ISLOWER (  )     (ISASCII (c) && islower (c))

Definition at line 234 of file regex_win32.c.

#define ISPRINT (  )     (ISASCII (c) && isprint (c))

Definition at line 229 of file regex_win32.c.

#define ISPUNCT (  )     (ISASCII (c) && ispunct (c))

Definition at line 235 of file regex_win32.c.

#define ISSPACE (  )     (ISASCII (c) && isspace (c))

Definition at line 236 of file regex_win32.c.

#define ISUPPER (  )     (ISASCII (c) && isupper (c))

Definition at line 237 of file regex_win32.c.

Referenced by regcomp().

#define ISXDIGIT (  )     (ISASCII (c) && isxdigit (c))

Definition at line 238 of file regex_win32.c.

#define MATCH_MAY_ALLOCATE

Definition at line 1041 of file regex_win32.c.

#define MATCH_NULL_UNSET_VALUE   3

Definition at line 1439 of file regex_win32.c.

#define MATCHED_SOMETHING (  )     ((R).bits.matched_something)

Definition at line 1449 of file regex_win32.c.

#define MATCHING_IN_FIRST_STRING   (dend == end_match_1)

Definition at line 3601 of file regex_win32.c.

#define MAX ( a,
 )     ((a) > (b) ? (a) : (b))

Definition at line 359 of file regex_win32.c.

#define MAX_BUF_SIZE   (1L << 16)

Definition at line 1603 of file regex_win32.c.

#define MAX_FAILURE_ITEMS   (5 * NUM_REG_ITEMS + NUM_NONREG_ITEMS)

Definition at line 1324 of file regex_win32.c.

#define MAX_REGNUM   255

Definition at line 1640 of file regex_win32.c.

#define MIN ( a,
 )     ((a) < (b) ? (a) : (b))

Definition at line 360 of file regex_win32.c.

#define NO_HIGHEST_ACTIVE_REG   (1 << BYTEWIDTH)

Definition at line 3668 of file regex_win32.c.

#define NO_LOWEST_ACTIVE_REG   (NO_HIGHEST_ACTIVE_REG + 1)

Definition at line 3669 of file regex_win32.c.

#define NULL   (void *)0

Definition at line 241 of file regex_win32.c.

#define NUM_FAILURE_ITEMS

Value:

(((0                                                  \
     ? 0 : highest_active_reg - lowest_active_reg + 1)  \
    * NUM_REG_ITEMS)                                    \
   + NUM_NONREG_ITEMS)

Definition at line 1327 of file regex_win32.c.

#define NUM_NONREG_ITEMS   4

Definition at line 1317 of file regex_win32.c.

#define NUM_REG_ITEMS   3

Definition at line 1311 of file regex_win32.c.

#define PATFETCH (  ) 

Value:

do {if (p == pend) return REG_EEND;                                   \
    c = (unsigned char) *p++;                                           \
    if (translate) c = (unsigned char) translate[c];                    \
  } while (0)

Definition at line 1505 of file regex_win32.c.

#define PATFETCH_RAW (  ) 

Value:

do {if (p == pend) return REG_EEND;                                   \
    c = (unsigned char) *p++;                                           \
  } while (0)

Definition at line 1514 of file regex_win32.c.

#define PATUNFETCH   p--

Definition at line 1520 of file regex_win32.c.

#define POINTER_TO_OFFSET ( ptr   ) 

Value:

(FIRST_STRING_P (ptr)                         \
   ? ((regoff_t) ((ptr) - string1))             \
   : ((regoff_t) ((ptr) - string2 + size1)))

Definition at line 3594 of file regex_win32.c.

 
#define POP_FAILURE_ELT (  )     fail_stack.stack[--fail_stack.avail]

Definition at line 1213 of file regex_win32.c.

 
#define POP_FAILURE_INT (  )     fail_stack.stack[--fail_stack.avail].integer

Definition at line 1212 of file regex_win32.c.

#define POP_FAILURE_POINT ( str,
pat,
low_reg,
high_reg,
regstart,
regend,
reg_info   ) 

Definition at line 1349 of file regex_win32.c.

 
#define POP_FAILURE_POINTER (  )     fail_stack.stack[--fail_stack.avail].pointer

Definition at line 1211 of file regex_win32.c.

 
#define PREFETCH (  ) 

Value:

while (d == dend)                                                     \
    {                                                                   \
      /* End of string2 => fail.  */                                    \
      if (dend == end_match_2)                                          \
        goto fail;                                                      \
      /* End of string1 => advance to string2.  */                      \
      d = string2;                                                      \
      dend = end_match_2;                                               \
    }

Definition at line 3605 of file regex_win32.c.

#define PUSH_FAILURE_ELT ( item   )     fail_stack.stack[fail_stack.avail++] = (item)

Definition at line 1206 of file regex_win32.c.

#define PUSH_FAILURE_INT ( item   )     fail_stack.stack[fail_stack.avail++].integer = (item)

Definition at line 1200 of file regex_win32.c.

#define PUSH_FAILURE_POINT ( pattern_place,
string_place,
failure_code   ) 

Definition at line 1234 of file regex_win32.c.

#define PUSH_FAILURE_POINTER ( item   )     fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (item)

Definition at line 1194 of file regex_win32.c.

#define PUSH_PATTERN_OP ( POINTER,
FAIL_STACK   ) 

Value:

((FAIL_STACK_FULL ()                                                  \
    && !DOUBLE_FAIL_STACK (FAIL_STACK))                                 \
   ? 0                                                                  \
   : ((FAIL_STACK).stack[(FAIL_STACK).avail++].pointer = POINTER,       \
      1))

Definition at line 1184 of file regex_win32.c.

Referenced by re_compile_fastmap().

#define REALLOC ( p,
 )     realloc ((p), (s))

Definition at line 1604 of file regex_win32.c.

#define REG_MATCH_NULL_STRING_P (  )     ((R).bits.match_null_string_p)

Definition at line 1447 of file regex_win32.c.

#define REG_UNSET (  )     ((e) == REG_UNSET_VALUE)

Definition at line 1476 of file regex_win32.c.

#define REG_UNSET_VALUE   (&reg_unset_dummy)

Definition at line 1475 of file regex_win32.c.

#define REGEX_ALLOCATE   alloca

Definition at line 295 of file regex_win32.c.

#define REGEX_ALLOCATE_STACK   alloca

Definition at line 329 of file regex_win32.c.

#define REGEX_FREE ( arg   )     ((void)0)

Definition at line 304 of file regex_win32.c.

#define REGEX_FREE_STACK ( arg   ) 

Definition at line 334 of file regex_win32.c.

#define REGEX_REALLOCATE ( source,
osize,
nsize   ) 

Value:

(destination = (char *) alloca (nsize),                               \
   bcopy (source, destination, osize),                                  \
   destination)

Definition at line 298 of file regex_win32.c.

#define REGEX_REALLOCATE_STACK ( source,
osize,
nsize   )     REGEX_REALLOCATE (source, osize, nsize)

Definition at line 331 of file regex_win32.c.

#define REGEX_TALLOC ( n,
 )     ((t *) REGEX_ALLOCATE ((n) * sizeof (t)))

Definition at line 351 of file regex_win32.c.

#define REMAINING_AVAIL_SLOTS   ((fail_stack).size - (fail_stack).avail)

Definition at line 1334 of file regex_win32.c.

 
#define RESET_FAIL_STACK (  )     REGEX_FREE_STACK (fail_stack.stack)

Definition at line 1149 of file regex_win32.c.

Referenced by re_compile_fastmap().

#define RETALLOC ( addr,
n,
 )     ((addr) = (t *) realloc (addr, (n) * sizeof (t)))

Definition at line 348 of file regex_win32.c.

#define RETALLOC_IF ( addr,
n,
 )     if (addr) RETALLOC((addr), (n), t); else (addr) = TALLOC ((n), t)

Definition at line 349 of file regex_win32.c.

#define SET_LIST_BIT (  ) 

Value:

(b[((unsigned char) (c)) / BYTEWIDTH]               \
   |= 1 << (((unsigned char) c) % BYTEWIDTH))

Definition at line 1682 of file regex_win32.c.

 
#define SET_REGS_MATCHED (  ) 

Value:

do                                                                    \
    {                                                                   \
      if (!set_regs_matched_done)                                       \
        {                                                               \
          active_reg_t r;                                               \
          set_regs_matched_done = 1;                                    \
          for (r = lowest_active_reg; r <= highest_active_reg; r++)     \
            {                                                           \
              MATCHED_SOMETHING (reg_info[r])                           \
                = EVER_MATCHED_SOMETHING (reg_info[r])                  \
                = 1;                                                    \
            }                                                           \
        }                                                               \
    }                                                                   \
  while (0)

Definition at line 1456 of file regex_win32.c.

#define SIGN_EXTEND_CHAR (  )     ((((unsigned char) (c)) ^ 128) - 128)

Definition at line 253 of file regex_win32.c.

#define STORE_JUMP ( op,
loc,
to   )     store_op1 (op, loc, (int) ((to) - (loc) - 3))

Definition at line 1572 of file regex_win32.c.

#define STORE_JUMP2 ( op,
loc,
to,
arg   )     store_op2 (op, loc, (int) ((to) - (loc) - 3), arg)

Definition at line 1576 of file regex_win32.c.

#define STORE_NUMBER ( destination,
number   ) 

Value:

do {                                                                  \
    (destination)[0] = (number) & 0377;                                 \
    (destination)[1] = (number) >> 8;                                   \
  } while (0)

Definition at line 519 of file regex_win32.c.

#define STORE_NUMBER_AND_INCR ( destination,
number   ) 

Value:

do {                                                                  \
    STORE_NUMBER (destination, number);                                 \
    (destination) += 2;                                                 \
  } while (0)

Definition at line 529 of file regex_win32.c.

#define STREQ ( s1,
s2   )     ((strcmp (s1, s2) == 0))

Definition at line 355 of file regex_win32.c.

#define SWITCH_ENUM_CAST (  )     (x)

Definition at line 149 of file regex_win32.c.

Referenced by re_compile_fastmap().

#define Sword   1

Definition at line 143 of file regex_win32.c.

Referenced by re_compile_fastmap().

#define SYNTAX (  )     re_syntax_table[c]

Definition at line 190 of file regex_win32.c.

Referenced by re_compile_fastmap().

#define TALLOC ( n,
 )     ((t *) malloc ((n) * sizeof (t)))

Definition at line 347 of file regex_win32.c.

Referenced by regexec().

#define TRANSLATE (  )     (translate ? (char) translate[(unsigned char) (d)] : (d))

Definition at line 1528 of file regex_win32.c.

Referenced by re_search_2().

#define true   1

Definition at line 364 of file regex_win32.c.

#define WORDCHAR_P (  ) 

Value:

(SYNTAX ((d) == end1 ? *string2                                       \
           : (d) == string2 - 1 ? *(end1 - 1) : *(d))                   \
   == Sword)

Definition at line 3627 of file regex_win32.c.


Typedef Documentation

typedef union fail_stack_elt fail_stack_elt_t

Definition at line 1117 of file regex_win32.c.

typedef long pattern_offset_t

Definition at line 1652 of file regex_win32.c.

typedef unsigned regnum_t

Definition at line 1644 of file regex_win32.c.


Enumeration Type Documentation

enum re_opcode_t

Enumerator:
no_op 
succeed 
exactn 
anychar 
charset 
charset_not 
start_memory 
stop_memory 
duplicate 
begline 
endline 
begbuf 
endbuf 
jump 
jump_past_alt 
on_failure_jump 
on_failure_keep_string_jump 
pop_failure_jump 
maybe_pop_jump 
dummy_failure_jump 
push_dummy_failure 
succeed_n 
jump_n 
set_number_at 
wordchar 
notwordchar 
wordbeg 
wordend 
wordbound 
notwordbound 

Definition at line 381 of file regex_win32.c.


Function Documentation

void free (  ) 

Referenced by adjustGrid(), agclose(), agFREEdict(), agFREEedge(), agFREEnode(), agpopproto(), agstrfree(), agxbfree(), allocate_ranks(), breakPoly(), cAdjust(), ccomps(), circo_cleanup(), circo_layout(), circoLayout(), circomps(), circuitModel(), compoundEdges(), compute_apsp_packed(), compute_new_weights(), conjugate_gradient(), conjugate_gradient_f(), conjugate_gradient_mkernel(), delGrid(), delQueue(), dijkstra_f(), dtclose(), dtopen(), dtstat(), ELcleanup(), embed_graph(), emit_map_rect(), epsf_free(), fdp_cleanup(), find_ints(), findCComp(), free_array(), free_html_data(), free_html_font(), free_html_img(), free_html_label(), free_html_text(), free_label(), free_queue(), free_scan_graph(), freeBlock(), freeinit(), freeNodelist(), freePM(), freepoly(), freeQueue(), freeStack(), graph_cleanup(), gv_argvlist_free(), gv_argvlist_reset(), gvconfig(), gvFreeContext(), gvjobs_delete(), gvplugin_library_load(), gvplugin_list(), iterativePCA_1D(), layout(), lu_decompose(), make_html_label(), makeGraphs(), makeSelfArcs(), makeSpline(), matinv(), neato_cleanup_node(), neato_free_splines(), neato_layout(), packGraphs(), PCA_alloc(), pccomps(), Plegal_arrangement(), Pobsclose(), Pobspath(), polyFree(), pop_obj_state(), power_iteration(), PQcleanup(), ps_string(), Ptriangulate(), putGraphs(), regexec(), regfree(), removeOverlapAs(), restore_old_weights(), reverseAppend(), round_corners(), routesplinesinit(), routesplinesterm(), scAdjust(), shortest_path(), shortestPath(), size_label(), solve(), stress_majorization_kD_mkernel(), and twopi_layout().

char* malloc (  ) 

Referenced by aglasterr(), agstrdup(), agstrdup_html(), copypoly(), dtopen(), dtstat(), gmalloc(), gvRenderData(), makePath(), mult_dense_mat(), mult_dense_mat_d(), mult_sparse_dense_mat_transpose(), Pobsbarriers(), Pobsopen(), Pobspath(), Ppolybarriers(), Proutespline(), Ptriangulate(), ptVis(), regcomp(), and shortestPath().

int re_compile_fastmap ( struct re_pattern_buffer bufp  ) 

Definition at line 3095 of file regex_win32.c.

References anychar, assert, fail_stack_type::avail, begbuf, begline, re_pattern_buffer::buffer, BYTEWIDTH, re_pattern_buffer::can_be_null, charset, charset_not, dummy_failure_jump, duplicate, endbuf, endline, exactn, EXTRACT_NUMBER_AND_INCR, FAIL_STACK_EMPTY, re_pattern_buffer::fastmap, re_pattern_buffer::fastmap_accurate, INIT_FAIL_STACK, jump, jump_n, jump_past_alt, maybe_pop_jump, no_op, notwordbound, notwordchar, NULL, on_failure_jump, on_failure_keep_string_jump, fail_stack_elt::pointer, pop_failure_jump, push_dummy_failure, PUSH_PATTERN_OP, RE_DOT_NEWLINE, RESET_FAIL_STACK, set_number_at, fail_stack_type::stack, start_memory, stop_memory, succeed, succeed_n, SWITCH_ENUM_CAST, Sword, re_pattern_buffer::syntax, SYNTAX, re_pattern_buffer::used, wordbeg, wordbound, wordchar, and wordend.

Referenced by re_search_2().

const char* re_compile_pattern ( const char *  pattern,
size_t  length,
struct re_pattern_buffer bufp 
)

Definition at line 5407 of file regex_win32.c.

References gettext, re_pattern_buffer::newline_anchor, re_pattern_buffer::no_sub, NULL, re_pattern_buffer::regs_allocated, and REGS_UNALLOCATED.

int re_match ( struct re_pattern_buffer bufp,
const char *  string,
int  size,
int  pos,
struct re_registers regs 
)

Definition at line 3677 of file regex_win32.c.

References NULL.

int re_match_2 ( struct re_pattern_buffer bufp,
const char *  string1,
int  size1,
const char *  string2,
int  size2,
int  pos,
struct re_registers regs,
int  stop 
)

Definition at line 3720 of file regex_win32.c.

int re_search ( struct re_pattern_buffer bufp,
const char *  string,
int  size,
int  startpos,
int  range,
struct re_registers regs 
)

Definition at line 3424 of file regex_win32.c.

References NULL, and re_search_2().

Referenced by regexec().

int re_search_2 ( struct re_pattern_buffer bufp,
const char *  string1,
int  size1,
const char *  string2,
int  size2,
int  startpos,
int  range,
struct re_registers regs,
int  stop 
)

Definition at line 3458 of file regex_win32.c.

References advance, begbuf, re_pattern_buffer::buffer, re_pattern_buffer::fastmap, re_pattern_buffer::fastmap_accurate, re_compile_fastmap(), RE_TRANSLATE_TYPE, TRANSLATE, re_pattern_buffer::translate, and re_pattern_buffer::used.

Referenced by re_search().

void re_set_registers ( struct re_pattern_buffer bufp,
struct re_registers regs,
unsigned  num_regs,
regoff_t starts,
regoff_t ends 
)

Definition at line 3397 of file regex_win32.c.

References re_registers::end, re_registers::num_regs, re_pattern_buffer::regs_allocated, REGS_REALLOCATE, REGS_UNALLOCATED, and re_registers::start.

reg_syntax_t re_set_syntax ( reg_syntax_t  syntax  ) 

Definition at line 981 of file regex_win32.c.

References RE_DEBUG.

char* realloc (  ) 

Referenced by agxbmore(), dijkstra(), dijkstra_bounded(), grealloc(), gvdevice_write(), mult_dense_mat(), mult_dense_mat_d(), mult_sparse_dense_mat_transpose(), renderdata(), safefile(), and zrealloc().

int regcomp ( regex_t preg,
const char *  pattern,
int  cflags 
)

Definition at line 5540 of file regex_win32.c.

References re_pattern_buffer::allocated, re_pattern_buffer::buffer, CHAR_SET_SIZE, DEBUG_PRINT1, re_pattern_buffer::fastmap, ISUPPER, malloc(), re_pattern_buffer::newline_anchor, re_pattern_buffer::no_sub, NULL, RE_DOT_NEWLINE, RE_HAT_LISTS_NOT_NEWLINE, RE_SYNTAX_POSIX_BASIC, RE_SYNTAX_POSIX_EXTENDED, RE_TRANSLATE_TYPE, REG_EPAREN, REG_ERPAREN, REG_ESPACE, REG_EXTENDED, REG_ICASE, REG_NEWLINE, REG_NOSUB, re_pattern_buffer::translate, and re_pattern_buffer::used.

size_t regerror ( int  errcode,
const regex_t preg,
char *  errbuf,
size_t  errbuf_size 
)

Definition at line 5688 of file regex_win32.c.

References gettext.

int regexec ( const regex_t preg,
const char *  string,
size_t  nmatch,
regmatch_t  pmatch[],
int  eflags 
)

Definition at line 5624 of file regex_win32.c.

References re_registers::end, free(), re_pattern_buffer::no_sub, re_pattern_buffer::not_bol, NULL, re_registers::num_regs, re_search(), REG_NOERROR, REG_NOMATCH, REG_NOTBOL, REG_NOTEOL, REGS_FIXED, regmatch_t::rm_eo, re_registers::start, and TALLOC.

void regfree ( regex_t preg  ) 

Definition at line 5727 of file regex_win32.c.

References re_pattern_buffer::allocated, re_pattern_buffer::buffer, re_pattern_buffer::fastmap, re_pattern_buffer::fastmap_accurate, free(), NULL, re_pattern_buffer::translate, and re_pattern_buffer::used.


Variable Documentation

reg_syntax_t re_syntax_options

Definition at line 970 of file regex_win32.c.


Generated on Mon Mar 31 19:06:28 2008 for Graphviz by  doxygen 1.5.1