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

version» Context lines:

pike.git/src/modules/Regexp/pike_regexp.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: pike_regexp.c,v 1.24 2003/08/12 16:47:52 nilsson Exp $ + || $Id: pike_regexp.c,v 1.25 2003/12/06 15:09:08 nilsson 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.
pike.git/src/modules/Regexp/pike_regexp.c:307:    regcode = &regdummy;    if (reg(0, &flags) == (char *)NULL)    return ((regexp *)NULL);       /* Small enough for pointer-storage convention? */    if (regsize >= 32767L) /* Probably could be 65535L. */    FAIL("regexp too big");       /* Allocate space. */    r = (regexp *) xalloc(sizeof(regexp) + (unsigned) regsize); -  if (r == (regexp *) NULL) -  FAIL("out of space"); +        /* Second pass: emit code. */    regparse = exp2;    regnpar = 1;    regcode = r->program;    if (reg(0, &flags) == NULL)    return ((regexp *) NULL);       /* Dig out information for optimizations. */    r->regstart = '\0'; /* Worst-case defaults. */