X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=cgi.c;h=d2d6d93357a96084036133b07464edf378d34a45;hb=2543de391227e0a66d6e8865a69351085cb51d65;hp=55935c288fe61215a687f9910fbe7a5be99036c6;hpb=b28e9205bb0d4ac98d591c6e506219438799d56c;p=privoxy.git diff --git a/cgi.c b/cgi.c index 55935c28..d2d6d933 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -const char cgi_rcs[] = "$Id: cgi.c,v 1.8 2001/06/29 13:21:46 oes Exp $"; +const char cgi_rcs[] = "$Id: cgi.c,v 1.12 2001/07/29 18:47:05 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgi.c,v $ @@ -36,6 +36,18 @@ const char cgi_rcs[] = "$Id: cgi.c,v 1.8 2001/06/29 13:21:46 oes Exp $"; * * Revisions : * $Log: cgi.c,v $ + * Revision 1.12 2001/07/29 18:47:05 jongfoster + * Adding missing #include "loadcfg.h" + * + * Revision 1.11 2001/07/18 17:24:37 oes + * Changed to conform to new pcrs interface + * + * Revision 1.10 2001/07/13 13:53:13 oes + * Removed all #ifdef PCRS and related code + * + * Revision 1.9 2001/06/29 21:45:41 oes + * Indentation, CRLF->LF, Tab-> Space + * * Revision 1.8 2001/06/29 13:21:46 oes * - Cosmetics: renamed and reordered functions, variables, * texts, improved comments etc @@ -126,7 +138,6 @@ const char cgi_rcs[] = "$Id: cgi.c,v 1.8 2001/06/29 13:21:46 oes Exp $"; #include "project.h" #include "cgi.h" #include "list.h" -#include "pcrs.h" #include "encode.h" #include "ssplit.h" #include "jcc.h" @@ -135,6 +146,7 @@ const char cgi_rcs[] = "$Id: cgi.c,v 1.8 2001/06/29 13:21:46 oes Exp $"; #include "errlog.h" #include "miscutil.h" #include "showargs.h" +#include "loadcfg.h" const char cgi_h_rcs[] = CGI_H_VERSION; @@ -393,7 +405,6 @@ int cgi_show_status(struct client_state *csp, struct http_response *rsp, int i; struct map *exports = default_exports(csp, "show-status"); -#ifdef SPLIT_PROXY_ARGS FILE * fp; char buf[BUFFER_SIZE]; char * p; @@ -412,7 +423,6 @@ int cgi_show_status(struct client_state *csp, struct http_response *rsp, } break; -#ifdef PCRS case 'r': if (csp->rlist) { @@ -420,9 +430,8 @@ int cgi_show_status(struct client_state *csp, struct http_response *rsp, file_description = "Regex Filter List"; } break; -#endif /* def PCRS */ -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST case 't': if (csp->tlist) { @@ -430,7 +439,7 @@ int cgi_show_status(struct client_state *csp, struct http_response *rsp, file_description = "Trust List"; } break; -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ } if (NULL != filename) @@ -463,8 +472,6 @@ int cgi_show_status(struct client_state *csp, struct http_response *rsp, } -#endif /* def SPLIT_PROXY_ARGS */ - exports = map(exports, "redirect-url", 1, REDIRECT_URL, 1); s = NULL; @@ -481,13 +488,11 @@ int cgi_show_status(struct client_state *csp, struct http_response *rsp, s = show_defines(); exports = map(exports, "defines", 1, s, 0); -#ifdef STATISTICS +#ifdef FEATURE_STATISTICS exports = add_stats(exports); -#else +#else /* ndef FEATURE_STATISTICS */ exports = map_block_killer(exports, "statistics"); -#endif /* ndef STATISTICS */ - -#ifdef SPLIT_PROXY_ARGS +#endif /* ndef FEATURE_STATISTICS */ exports = map_block_killer(exports, "no-split-args"); @@ -500,7 +505,6 @@ int cgi_show_status(struct client_state *csp, struct http_response *rsp, exports = map(exports, "actions-filename", 1, "None specified", 1); } -#ifdef PCRS if (csp->rlist) { exports = map(exports, "re-filter-filename", 1, csp->rlist->filename, 1); @@ -509,11 +513,8 @@ int cgi_show_status(struct client_state *csp, struct http_response *rsp, { exports = map(exports, "re-filter-filename", 1, "None specified", 1); } -#else - exports = map_block_killer(exports, "pcrs-support"); -#endif /* ndef PCRS */ -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST if (csp->tlist) { exports = map(exports, "trust-filename", 1, csp->tlist->filename, 1); @@ -524,31 +525,7 @@ int cgi_show_status(struct client_state *csp, struct http_response *rsp, } #else exports = map_block_killer(exports, "trust-support"); -#endif /* ndef TRUST_FILES */ - -#else /* ifndef SPLIT_PROXY_ARGS */ - exports = map_block_killer(exports, "split-args"); - - if (csp->clist) - { - map(exports, "clist", 1, csp->clist->proxy_args , 1); - } - -#ifdef PCRS - if (csp->rlist) - { - map(exports, "rlist", 1, csp->rlist->proxy_args , 1); - } -#endif /* def PCRS */ - -#ifdef TRUST_FILES - if (csp->tlist) - { - map(exports, "tlist", 1, csp->tlist->proxy_args , 1); - } -#endif /* def TRUST_FILES */ - -#endif /* ndef SPLIT_PROXY_ARGS */ +#endif /* ndef FEATURE_TRUST */ rsp->body = fill_template(csp, "show-status", exports); free_map(exports); @@ -904,8 +881,8 @@ char *fill_template(struct client_state *csp, const char *template, struct map * /* Enclose name in @@ */ snprintf(buf, BUFFER_SIZE, "@%s@", m->name); - /* Make and chain in job */ - if ( NULL == (job = (pcrs_make_job(buf, m->value, "sigTU", &error))) ) + /* Make and chain job */ + if ( NULL == (job = (pcrs_compile(buf, m->value, "sigTU", &error))) ) { log_error(LOG_LEVEL_ERROR, "Error compiling template fill job %s: %d", m->name, error); } @@ -1101,7 +1078,7 @@ char *dump_map(struct map *map) } -#ifdef STATISTICS +#ifdef FEATURE_STATISTICS /********************************************************************* * * Function : add_stats @@ -1155,7 +1132,7 @@ struct map *add_stats(struct map *exports) return(exports); } -#endif /* def STATISTICS */ +#endif /* def FEATURE_STATISTICS */ /* Local Variables: