pike.git / src / modules / Regexp / pike_regexp.c

version» Context lines:

pike.git/src/modules/Regexp/pike_regexp.c:1:   /* -  * $Id: pike_regexp.c,v 1.12 1998/03/28 14:36:45 grubba Exp $ +  * $Id: pike_regexp.c,v 1.13 1998/11/22 11:05:36 hubbe Exp $    *    * regexp.c - regular expression matching    *    * DESCRIPTION    *    * Underneath the reformatting and comment blocks which were added to    * make it consistent with the rest of the code, you will find a    * modified version of Henry Specer's regular expression library.    * Henry's functions were modified to provide the minimal regular    * expression matching, as required by P1003. Henry's code was
pike.git/src/modules/Regexp/pike_regexp.c:757:   static char **regstartp; /* Pointer to startp array. */   static char **regendp; /* Ditto for endp. */      /*    * Forwards.    */   STATIC int regtry(regexp *, char *);   STATIC int regmatch(char *);   STATIC int regrepeat(char *);    - #ifdef DEBUG + #ifdef PIKE_DEBUG   int regnarrate = 0;   void regdump(regexp *);   STATIC char *regprop(char *op);   #endif      /*    - regexec - match a regexp against a string    */   int pike_regexec(regexp *prog, char *string)   {
pike.git/src/modules/Regexp/pike_regexp.c:880:      static int regmatch(prog)   char *prog;      #endif   {    register char *scan; /* Current node. */    char *nxt; /* nxt node. */       scan = prog; - #ifdef DEBUG + #ifdef PIKE_DEBUG    if (scan != (char *)NULL && regnarrate)    fprintf(stderr, "%s(\n", regprop(scan));   #endif    while (scan != (char *)NULL) { - #ifdef DEBUG + #ifdef PIKE_DEBUG    if (regnarrate)    fprintf(stderr, "%s...\n", regprop(scan));   #endif    nxt = regnext(scan);       switch (OP(scan)) {    case BOL:    if (reginput != regbol)    return (0);    break;
pike.git/src/modules/Regexp/pike_regexp.c:1140:    offset = NEXT(p);    if (offset == 0)    return ((char *)NULL);       if (OP(p) == BACK)    return (p - offset);    else    return (p + offset);   }    - #ifdef DEBUG + #ifdef PIKE_DEBUG      STATIC char *regprop(char *);      /*    - regdump - dump a regexp onto stdout in vaguely comprehensible form    */   #ifdef __STDC__      void regdump(regexp *r)