-const char pcrs_rcs[] = "$Id: pcrs.c,v 1.38 2011/09/04 11:10:56 fabiankeil Exp $";
+const char pcrs_rcs[] = "$Id: pcrs.c,v 1.42 2012/05/24 15:04:34 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/pcrs.c,v $
*/
const int ascii_value = xtoi(&replacement[i+2]);
- assert(ascii_value > 0);
+ assert(ascii_value >= 0);
assert(ascii_value < 256);
text[k++] = (char)ascii_value;
i += 4;
result_offset,
subject + matches[i].submatch_offset[job->substitute->backref[k]],
matches[i].submatch_length[job->substitute->backref[k]]
- );
+ );
result_offset += matches[i].submatch_length[job->substitute->backref[k]];
}
}
* Some characters that are unlikely to
* be part of pcrs replacement strings.
*/
- char delimiters[] = "><§#+*~%^°-:;µ!@";
- char *d = delimiters;
+ static const char delimiters[] = "><#+*~%^-:;!@";
+ const char *d = delimiters;
/* Take the first delimiter that isn't part of the string */
while (*d && NULL != strchr(string, *d))