Return to gnum4.c CVS log | Up to [local] / src / usr.bin / m4 |
version 1.27, 2003/11/22 11:51:52 | version 1.28, 2004/11/07 10:26:18 | ||
---|---|---|---|
|
|
||
static char * | static char * | ||
twiddle(const char *p) | twiddle(const char *p) | ||
{ | { | ||
/* + at start of regexp is a normal character for Gnu m4 */ | |||
if (*p == '^') { | |||
addchar(*p); | |||
p++; | |||
} | |||
if (*p == '+') { | |||
addchar('\\'); | |||
} | |||
/* This could use strcspn for speed... */ | /* This could use strcspn for speed... */ | ||
while (*p != '\0') { | while (*p != '\0') { | ||
if (*p == '\\') { | if (*p == '\\') { |