X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=filters.c;h=9ba16058c4b87196511d2d6059b2c166e2f07074;hb=475c90e2459bd79c5e76bfd12ec173c75d63b9b1;hp=b0dbd2dbe74c01eacdd8710be69209a137cd2947;hpb=c35324374411cae44d7c40dd8403e30ef53ea1f0;p=privoxy.git diff --git a/filters.c b/filters.c index b0dbd2db..9ba16058 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.30 2001/09/16 11:00:10 jongfoster Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.33 2001/09/16 17:05:14 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -38,6 +38,20 @@ const char filters_rcs[] = "$Id: filters.c,v 1.30 2001/09/16 11:00:10 jongfoster * * Revisions : * $Log: filters.c,v $ + * Revision 1.33 2001/09/16 17:05:14 jongfoster + * Removing unused #include showarg.h + * + * Revision 1.32 2001/09/16 13:21:27 jongfoster + * Changes to use new list functions. + * + * Revision 1.31 2001/09/16 11:38:02 jongfoster + * Splitting fill_template() into 2 functions: + * template_load() loads the file + * template_fill() performs the PCRS regexps. + * This is because the CGI edit interface has a "table row" + * template which is used many times in the page - this + * change means it's only loaded from disk once. + * * Revision 1.30 2001/09/16 11:00:10 jongfoster * New function alloc_http_response, for symmetry with free_http_response * @@ -283,12 +297,8 @@ const char filters_rcs[] = "$Id: filters.c,v 1.30 2001/09/16 11:00:10 jongfoster #include "project.h" #include "filters.h" #include "encode.h" -#include "jcc.h" -#include "showargs.h" #include "parsers.h" #include "ssplit.h" -#include "gateway.h" -#include "jbsockets.h" #include "errlog.h" #include "jbsockets.h" #include "miscutil.h" @@ -637,11 +647,11 @@ struct http_response *trust_url(struct client_state *csp) /* * Export the trust info, if available */ - if (csp->config->trust_info->next) + if (csp->config->trust_info->first) { - struct list *l; + struct list_entry *l; - for (l = csp->config->trust_info->next; l ; l = l->next) + for (l = csp->config->trust_info->first; l ; l = l->next) { sprintf(buf, "
  • %s
    \n",l->str, l->str); p = strsav(p, buf); @@ -955,7 +965,7 @@ int is_untrusted_url(struct client_state *csp) char *pcrs_filter_response(struct client_state *csp) { int hits=0; - int size = csp->iob->eod - csp->iob->cur; + size_t size; char *old = csp->iob->cur, *new = NULL; pcrs_job *job; @@ -964,10 +974,11 @@ char *pcrs_filter_response(struct client_state *csp) struct re_filterfile_spec *b; /* Sanity first ;-) */ - if (size <= 0) + if (csp->iob->cur >= csp->iob->eod) { return(NULL); } + size = csp->iob->eod - csp->iob->cur; if ( ( NULL == (fl = csp->rlist) ) || ( NULL == (b = fl->f) ) ) {