X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=pcrs.c;h=0f5145aa5f975dfd7b200d4dcf4cc51483af96e8;hp=2e0445207775d55615d2077872c424fe9f9d7e87;hb=fdf5690ceaae553e05cd4a71bc2ae4a55db4d3e3;hpb=94b88f2d5fb154b50a4f9f43a05fd5c765fcb4bb diff --git a/pcrs.c b/pcrs.c index 2e044520..0f5145aa 100644 --- a/pcrs.c +++ b/pcrs.c @@ -1,4 +1,4 @@ -const char pcrs_rcs[] = "$Id: pcrs.c,v 1.31 2009/05/19 17:42:32 fabiankeil Exp $"; +const char pcrs_rcs[] = "$Id: pcrs.c,v 1.36 2011/03/03 14:49:08 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/pcrs.c,v $ @@ -80,7 +80,7 @@ static int is_hex_sequence(const char *sequence); *********************************************************************/ const char *pcrs_strerror(const int error) { - if (error < 0) + if (error != 0) { switch (error) { @@ -348,7 +348,7 @@ static pcrs_substitute *pcrs_compile_replacement(const char *replacement, int tr } else /* $' or $` */ { - r->backref[l] = PCRS_MAX_SUBMATCHES + 1 - (symbol - symbols); + r->backref[l] = (int)(PCRS_MAX_SUBMATCHES + 1 - (symbol - symbols)); } i += 2; } @@ -397,7 +397,7 @@ plainchar: * Function : pcrs_free_job * * Description : Frees the memory used by a pcrs_job struct and its - * dependant structures. + * dependent structures. * * Parameters : * 1 : job = pointer to the pcrs_job structure to be freed @@ -481,7 +481,7 @@ pcrs_job *pcrs_compile_command(const char *command, int *errptr) char *tokens[4]; pcrs_job *newjob; - i = k = l = 0; + k = l = 0; /* * Tokenize the perl command @@ -1064,10 +1064,9 @@ static const char warning[] = "... [too long, truncated]"; * values of the variables and compiles it. * * Parameters : - * 1 : csp = Current client state (buffers, headers, etc...) - * 2 : pcrs_command = The dynamic pcrs command to compile - * 3 : v = NULL terminated array of variables and their values. - * 4 : error = pcrs error code + * 1 : pcrs_command = The dynamic pcrs command to compile + * 2 : v = NULL terminated array of variables and their values. + * 3 : error = pcrs error code * * Returns : NULL in case of hard errors, otherwise the * compiled pcrs job.