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

version» Context lines:

pike.git/src/modules/Regexp/pike_regexp.c:213:    */   static short *regparse; /* Input-scan pointer. */   static int regnpar; /* () count. */   static char *regcode; /* Code-emit pointer; &regdummy = don't. */   static long regsize; /* Code size. */   static char regdummy;      /*    * Forward declarations for regcomp()'s friends.    */ - #ifndef STATIC - #define STATIC static - #endif - STATIC char *reg(int, int *); - STATIC char *regbranch(int *); - STATIC char *regpiece(int *); - STATIC char *regatom(int *); - STATIC char *regnode(char); - STATIC char *regnext(register char *); - STATIC void regc(char b); - STATIC void reginsert(char, char *); - STATIC void regtail(char *, char *); - STATIC void regoptail(char *, char *); + static char *reg(int, int *); + static char *regbranch(int *); + static char *regpiece(int *); + static char *regatom(int *); + static char *regnode(char); + static char *regnext(register char *); + static void regc(char b); + static void reginsert(char, char *); + static void regtail(char *, char *); + static void regoptail(char *, char *);      /*    - regcomp - compile a regular expression into internal code    *    * We can't allocate space until we know how big the compiled form will be,    * but we can't compile it (and thus know how big it is) until we've got a    * place to put the code. So we cheat: we compile it twice, once with code    * generation turned off and size counting turned on, and once "for real".    * This also means that we don't allocate space until we are sure that the    * thing really will compile successfully, and we never have to move the
pike.git/src/modules/Regexp/pike_regexp.c:764:    * Global work variables for regexec().    */   static char *reginput; /* String-input pointer. */   static char *regbol; /* Beginning of input, for ^ check. */   static char **regstartp; /* Pointer to startp array. */   static char **regendp; /* Ditto for endp. */      /*    * Forwards.    */ - STATIC int regtry(regexp *, char *); - STATIC int regmatch(char *); - STATIC ptrdiff_t regrepeat(char *); + static int regtry(regexp *, char *); + static int regmatch(char *); + static ptrdiff_t regrepeat(char *);      #ifdef PIKE_DEBUG   int regnarrate = 0;   void regdump(regexp *); - STATIC char *regprop(char *op); + static char *regprop(char *op);   #endif      /*    - regexec - match a regexp against a string    */   int pike_regexec(regexp *prog, char *string)   {    register char *s;       /* Be paranoid... */
pike.git/src/modules/Regexp/pike_regexp.c:1115:    return (NULL);       if (OP(p) == BACK)    return (p - offset);    else    return (p + offset);   }      #ifdef PIKE_DEBUG    - STATIC char *regprop(char *); + static char *regprop(char *);      /*    - regdump - dump a regexp onto stdout in vaguely comprehensible form    */   void regdump(regexp *r)   {    register char *s;    register char op = EXACTLY; /* Arbitrary non-END op. */    register char *nxt;