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.26 2006/07/09 22:09:45 nilsson Exp $ + || $Id: pike_regexp.c,v 1.27 2009/08/12 15:29:04 grubba 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:252:    register regexp *r;    register char *scan;    register char *longest;    register ptrdiff_t len;    int flags;    short *exp2,*dest,c;       if (exp == (char *)NULL)    FAIL("NULL argument");    -  exp2=(short*)xalloc( (strlen(exp)+1) * (sizeof(short[8])/sizeof(char[8])) ); +  exp2=(short*)xalloc( (strlen(exp)+1) * sizeof(short) );    for ( scan=exp,dest=exp2;( c= UCHARAT(scan++)); ) {    switch (c) {    case '(':    case ')':    *dest++ = excompat ? c : c | SPECIAL;    break;    case '.':    case '*':    case '+':    case '|':