X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=pcrs.c;h=5ce10bd96b47e7e2967935e0a18cfd1d559a50f1;hp=fcc73be664f084af5dd7b379874bb5b1c8158133;hb=54b4e8c141117d636f6113ec4c43579248b77ed7;hpb=e72b401da5537a14b29e945944926373cb251825 diff --git a/pcrs.c b/pcrs.c index fcc73be6..5ce10bd9 100644 --- a/pcrs.c +++ b/pcrs.c @@ -1,4 +1,4 @@ -const char pcrs_rcs[] = "$Id: pcrs.c,v 1.29 2007/09/22 16:17:19 fabiankeil Exp $"; +const char pcrs_rcs[] = "$Id: pcrs.c,v 1.34 2009/06/19 15:34:32 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/pcrs.c,v $ @@ -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; } @@ -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 @@ -682,7 +682,7 @@ int pcrs_execute_list(pcrs_job *joblist, char *subject, size_t subject_length, c old = subject; *result_length = subject_length; - hits = total_hits = 0; + total_hits = 0; for (job = joblist; job != NULL; job = job->next) { @@ -746,7 +746,7 @@ int pcrs_execute(pcrs_job *job, const char *subject, size_t subject_length, char pcrs_match *matches, *dummy; char *result_offset; - offset = i = k = 0; + offset = i = 0; /* * Sanity check & memory allocation @@ -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.