X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=pcrs.c;h=0750c00d56ca333bb26533462c80628f94baeff2;hp=c513251a2ed2c709e2486c624374759e8a28ce2b;hb=1da0126ec3dc5ad34e62815ca9040f5c76f9defe;hpb=0b3c51a627189ae9f63bdcd35fee5889feda50cc diff --git a/pcrs.c b/pcrs.c index c513251a..0750c00d 100644 --- a/pcrs.c +++ b/pcrs.c @@ -1,4 +1,4 @@ -const char pcrs_rcs[] = "$Id: pcrs.c,v 1.32 2009/05/19 17:44:22 fabiankeil Exp $"; +const char pcrs_rcs[] = "$Id: pcrs.c,v 1.35 2009/08/19 15:28: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; } @@ -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.