From: jongfoster Date: Mon, 30 Jul 2001 22:08:36 +0000 (+0000) Subject: Tidying up #defines: X-Git-Tag: v_2_9_9~180 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=536a88ebe11300228987eaa39ef4bbd63cd0e1ba Tidying up #defines: - All feature #defines are now of the form FEATURE_xxx - Permanently turned off WIN_GUI_EDIT - Permanently turned on WEBDAV and SPLIT_PROXY_ARGS --- diff --git a/acconfig.h b/acconfig.h index 3ff1275d..e8cd05bd 100644 --- a/acconfig.h +++ b/acconfig.h @@ -37,6 +37,11 @@ * * Revisions : * $Log: acconfig.h,v $ + * Revision 1.9 2001/07/29 19:08:52 jongfoster + * Changing _CONFIG_H to CONFIG_H_INCLUDED. + * Also added protection against using a MinGW32 or CygWin version of + * config.h from within MS Visual C++ + * * Revision 1.8 2001/07/29 17:09:17 jongfoster * Major changes to build system in order to fix these bugs: * - pthreads under Linux was broken - changed -lpthread to -pthread @@ -163,7 +168,7 @@ #undef VERSION /* - * Status of the code: alpha, beta or stable + * Status of the code: "alpha", "beta" or "stable". */ #undef CODE_STATUS @@ -192,57 +197,46 @@ #undef STATIC_PCRS /* - * Allow JunkBuster to be "disabled" so it is just a normal non-blocking - * non-anonymizing proxy. This is useful if you're trying to access a - * blocked or broken site - just change the setting in the config file - * and send a SIGHUP (UN*X), or use the handy "Disable" menu option (Windows - * GUI). + * Allows the use of an ACL to control access to the proxy by IP address. */ -#undef TOGGLE +#undef FEATURE_ACL /* - * If a stream is compressed via gzip (Netscape specific I think), then - * it cannot be modified with Perl regexps. This forces it to be - * uncompressed. - */ -#undef DENY_GZIP - -/* - * Enables statistics function. + * Allows the use of jar files to capture cookies. */ -#undef STATISTICS +#undef FEATURE_COOKIE_JAR /* - * Bypass filtering for 1 page only + * If a stream is compressed via gzip, then it cannot be filtered through + * the PCRE regexps. (Commonly happens with Netscape browsers). + * This forces it to be uncompressed. */ -#undef FORCE_LOAD +#undef FEATURE_DENY_GZIP /* * Locally redirect remote script-redirect URLs */ -#undef FAST_REDIRECTS +#undef FEATURE_FAST_REDIRECTS /* - * Split the show-proxy-args page into a page for each config file. - */ -#undef SPLIT_PROXY_ARGS - -/* - * Kills JavaScript popups - window.open, onunload, etc. + * Bypass filtering for 1 page only */ -#undef KILLPOPUPS +#undef FEATURE_FORCE_LOAD /* - * Support for webDAV - e.g. so Microsoft Outlook can access HotMail e-mail + * Allow blocking using images as well as HTML. + * If you do not define this then everything is blocked as HTML. + * + * Note that this is required if you want to use FEATURE_IMAGE_DETECT_MSIE. */ -#undef WEBDAV +#undef FEATURE_IMAGE_BLOCKING /* * Detect image requests automatically for MSIE. Will fall back to * other image-detection methods (i.e. "+image" permission) for other * browsers. * - * You must also define IMAGE_BLOCKING to use this feature. + * You must also define FEATURE_IMAGE_BLOCKING to use this feature. * * It detects the following header pair as an image request: * @@ -267,42 +261,35 @@ * These limitations are due to IE making inconsistent choices * about which "Accept:" header to send. */ -#undef DETECT_MSIE_IMAGES +#undef FEATURE_IMAGE_DETECT_MSIE /* - * Allow blocking using images as well as HTML. - * If you do not define this then everything is blocked as HTML. - * - * Note that this is required if you want to use DETECT_MSIE_IMAGES. - */ -#undef IMAGE_BLOCKING - -/* - * Allows the use of ACL files to control access to the proxy by IP address. + * Kills JavaScript popups - window.open, onunload, etc. */ -#undef ACL_FILES +#undef FEATURE_KILL_POPUPS /* - * Allows the use of trust files. + * Use POSIX threads instead of native threads. */ -#undef TRUST_FILES +#undef FEATURE_PTHREAD /* - * Allows the use of jar files to capture cookies. + * Enables statistics function. */ -#undef JAR_FILES +#undef FEATURE_STATISTICS /* - * Define this to use the Windows GUI for editing the blocklist. - * FIXME: This feature is only partially implemented and does not work - * FIXME: This #define can never be set by ./configure. + * Allow JunkBuster to be "disabled" so it is just a normal non-blocking + * non-anonymizing proxy. This is useful if you're trying to access a + * blocked or broken site - just change the setting in the config file, + * or use the handy "Disable" menu option in the Windows GUI. */ -#undef WIN_GUI_EDIT +#undef FEATURE_TOGGLE /* - * Use POSIX threads instead of native threads. + * Allows the use of trust files. */ -#undef FEATURE_PTHREAD +#undef FEATURE_TRUST /* * Defined on Solaris only. Makes the system libraries thread safe. diff --git a/actions.c b/actions.c index e4e5aaf2..d8c6c6b3 100644 --- a/actions.c +++ b/actions.c @@ -1,4 +1,4 @@ -const char actions_rcs[] = "$Id: actions.c,v 1.7 2001/06/09 10:55:28 jongfoster Exp $"; +const char actions_rcs[] = "$Id: actions.c,v 1.8 2001/06/29 13:19:52 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/actions.c,v $ @@ -33,6 +33,9 @@ const char actions_rcs[] = "$Id: actions.c,v 1.7 2001/06/09 10:55:28 jongfoster * * Revisions : * $Log: actions.c,v $ + * Revision 1.8 2001/06/29 13:19:52 oes + * Removed logentry from cancelled commit + * * Revision 1.7 2001/06/09 10:55:28 jongfoster * Changing BUFSIZ ==> BUFFER_SIZE * @@ -1139,13 +1142,6 @@ int load_actions_file(struct client_state *csp) alias_list = next; } -#ifndef SPLIT_PROXY_ARGS - if (!suppress_blocklists) - { - fs->proxy_args = strsav(fs->proxy_args, ""); - } -#endif /* ndef SPLIT_PROXY_ARGS */ - /* the old one is now obsolete */ if (current_actions_file) { diff --git a/cgi.c b/cgi.c index 727b4553..d2d6d933 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -const char cgi_rcs[] = "$Id: cgi.c,v 1.11 2001/07/18 17:24:37 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,9 @@ const char cgi_rcs[] = "$Id: cgi.c,v 1.11 2001/07/18 17:24:37 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 * @@ -402,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; @@ -429,7 +431,7 @@ int cgi_show_status(struct client_state *csp, struct http_response *rsp, } break; -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST case 't': if (csp->tlist) { @@ -437,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) @@ -470,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; @@ -488,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"); @@ -516,7 +514,7 @@ int cgi_show_status(struct client_state *csp, struct http_response *rsp, exports = map(exports, "re-filter-filename", 1, "None specified", 1); } -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST if (csp->tlist) { exports = map(exports, "trust-filename", 1, csp->tlist->filename, 1); @@ -527,29 +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); - } - - if (csp->rlist) - { - map(exports, "rlist", 1, csp->rlist->proxy_args , 1); - } - -#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); @@ -1102,7 +1078,7 @@ char *dump_map(struct map *map) } -#ifdef STATISTICS +#ifdef FEATURE_STATISTICS /********************************************************************* * * Function : add_stats @@ -1156,7 +1132,7 @@ struct map *add_stats(struct map *exports) return(exports); } -#endif /* def STATISTICS */ +#endif /* def FEATURE_STATISTICS */ /* Local Variables: diff --git a/cgi.h b/cgi.h index dfdfa459..9613bfd2 100644 --- a/cgi.h +++ b/cgi.h @@ -1,6 +1,6 @@ #ifndef CGI_H_INCLUDED #define CGI_H_INCLUDED -#define CGI_H_VERSION "$Id: cgi.h,v 1.6 2001/06/29 21:45:41 oes Exp $" +#define CGI_H_VERSION "$Id: cgi.h,v 1.7 2001/07/29 18:43:08 jongfoster Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgi.h,v $ @@ -38,6 +38,10 @@ * * Revisions : * $Log: cgi.h,v $ + * Revision 1.7 2001/07/29 18:43:08 jongfoster + * Changing #ifdef _FILENAME_H to FILENAME_H_INCLUDED, to conform to + * ANSI C rules. + * * Revision 1.6 2001/06/29 21:45:41 oes * Indentation, CRLF->LF, Tab-> Space * @@ -105,9 +109,9 @@ extern char *fill_template(struct client_state *csp, const char *template, struc extern char *make_menu(const char *self); extern char *dump_map(struct map *map); -#ifdef STATISTICS +#ifdef FEATURE_STATISTICS extern struct map *add_stats(struct map *exports); -#endif /* def STATISTICS */ +#endif /* def FEATURE_STATISTICS */ /* diff --git a/errlog.c b/errlog.c index ffc49209..76ad1fd3 100644 --- a/errlog.c +++ b/errlog.c @@ -1,4 +1,4 @@ -const char errlog_rcs[] = "$Id: errlog.c,v 1.14 2001/07/19 19:03:48 haroon Exp $"; +const char errlog_rcs[] = "$Id: errlog.c,v 1.15 2001/07/29 17:41:10 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/errlog.c,v $ @@ -33,6 +33,9 @@ const char errlog_rcs[] = "$Id: errlog.c,v 1.14 2001/07/19 19:03:48 haroon Exp $ * * Revisions : * $Log: errlog.c,v $ + * Revision 1.15 2001/07/29 17:41:10 jongfoster + * Now prints thread ID for each message (pthreads only) + * * Revision 1.14 2001/07/19 19:03:48 haroon * - Added case for LOG_LEVEL_POPUPS * @@ -332,16 +335,16 @@ void log_error(int loglevel, char *fmt, ...) case LOG_LEVEL_RE_FILTER: outc = sprintf(outbuf, "IJB(%d) Re-Filter: ", this_thread); break; -#ifdef FORCE_LOAD +#ifdef FEATURE_FORCE_LOAD case LOG_LEVEL_FORCE: outc = sprintf(outbuf, "IJB(%d) Force: ", this_thread); break; -#endif /* def FORCE_LOAD */ -#ifdef FAST_REDIRECTS +#endif /* def FEATURE_FORCE_LOAD */ +#ifdef FEATURE_FAST_REDIRECTS case LOG_LEVEL_REDIRECTS: outc = sprintf(outbuf, "IJB(%d) Redirect: ", this_thread); break; -#endif /* def FAST_REDIRECTS */ +#endif /* def FEATURE_FAST_REDIRECTS */ case LOG_LEVEL_DEANIMATE: outc = sprintf(outbuf, "IJB(%d) Gif-Deanimate: ", this_thread); break; @@ -349,11 +352,11 @@ void log_error(int loglevel, char *fmt, ...) outc = 0; outbuf[0] = '\0'; break; -#ifdef KILLPOPUPS +#ifdef FEATURE_KILL_POPUPS case LOG_LEVEL_POPUPS: outc = sprintf(outbuf, "IJB(%d) Kill-Popups: ", this_thread); break; -#endif /* def KILLPOPUPS */ +#endif /* def FEATURE_KILL_POPUPS */ default: outc = sprintf(outbuf, "IJB(%d) UNKNOWN LOG TYPE(%d): ", this_thread, loglevel); break; diff --git a/errlog.h b/errlog.h index 207d67ea..fc716185 100644 --- a/errlog.h +++ b/errlog.h @@ -1,6 +1,6 @@ #ifndef ERRLOG_H_INCLUDED #define ERRLOG_H_INCLUDED -#define ERRLOG_H_VERSION "$Id: errlog.h,v 1.7 2001/07/19 19:02:53 haroon Exp $" +#define ERRLOG_H_VERSION "$Id: errlog.h,v 1.8 2001/07/29 18:43:08 jongfoster Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/errlog.h,v $ @@ -35,6 +35,10 @@ * * Revisions : * $Log: errlog.h,v $ + * Revision 1.8 2001/07/29 18:43:08 jongfoster + * Changing #ifdef _FILENAME_H to FILENAME_H_INCLUDED, to conform to + * ANSI C rules. + * * Revision 1.7 2001/07/19 19:02:53 haroon * Added define for LOG_LEVEL_POPUPS * @@ -116,19 +120,19 @@ extern "C" { #define LOG_LEVEL_IO 0x0004 #define LOG_LEVEL_HEADER 0x0008 #define LOG_LEVEL_LOG 0x0010 -#ifdef FORCE_LOAD +#ifdef FEATURE_FORCE_LOAD #define LOG_LEVEL_FORCE 0x0020 -#endif /* def FORCE_LOAD */ +#endif /* def FEATURE_FORCE_LOAD */ #define LOG_LEVEL_RE_FILTER 0x0040 -#ifdef FAST_REDIRECTS +#ifdef FEATURE_FAST_REDIRECTS #define LOG_LEVEL_REDIRECTS 0x0080 -#endif /* def FAST_REDIRECTS */ +#endif /* def FEATURE_FAST_REDIRECTS */ #define LOG_LEVEL_DEANIMATE 0x0100 #define LOG_LEVEL_CLF 0x0200 /* Common Log File format */ -#ifdef KILLPOPUPS +#ifdef FEATURE_KILL_POPUPS #define LOG_LEVEL_POPUPS 0x0400 /* Kill Popups */ -#endif /* def KILLPOPUPS */ +#endif /* def FEATURE_KILL_POPUPS */ /* Following are always on: */ #define LOG_LEVEL_INFO 0x1000 diff --git a/filters.c b/filters.c index e268d6dd..c9448fd2 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.24 2001/07/25 17:22:51 oes Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.25 2001/07/26 10:09:46 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -38,6 +38,9 @@ const char filters_rcs[] = "$Id: filters.c,v 1.24 2001/07/25 17:22:51 oes Exp $" * * Revisions : * $Log: filters.c,v $ + * Revision 1.25 2001/07/26 10:09:46 oes + * Made browser detection a little less naive + * * Revision 1.24 2001/07/25 17:22:51 oes * Added workaround for Netscape bug that prevents display of page when loading a component fails. * @@ -286,7 +289,7 @@ const char filters_h_rcs[] = FILTERS_H_VERSION; #define ijb_isdigit(__X) isdigit((int)(unsigned char)(__X)) -#ifdef ACL_FILES +#ifdef FEATURE_ACL /********************************************************************* * * Function : block_acl @@ -420,7 +423,7 @@ int acl_addr(char *aspec, struct access_control_addr *aca) return(0); } -#endif /* def ACL_FILES */ +#endif /* def FEATURE_ACL */ /********************************************************************* @@ -437,7 +440,9 @@ int acl_addr(char *aspec, struct access_control_addr *aca) *********************************************************************/ struct http_response *block_url(struct client_state *csp) { +#ifdef FEATURE_IMAGE_BLOCKING char *p; +#endif /* def FEATURE_IMAGE_BLOCKING */ struct http_response *rsp; struct map *exports = NULL; @@ -461,7 +466,7 @@ struct http_response *block_url(struct client_state *csp) * If it's an image-url, send back an image or redirect * as specified by the relevant +image action */ -#ifdef IMAGE_BLOCKING +#ifdef FEATURE_IMAGE_BLOCKING if (((csp->action->flags & ACTION_IMAGE_BLOCKER) != 0) && is_imageurl(csp)) { @@ -490,7 +495,7 @@ struct http_response *block_url(struct client_state *csp) } } else -#endif /* def IMAGE_BLOCKING */ +#endif /* def FEATURE_IMAGE_BLOCKING */ /* * Else, generate an HTML "blocked" message: @@ -498,11 +503,11 @@ struct http_response *block_url(struct client_state *csp) { exports = default_exports(csp, NULL); -#ifdef FORCE_LOAD +#ifdef FEATURE_FORCE_LOAD exports = map(exports, "force-prefix", 1, FORCE_PREFIX, 1); -#else +#else /* ifndef FEATURE_FORCE_LOAD */ exports = map_block_killer(exports, "force-support"); -#endif /* ndef FORCE_LOAD */ +#endif /* ndef FEATURE_FORCE_LOAD */ exports = map(exports, "hostport", 1, csp->http->hostport, 1); exports = map(exports, "hostport-html", 1, html_encode(csp->http->hostport), 0); @@ -537,7 +542,7 @@ struct http_response *block_url(struct client_state *csp) } -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST /********************************************************************* * * Function : trust_url FIXME: I should be called distrust_url @@ -627,11 +632,11 @@ struct http_response *trust_url(struct client_state *csp) /* * Export the force prefix or the force conditional block killer */ -#ifdef FORCE_LOAD +#ifdef FEATURE_FORCE_LOAD exports = map(exports, "force-prefix", 1, FORCE_PREFIX, 1); -#else +#else /* ifndef FEATURE_FORCE_LOAD */ exports = map_block_killer(exports, "force-support"); -#endif /* ndef FORCE_LOAD */ +#endif /* ndef FEATURE_FORCE_LOAD */ /* * Build the response @@ -642,10 +647,10 @@ struct http_response *trust_url(struct client_state *csp) return(finish_http_response(rsp)); } -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ -#ifdef FAST_REDIRECTS +#ifdef FEATURE_FAST_REDIRECTS /********************************************************************* * * Function : redirect_url @@ -698,18 +703,18 @@ struct http_response *redirect_url(struct client_state *csp) } } -#endif /* def FAST_REDIRECTS */ +#endif /* def FEATURE_FAST_REDIRECTS */ -#ifdef IMAGE_BLOCKING +#ifdef FEATURE_IMAGE_BLOCKING /********************************************************************* * * Function : is_imageurl * * Description : Given a URL, decide whether it is an image or not, * using either the info from a previous +image action - * or, #ifdef DETECT_MSIE_IMAGES, the info from the - * browser's accept header. + * or, #ifdef FEATURE_IMAGE_DETECT_MSIE, the info from + * the browser's accept header. * * Parameters : * 1 : csp = Current client state (buffers, headers, etc...) @@ -720,7 +725,7 @@ struct http_response *redirect_url(struct client_state *csp) *********************************************************************/ int is_imageurl(struct client_state *csp) { -#ifdef DETECT_MSIE_IMAGES +#ifdef FEATURE_IMAGE_DETECT_MSIE if ((csp->accept_types & (ACCEPT_TYPE_IS_MSIE|ACCEPT_TYPE_MSIE_IMAGE|ACCEPT_TYPE_MSIE_HTML)) == (ACCEPT_TYPE_IS_MSIE|ACCEPT_TYPE_MSIE_IMAGE)) @@ -733,15 +738,15 @@ int is_imageurl(struct client_state *csp) { return 0; } -#endif +#endif /* def FEATURE_IMAGE_DETECT_MSIE */ return ((csp->action->flags & ACTION_IMAGE) != 0); } -#endif /* def IMAGE_BLOCKING */ +#endif /* def FEATURE_IMAGE_BLOCKING */ -#ifdef TRUST_FILES +#ifdef FEATURE_COOKIE_JAR /********************************************************************* * * Function : is_untrusted_url @@ -903,7 +908,7 @@ int is_untrusted_url(struct client_state *csp) } return(1); } -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_COOKIE_JAR */ /********************************************************************* diff --git a/filters.h b/filters.h index 27a00f61..883f8750 100644 --- a/filters.h +++ b/filters.h @@ -1,6 +1,6 @@ #ifndef FILTERS_H_INCLUDED #define FILTERS_H_INCLUDED -#define FILTERS_H_VERSION "$Id: filters.h,v 1.11 2001/07/13 14:00:18 oes Exp $" +#define FILTERS_H_VERSION "$Id: filters.h,v 1.12 2001/07/29 19:01:11 jongfoster Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.h,v $ @@ -40,6 +40,10 @@ * * Revisions : * $Log: filters.h,v $ + * Revision 1.12 2001/07/29 19:01:11 jongfoster + * Changed _FILENAME_H to FILENAME_H_INCLUDED. + * Added forward declarations for needed structures. + * * Revision 1.11 2001/07/13 14:00:18 oes * - Introduced gif_deanimate_response * - Renamed re_process_buffer to pcrs_filter_response @@ -184,29 +188,29 @@ struct url_spec; /* * ACL checking */ -#ifdef ACL_FILES +#ifdef FEATURE_ACL extern int block_acl(struct access_control_addr *dst, struct client_state *csp); extern int acl_addr(char *aspec, struct access_control_addr *aca); -#endif /* def ACL_FILES */ +#endif /* def FEATURE_ACL */ /* * Interceptors */ extern struct http_response *block_url(struct client_state *csp); extern struct http_response *redirect_url(struct client_state *csp); -#ifdef TRUST_FILES +#ifdef FEATURE_COOKIE_JAR extern struct http_response *trust_url(struct client_state *csp); -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_COOKIE_JAR */ /* * Request inspectors */ -#ifdef TRUST_FILES +#ifdef FEATURE_COOKIE_JAR extern int is_untrusted_url(struct client_state *csp); -#endif /* def TRUST_FILES */ -#ifdef IMAGE_BLOCKING +#endif /* def FEATURE_COOKIE_JAR */ +#ifdef FEATURE_IMAGE_BLOCKING extern int is_imageurl(struct client_state *csp); -#endif /* def IMAGE_BLOCKING */ +#endif /* def FEATURE_IMAGE_BLOCKING */ /* * Determining applicable actions diff --git a/jbsockets.c b/jbsockets.c index 5da793e1..72848203 100644 --- a/jbsockets.c +++ b/jbsockets.c @@ -1,4 +1,4 @@ -const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.14 2001/07/18 13:47:59 oes Exp $"; +const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.15 2001/07/29 17:40:43 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $ @@ -35,6 +35,9 @@ const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.14 2001/07/18 13:47:59 oes Ex * * Revisions : * $Log: jbsockets.c,v $ + * Revision 1.15 2001/07/29 17:40:43 jongfoster + * Fixed compiler warning by adding a cast + * * Revision 1.14 2001/07/18 13:47:59 oes * Eliminated dirty hack for getsockbyname() * @@ -152,9 +155,9 @@ int connect_to(const char *host, int portnum, struct client_state *csp) int flags; #endif /* !defined(_WIN32) && !defined(__BEOS__) && !defined(AMIGA) */ -#ifdef ACL_FILES +#ifdef FEATURE_ACL struct access_control_addr dst[1]; -#endif /* def ACL_FILES */ +#endif /* def FEATURE_ACL */ memset((char *)&inaddr, 0, sizeof inaddr); @@ -164,7 +167,7 @@ int connect_to(const char *host, int portnum, struct client_state *csp) return(-1); } -#ifdef ACL_FILES +#ifdef FEATURE_ACL dst->addr = ntohl(addr); dst->port = portnum; @@ -173,7 +176,7 @@ int connect_to(const char *host, int portnum, struct client_state *csp) errno = EPERM; return(-1); } -#endif /* def ACL_FILES */ +#endif /* def FEATURE_ACL */ inaddr.sin_addr.s_addr = addr; inaddr.sin_family = AF_INET; diff --git a/jcc.c b/jcc.c index 308c5e3c..aadc2039 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.32 2001/07/29 18:47:05 jongfoster Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.33 2001/07/29 19:32:00 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -33,6 +33,9 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.32 2001/07/29 18:47:05 jongfoster Exp $"; * * Revisions : * $Log: jcc.c,v $ + * Revision 1.33 2001/07/29 19:32:00 jongfoster + * Renaming _main() [mingw32 only] to real_main(), for ANSI compliance. + * * Revision 1.32 2001/07/29 18:47:05 jongfoster * Adding missing #include "loadcfg.h" * @@ -331,10 +334,10 @@ const char project_h_rcs[] = PROJECT_H_VERSION; struct client_state clients[1]; struct file_list files[1]; -#ifdef STATISTICS +#ifdef FEATURE_STATISTICS int urls_read = 0; /* total nr of urls read inc rejected */ int urls_rejected = 0; /* total nr of urls rejected */ -#endif /* def STATISTICS */ +#endif /* def FEATURE_STATISTICS */ static void listen_loop(void); @@ -389,20 +392,21 @@ static const char VANILLA_WAFER[] = static void chat(struct client_state *csp) { /* - * This next lines are a little ugly, but they simplifies the if statements below. - * Basically if TOGGLE, then we want the if to test "csp->toggled_on", else we don't - * And if FORCE_LOAD, then we want the if to test "csp->toggled_on", else we don't + * This next lines are a little ugly, but they simplifies the if statements + * below. Basically if TOGGLE, then we want the if to test "csp->toggled_on", + * else we don't. And if FEATURE_FORCE_LOAD, then we want the if to test + * "csp->toggled_on", else we don't */ -#ifdef TOGGLE +#ifdef FEATURE_TOGGLE # define IS_TOGGLED_ON_AND (csp->toggled_on) && -#else /* ifndef TOGGLE */ +#else /* ifndef FEATURE_TOGGLE */ # define IS_TOGGLED_ON_AND -#endif /* ndef TOGGLE */ -#ifdef FORCE_LOAD +#endif /* ndef FEATURE_TOGGLE */ +#ifdef FEATURE_FORCE_LOAD # define IS_NOT_FORCED_AND (!csp->force) && -#else /* ifndef FORCE_LOAD */ +#else /* ifndef FEATURE_FORCE_LOAD */ # define IS_NOT_FORCED_AND -#endif /* def FORCE_LOAD */ +#endif /* def FEATURE_FORCE_LOAD */ #define IS_ENABLED_AND IS_TOGGLED_ON_AND IS_NOT_FORCED_AND @@ -415,10 +419,10 @@ static void chat(struct client_state *csp) int byte_count = 0; const struct forward_spec * fwd; struct http_request *http; -#ifdef KILLPOPUPS +#ifdef FEATURE_KILL_POPUPS int block_popups; /* bool, 1==will block popups */ int block_popups_now = 0; /* bool, 1==currently blocking popups */ -#endif /* def KILLPOPUPS */ +#endif /* def FEATURE_KILL_POPUPS */ int pcrs_filter; /* bool, 1==will filter through pcrs */ int gif_deanimate; /* bool, 1==will deanimate gifs */ @@ -456,7 +460,7 @@ static void chat(struct client_state *csp) continue; /* more to come! */ } -#ifdef FORCE_LOAD +#ifdef FEATURE_FORCE_LOAD /* If this request contains the FORCE_PREFIX, * better get rid of it now and set the force flag --oes */ @@ -471,7 +475,7 @@ static void chat(struct client_state *csp) { csp->force = 0; } -#endif /* def FORCE_LOAD */ +#endif /* def FEATURE_FORCE_LOAD */ parse_http_request(req, http, csp); freez(req); @@ -544,19 +548,19 @@ static void chat(struct client_state *csp) /* decide what we're to do with cookies */ -#ifdef TOGGLE +#ifdef FEATURE_TOGGLE if (!csp->toggled_on) { /* Most compatible set of actions (i.e. none) */ init_current_action(csp->action); } else -#endif /* ndef TOGGLE */ +#endif /* ndef FEATURE_TOGGLE */ { url_actions(http, csp); } -#ifdef JAR_FILES +#ifdef FEATURE_COOKIE_JAR /* * If we're logging cookies in a cookie jar, and the user has not * supplied any wafers, and the user has not told us to suppress the @@ -568,11 +572,11 @@ static void chat(struct client_state *csp) { enlist(csp->action->multi[ACTION_MULTI_WAFER], VANILLA_WAFER); } -#endif /* def JAR_FILES */ +#endif /* def FEATURE_COOKIE_JAR */ -#ifdef KILLPOPUPS +#ifdef FEATURE_KILL_POPUPS block_popups = ((csp->action->flags & ACTION_NO_POPUPS) != 0); -#endif /* def KILLPOPUPS */ +#endif /* def FEATURE_KILL_POPUPS */ pcrs_filter = (csp->rlist != NULL) && /* There are expressions to be used */ ((csp->action->flags & ACTION_FILTER) != 0); @@ -622,15 +626,15 @@ static void chat(struct client_state *csp) ( NULL != (rsp = block_url(csp))) /* ..or untrusted */ -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST || ( NULL != (rsp = trust_url(csp))) -#endif +#endif /* def FEATURE_TRUST */ /* ..or a fast redirect kicked in */ -#ifdef FAST_REDIRECTS +#ifdef FEATURE_FAST_REDIRECTS || (((csp->action->flags & ACTION_FAST_REDIRECTS) != 0) && (NULL != (rsp = redirect_url(csp)))) -#endif /* def FAST_REDIRECTS */ +#endif /* def FEATURE_FAST_REDIRECTS */ )) ) { @@ -641,10 +645,10 @@ static void chat(struct client_state *csp) log_error(LOG_LEVEL_ERROR, "write to: %s failed: %E", http->host); } -#ifdef STATISTICS +#ifdef FEATURE_STATISTICS /* Count as a rejected request */ csp->rejected = 1; -#endif /* def STATISTICS */ +#endif /* def FEATURE_STATISTICS */ /* Log (FIXME: All intercept reasons apprear as "crunch" with Status 200) */ log_error(LOG_LEVEL_GPC, "%s%s crunch!", http->hostport, http->path); @@ -846,13 +850,13 @@ static void chat(struct client_state *csp) */ buf[n] = '\0'; -#ifdef KILLPOPUPS +#ifdef FEATURE_KILL_POPUPS /* Filter the popups on this read. */ if (block_popups_now) { filter_popups(buf, n); } -#endif /* def KILLPOPUPS */ +#endif /* def FEATURE_KILL_POPUPS */ /* Normally, this would indicate that we've read * as much as the server has sent us and we can @@ -1012,7 +1016,7 @@ static void chat(struct client_state *csp) * may be in the buffer) */ -#ifdef KILLPOPUPS +#ifdef FEATURE_KILL_POPUPS /* Start blocking popups if appropriate. */ if ((csp->content_type & CT_TEXT) && /* It's a text / * MIME-Type */ @@ -1027,7 +1031,7 @@ static void chat(struct client_state *csp) filter_popups(csp->iob->cur, csp->iob->eod - csp->iob->cur); } -#endif /* def KILLPOPUPS */ +#endif /* def FEATURE_KILL_POPUPS */ /* Buffer and pcrs filter this if appropriate. */ @@ -1360,10 +1364,10 @@ static void listen_loop(void) log_error(LOG_LEVEL_CONNECT, "OK"); } -#if defined(TOGGLE) +#ifdef FEATURE_TOGGLE /* by haroon - most of credit to srt19170 */ csp->toggled_on = g_bToggleIJB; -#endif +#endif /* def FEATURE_TOGGLE */ if (run_loader(csp)) { @@ -1371,7 +1375,7 @@ static void listen_loop(void) /* Never get here - LOG_LEVEL_FATAL causes program exit */ } -#ifdef ACL_FILES +#ifdef FEATURE_ACL if (block_acl(NULL,csp)) { log_error(LOG_LEVEL_CONNECT, "Connection dropped due to ACL"); @@ -1379,7 +1383,7 @@ static void listen_loop(void) freez(csp); continue; } -#endif /* def ACL_FILES */ +#endif /* def FEATURE_ACL */ /* add it to the list of clients */ csp->next = clients->next; diff --git a/jcc.h b/jcc.h index 56e6724a..f3ee7344 100644 --- a/jcc.h +++ b/jcc.h @@ -1,6 +1,6 @@ #ifndef JCC_H_INCLUDED #define JCC_H_INCLUDED -#define JCC_H_VERSION "$Id: jcc.h,v 1.4 2001/07/29 18:58:15 jongfoster Exp $" +#define JCC_H_VERSION "$Id: jcc.h,v 1.5 2001/07/29 19:32:00 jongfoster Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.h,v $ @@ -35,6 +35,9 @@ * * Revisions : * $Log: jcc.h,v $ + * Revision 1.5 2001/07/29 19:32:00 jongfoster + * Renaming _main() [mingw32 only] to real_main(), for ANSI compliance. + * * Revision 1.4 2001/07/29 18:58:15 jongfoster * Removing nested #includes, adding forward declarations for needed * structures, and changing the #define _FILENAME_H to FILENAME_H_INCLUDED. @@ -65,10 +68,10 @@ struct file_list; /* Global variables */ -#ifdef STATISTICS +#ifdef FEATURE_STATISTICS extern int urls_read; extern int urls_rejected; -#endif /*def STATISTICS*/ +#endif /*def FEATURE_STATISTICS*/ extern struct client_state clients[]; diff --git a/killpopup.c b/killpopup.c index f191b08e..77126ce6 100644 --- a/killpopup.c +++ b/killpopup.c @@ -1,4 +1,4 @@ -const char killpopup_rcs[] = "$Id: killpopup.c,v 1.6 2001/07/19 19:11:35 haroon Exp $"; +const char killpopup_rcs[] = "$Id: killpopup.c,v 1.7 2001/07/20 19:29:25 haroon Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/killpopup.c,v $ @@ -32,6 +32,12 @@ const char killpopup_rcs[] = "$Id: killpopup.c,v 1.6 2001/07/19 19:11:35 haroon * * Revisions : * $Log: killpopup.c,v $ + * Revision 1.7 2001/07/20 19:29:25 haroon + * - In v1.5 forgot to add that I implemented LOG_LEVEL_POPUPS in errlog.c, + * errlog.h and killpopup.c. In that case, it is superfluous to have define for + * POPUP_VERBOSE, so I removed the defines and logging is now done + * via log_error(LOG_LEVEL_POPUPS, ....) + * * Revision 1.6 2001/07/19 19:11:35 haroon * - Implemented Guy's idea of replacing window.open( with 1;''.concat( * - Implemented Guy's idea of replacing .resizeTo( with .scrollTo( @@ -87,7 +93,7 @@ const char killpopup_rcs[] = "$Id: killpopup.c,v 1.6 2001/07/19 19:11:35 haroon const char killpopup_h_rcs[] = KILLPOPUP_H_VERSION; -#ifdef KILLPOPUPS +#ifdef FEATURE_KILL_POPUPS /********************************************************************* * @@ -163,7 +169,7 @@ void filter_popups(char *buff, int size) } -#endif /* def KILLPOPUPS */ +#endif /* def FEATURE_KILL_POPUPS */ /* Local Variables: diff --git a/killpopup.h b/killpopup.h index 7e3fb879..78a75288 100644 --- a/killpopup.h +++ b/killpopup.h @@ -1,6 +1,6 @@ #ifndef KILLPOPUP_H_INCLUDED #define KILLPOPUP_H_INCLUDED -#define KILLPOPUP_H_VERSION "$Id: killpopup.h,v 1.2 2001/05/20 01:21:20 jongfoster Exp $" +#define KILLPOPUP_H_VERSION "$Id: killpopup.h,v 1.3 2001/07/29 18:59:21 jongfoster Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/killpopup.h,v $ @@ -34,6 +34,10 @@ * * Revisions : * $Log: killpopup.h,v $ + * Revision 1.3 2001/07/29 18:59:21 jongfoster + * - Changing #define _KILLPOPUP_H to KILLPOPUP_H_INCLUDED + * - Adding extern "C" {} + * * Revision 1.2 2001/05/20 01:21:20 jongfoster * Version 2.9.4 checkin. * - Merged popupfile and cookiefile, and added control over PCRS @@ -60,11 +64,11 @@ extern "C" { #endif -#ifdef KILLPOPUPS +#ifdef FEATURE_KILL_POPUPS extern void filter_popups(char *buff, int size); -#endif /* def KILLPOPUPS */ +#endif /* def FEATURE_KILL_POPUPS */ /* Revision control strings from this header and associated .c file */ extern const char killpopup_rcs[]; diff --git a/loadcfg.c b/loadcfg.c index d999b026..18db0991 100644 --- a/loadcfg.c +++ b/loadcfg.c @@ -1,4 +1,4 @@ -const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.18 2001/07/13 14:01:14 oes Exp $"; +const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.19 2001/07/15 17:45:16 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $ @@ -35,6 +35,9 @@ const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.18 2001/07/13 14:01:14 oes Exp $" * * Revisions : * $Log: loadcfg.c,v $ + * Revision 1.19 2001/07/15 17:45:16 jongfoster + * Removing some unused #includes + * * Revision 1.18 2001/07/13 14:01:14 oes * - Removed all #ifdef PCRS * - Removed vim-settings @@ -245,10 +248,10 @@ const char loadcfg_h_rcs[] = LOADCFG_H_VERSION; #define ijb_isupper(__X) isupper((int)(unsigned char)(__X)) #define ijb_tolower(__X) tolower((int)(unsigned char)(__X)) -#ifdef TOGGLE +#ifdef FEATURE_TOGGLE /* by haroon - indicates if ijb is enabled */ int g_bToggleIJB = 1; /* JunkBusters is enabled by default. */ -#endif +#endif /* def FEATURE_TOGGLE */ /* The filename of the configfile */ const char *configfile = NULL; @@ -325,7 +328,7 @@ void unload_configfile (void * data) { struct configuration_spec * config = (struct configuration_spec *)data; struct forward_spec *cur_fwd = config->forward; -#ifdef ACL_FILES +#ifdef FEATURE_ACL struct access_control_list *cur_acl = config->acl; while (cur_acl != NULL) @@ -335,7 +338,7 @@ void unload_configfile (void * data) cur_acl = next_acl; } config->acl = NULL; -#endif /* def ACL_FILES */ +#endif /* def FEATURE_ACL */ while (cur_fwd != NULL) { @@ -349,13 +352,13 @@ void unload_configfile (void * data) } config->forward = NULL; -#ifdef JAR_FILES +#ifdef FEATURE_COOKIE_JAR if ( NULL != config->jar ) { fclose( config->jar ); config->jar = NULL; } -#endif /* def JAR_FILES */ +#endif /* def FEATURE_COOKIE_JAR */ freez((char *)config->confdir); freez((char *)config->logdir); @@ -368,13 +371,9 @@ void unload_configfile (void * data) freez((char *)config->proxy_info_url); freez((char *)config->proxy_args); -#ifdef JAR_FILES +#ifdef FEATURE_COOKIE_JAR freez((char *)config->jarfile); -#endif /* def JAR_FILES */ - -#ifndef SPLIT_PROXY_ARGS - freez((char *)config->suppress_message); -#endif /* ndef SPLIT_PROXY_ARGS */ +#endif /* def FEATURE_COOKIE_JAR */ freez((char *)config->re_filterfile); @@ -416,9 +415,9 @@ struct configuration_spec * load_config(void) log_error(LOG_LEVEL_INFO, "loading configuration file '%s':", configfile); -#ifdef TOGGLE +#ifdef FEATURE_TOGGLE g_bToggleIJB = 1; -#endif +#endif /* def FEATURE_TOGGLE */ fs->f = config = (struct configuration_spec *)zalloc(sizeof(*config)); @@ -460,9 +459,9 @@ struct configuration_spec * load_config(void) char cmd[BUFFER_SIZE]; char arg[BUFFER_SIZE]; char tmp[BUFFER_SIZE]; -#ifdef ACL_FILES +#ifdef FEATURE_ACL struct access_control_list *cur_acl; -#endif /* def ACL_FILES */ +#endif /* def FEATURE_ACL */ struct forward_spec *cur_fwd; int vec_count; char *vec[3]; @@ -544,7 +543,7 @@ struct configuration_spec * load_config(void) /**************************************************************************** * deny-access source-ip[/significant-bits] [dest-ip[/significant-bits]] ****************************************************************************/ -#ifdef ACL_FILES +#ifdef FEATURE_ACL case hash_deny_access: vec_count = ssplit(arg, " \t", vec, SZ(vec), 1, 1); @@ -614,7 +613,7 @@ struct configuration_spec * load_config(void) config->acl = cur_acl; continue; -#endif /* def ACL_FILES */ +#endif /* def FEATURE_ACL */ /**************************************************************************** * forward url-pattern (.|http-proxy-host[:port]) @@ -842,12 +841,12 @@ struct configuration_spec * load_config(void) * jarfile jar-file-name * In logdir by default ****************************************************************************/ -#ifdef JAR_FILES +#ifdef FEATURE_COOKIE_JAR case hash_jarfile : freez((char *)config->jarfile); config->jarfile = make_path(config->logdir, arg); continue; -#endif /* def JAR_FILES */ +#endif /* def FEATURE_COOKIE_JAR */ /**************************************************************************** * listen-address [ip][:port] @@ -877,7 +876,7 @@ struct configuration_spec * load_config(void) /**************************************************************************** * permit-access source-ip[/significant-bits] [dest-ip[/significant-bits]] ****************************************************************************/ -#ifdef ACL_FILES +#ifdef FEATURE_ACL case hash_permit_access: vec_count = ssplit(arg, " \t", vec, SZ(vec), 1, 1); @@ -949,7 +948,7 @@ struct configuration_spec * load_config(void) config->acl = cur_acl; continue; -#endif /* def ACL_FILES */ +#endif /* def FEATURE_ACL */ /**************************************************************************** * proxy-info-url url @@ -975,53 +974,34 @@ struct configuration_spec * load_config(void) config->multi_threaded = 0; continue; -/**************************************************************************** - * FIXME: Document this FIXME2: Shouldn't we throw this out? --oes - ****************************************************************************/ -#ifndef SPLIT_PROXY_ARGS - case hash_suppress_blocklists : - if (arg[0] != '\0') - { - config->suppress_message = strdup(arg); - } - else - { - /* There will be NO reference in proxy-args. */ - config->suppress_message = NULL; - } - - config->suppress_blocklists = 1; - continue; -#endif /* ndef SPLIT_PROXY_ARGS */ - /**************************************************************************** * toggle (0|1) ****************************************************************************/ -#ifdef TOGGLE +#ifdef FEATURE_TOGGLE case hash_toggle : g_bToggleIJB = atoi(arg); continue; -#endif /* def TOGGLE */ +#endif /* def FEATURE_TOGGLE */ /**************************************************************************** * trust-info-url url ****************************************************************************/ -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST case hash_trust_info_url : enlist(config->trust_info, arg); continue; -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ /**************************************************************************** * trustfile filename * (In confdir by default.) ****************************************************************************/ -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST case hash_trustfile : freez((char *)config->trustfile); config->trustfile = make_path(config->confdir, arg); continue; -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ /**************************************************************************** @@ -1112,25 +1092,22 @@ struct configuration_spec * load_config(void) /****************************************************************************/ /* Warnings about unsupported features */ /****************************************************************************/ -#ifndef ACL_FILES +#ifndef FEATURE_ACL case hash_deny_access: -#endif /* ndef ACL_FILES */ -#ifndef JAR_FILES +#endif /* ndef FEATURE_ACL */ +#ifndef FEATURE_COOKIE_JAR case hash_jarfile : -#endif /* ndef JAR_FILES */ -#ifndef ACL_FILES +#endif /* ndef FEATURE_COOKIE_JAR */ +#ifndef FEATURE_ACL case hash_permit_access: -#endif /* ndef ACL_FILES */ -#ifdef SPLIT_PROXY_ARGS - case hash_suppress_blocklists : -#endif /* def SPLIT_PROXY_ARGS */ -#ifndef TOGGLE +#endif /* ndef FEATURE_ACL */ +#ifndef FEATURE_TOGGLE case hash_toggle : -#endif /* ndef TOGGLE */ -#ifndef TRUST_FILES +#endif /* ndef FEATURE_TOGGLE */ +#ifndef FEATURE_TRUST case hash_trustfile : case hash_trust_info_url : -#endif /* ndef TRUST_FILES */ +#endif /* ndef FEATURE_TRUST */ #ifndef _WIN_CONSOLE case hash_hide_console : @@ -1184,14 +1161,14 @@ struct configuration_spec * load_config(void) add_loader(load_re_filterfile, config); } -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST if (config->trustfile) { add_loader(load_trustfile, config); } -#endif +#endif /* def FEATURE_TRUST */ -#ifdef JAR_FILES +#ifdef FEATURE_COOKIE_JAR if ( NULL != config->jarfile ) { if ( NULL == (config->jar = fopen(config->jarfile, "a")) ) @@ -1201,7 +1178,7 @@ struct configuration_spec * load_config(void) } setbuf(config->jar, NULL); } -#endif /* def JAR_FILES */ +#endif /* def FEATURE_COOKIE_JAR */ if ( NULL == config->haddr ) { @@ -1247,22 +1224,15 @@ struct configuration_spec * load_config(void) } freez(fake_csp); -#ifndef SPLIT_PROXY_ARGS - if (!suppress_blocklists) - { - fs->proxy_args = strsav(fs->proxy_args, ""); - } -#endif /* ndef SPLIT_PROXY_ARGS */ - /* FIXME: this is a kludge for win32 */ #if defined(_WIN32) && !defined (_WIN_CONSOLE) g_actions_file = config->actions_file; g_re_filterfile = config->re_filterfile; -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST g_trustfile = config->trustfile; -#endif +#endif /* def FEATURE_TRUST */ #endif /* defined(_WIN32) && !defined (_WIN_CONSOLE) */ diff --git a/loadcfg.h b/loadcfg.h index f84eada4..78b18e15 100644 --- a/loadcfg.h +++ b/loadcfg.h @@ -1,6 +1,6 @@ #ifndef LOADCFG_H_INCLUDED #define LOADCFG_H_INCLUDED -#define LOADCFG_H_VERSION "$Id: loadcfg.h,v 1.5 2001/05/26 00:28:36 jongfoster Exp $" +#define LOADCFG_H_VERSION "$Id: loadcfg.h,v 1.6 2001/07/29 18:58:15 jongfoster Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/loadcfg.h,v $ @@ -37,6 +37,10 @@ * * Revisions : * $Log: loadcfg.h,v $ + * Revision 1.6 2001/07/29 18:58:15 jongfoster + * Removing nested #includes, adding forward declarations for needed + * structures, and changing the #define _FILENAME_H to FILENAME_H_INCLUDED. + * * Revision 1.5 2001/05/26 00:28:36 jongfoster * Automatic reloading of config file. * Removed obsolete SIGHUP support (Unix) and Reload menu option (Win32). @@ -120,10 +124,10 @@ struct configuration_spec; /* Global variables */ -#ifdef TOGGLE +#ifdef FEATURE_TOGGLE /* indicates if ijb is enabled */ extern int g_bToggleIJB; -#endif +#endif /* def FEATURE_TOGGLE */ extern const char *configfile; diff --git a/loaders.c b/loaders.c index 577a6531..cf4e59fc 100644 --- a/loaders.c +++ b/loaders.c @@ -1,4 +1,4 @@ -const char loaders_rcs[] = "$Id: loaders.c,v 1.22 2001/07/20 15:16:17 haroon Exp $"; +const char loaders_rcs[] = "$Id: loaders.c,v 1.23 2001/07/20 15:51:54 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/loaders.c,v $ @@ -35,6 +35,9 @@ const char loaders_rcs[] = "$Id: loaders.c,v 1.22 2001/07/20 15:16:17 haroon Exp * * Revisions : * $Log: loaders.c,v $ + * Revision 1.23 2001/07/20 15:51:54 oes + * Fixed indentation of prepocessor commands + * * Revision 1.22 2001/07/20 15:16:17 haroon * - per Guy's suggestion, added a while loop in sweep() to catch not just * the last inactive CSP but all other consecutive inactive CSPs after that @@ -199,9 +202,9 @@ const char loaders_h_rcs[] = LOADERS_H_VERSION; * These are also entered in the main linked list of files. */ -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST static struct file_list *current_trustfile = NULL; -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ static struct file_list *current_re_filterfile = NULL; @@ -265,12 +268,12 @@ void sweep(void) ncsp->rlist->active = 1; } -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST if (ncsp->tlist) /* trust files */ { ncsp->tlist->active = 1; } -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ } else @@ -288,9 +291,9 @@ void sweep(void) freez(ncsp->my_ip_addr_str); freez(ncsp->my_hostname); -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST freez(ncsp->referrer); -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ freez(ncsp->x_forwarded); freez(ncsp->iob->buf); @@ -301,13 +304,13 @@ void sweep(void) free_current_action(ncsp->action); -#ifdef STATISTICS +#ifdef FEATURE_STATISTICS urls_read++; if (ncsp->rejected) { urls_rejected++; } -#endif /* def STATISTICS */ +#endif /* def FEATURE_STATISTICS */ freez(ncsp); @@ -326,10 +329,6 @@ void sweep(void) (nfl->unloader)(nfl->f); -#ifndef SPLIT_PROXY_ARGS - freez(nfl->proxy_args); -#endif /* ndef SPLIT_PROXY_ARGS */ - freez(nfl->filename); freez(nfl); @@ -511,10 +510,7 @@ void free_url(struct url_spec *url) * This will be set to NULL, OR a struct * file_list newly allocated on the * heap, with the filename and lastmodified - * fields filled, standard header giving file - * name in proxy_args, and all others zeroed. - * (proxy_args is only filled in if !defined - * SPLIT_PROXY_ARGS and !suppress_blocklists). + * fields filled, and all others zeroed. * * Returns : If file unchanged: 0 (and sets newfl == NULL) * If file changed: 1 and sets newfl != NULL @@ -561,21 +557,6 @@ int check_file_changed(const struct file_list * current, return 1; } -#ifndef SPLIT_PROXY_ARGS - if (!suppress_blocklists) - { - char * p = html_encode(filename); - if (p) - { - fs->proxy_args = strsav(fs->proxy_args, "

The file `"); - fs->proxy_args = strsav(fs->proxy_args, p); - fs->proxy_args = strsav(fs->proxy_args, - "' contains the following patterns

\n"); - freez(p); - } - fs->proxy_args = strsav(fs->proxy_args, "
");
-   }
-#endif /* ndef SPLIT_PROXY_ARGS */
 
    *newfl = fs;
    return 1;
@@ -613,19 +594,6 @@ char *read_config_line(char *buf, int buflen, FILE *fp, struct file_list *fs)
 
    while (fgets(linebuf, sizeof(linebuf), fp))
    {
-#ifndef SPLIT_PROXY_ARGS
-      if (fs && !suppress_blocklists)
-      {
-         char *html_line = html_encode(linebuf);
-         if (html_line != NULL)
-         {
-            fs->proxy_args = strsav(fs->proxy_args, html_line);
-            freez(html_line);
-         }
-         fs->proxy_args = strsav(fs->proxy_args, "
"); - } -#endif /* ndef SPLIT_PROXY_ARGS */ - /* Trim off newline */ if ((p = strpbrk(linebuf, "\r\n")) != NULL) { @@ -687,7 +655,7 @@ char *read_config_line(char *buf, int buflen, FILE *fp, struct file_list *fs) } -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST /********************************************************************* * * Function : unload_trustfile @@ -825,13 +793,6 @@ int load_trustfile(struct client_state *csp) fclose(fp); -#ifndef SPLIT_PROXY_ARGS - if (!suppress_blocklists) - { - fs->proxy_args = strsav(fs->proxy_args, "
"); - } -#endif /* ndef SPLIT_PROXY_ARGS */ - /* the old one is now obsolete */ if (current_trustfile) { @@ -855,7 +816,7 @@ load_trustfile_error: return(-1); } -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ /********************************************************************* @@ -956,13 +917,6 @@ int load_re_filterfile(struct client_state *csp) fclose(fp); -#ifndef SPLIT_PROXY_ARGS - if (!suppress_blocklists) - { - fs->proxy_args = strsav(fs->proxy_args, ""); - } -#endif /* ndef SPLIT_PROXY_ARGS */ - /* the old one is now obsolete */ if ( NULL != current_re_filterfile ) { diff --git a/loaders.h b/loaders.h index a794b22f..756a6de7 100644 --- a/loaders.h +++ b/loaders.h @@ -1,6 +1,6 @@ #ifndef LOADERS_H_INCLUDED #define LOADERS_H_INCLUDED -#define LOADERS_H_VERSION "$Id: loaders.h,v 1.7 2001/07/13 14:01:54 oes Exp $" +#define LOADERS_H_VERSION "$Id: loaders.h,v 1.8 2001/07/29 18:58:15 jongfoster Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/loaders.h,v $ @@ -37,6 +37,10 @@ * * Revisions : * $Log: loaders.h,v $ + * Revision 1.8 2001/07/29 18:58:15 jongfoster + * Removing nested #includes, adding forward declarations for needed + * structures, and changing the #define _FILENAME_H to FILENAME_H_INCLUDED. + * * Revision 1.7 2001/07/13 14:01:54 oes * Removed all #ifdef PCRS * @@ -117,9 +121,9 @@ extern int check_file_changed(const struct file_list * current, extern int load_actions_file(struct client_state *csp); extern int load_re_filterfile(struct client_state *csp); -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST extern int load_trustfile(struct client_state *csp); -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ diff --git a/parsers.c b/parsers.c index 7af93a4d..0f361cbf 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.18 2001/07/13 14:02:46 oes Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.19 2001/07/25 17:21:54 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -41,6 +41,9 @@ const char parsers_rcs[] = "$Id: parsers.c,v 1.18 2001/07/13 14:02:46 oes Exp $" * * Revisions : * $Log: parsers.c,v $ + * Revision 1.19 2001/07/25 17:21:54 oes + * client_uagent now saves copy of User-Agent: header value + * * Revision 1.18 2001/07/13 14:02:46 oes * - Included fix to repair broken HTTP requests that * don't contain a path, not even '/'. @@ -248,15 +251,15 @@ const struct parsers client_patterns[] = { { "cookie:", 7, client_send_cookie }, { "x-forwarded-for:", 16, client_x_forwarded }, { "proxy-connection:", 17, crumble }, -#ifdef DENY_GZIP +#ifdef FEATURE_DENY_GZIP { "Accept-Encoding: gzip", 21, crumble }, -#endif /* def DENY_GZIP */ -#if defined(DETECT_MSIE_IMAGES) +#endif /* def FEATURE_DENY_GZIP */ +#if defined(FEATURE_IMAGE_DETECT_MSIE) { "Accept:", 7, client_accept }, -#endif /* defined(DETECT_MSIE_IMAGES) */ -#ifdef FORCE_LOAD +#endif /* defined(FEATURE_IMAGE_DETECT_MSIE) */ +#ifdef FEATURE_FORCE_LOAD { "Host:", 5, client_host }, -#endif /* def FORCE_LOAD */ +#endif /* def FEATURE_FORCE_LOAD */ /* { "if-modified-since:", 18, crumble }, */ { NULL, 0, NULL } }; @@ -571,35 +574,19 @@ void parse_http_request(char *req, struct http_request *http, struct client_stat http->ver = strdup(v[2]); } -#ifdef WEBDAV - -/* This next line is a little ugly, but it simplifies the if statement below. */ -/* Basically if using webDAV, we want the OR condition to use these too. */ - -/* - * by haroon - * These are the headers as defined in RFC2518 to add webDAV support - */ - -#define OR_WEBDAV || \ - (0 == strcmpic(v[0], "propfind")) || \ - (0 == strcmpic(v[0], "proppatch")) || \ - (0 == strcmpic(v[0], "move")) || \ - (0 == strcmpic(v[0], "copy")) || \ - (0 == strcmpic(v[0], "mkcol")) || \ - (0 == strcmpic(v[0], "lock")) || \ - (0 == strcmpic(v[0], "unlock")) - -#else /* No webDAV support is enabled. Provide an empty OR_WEBDAV macro. */ - -#define OR_WEBDAV - -#endif - /* or it could be a GET or a POST (possibly webDAV too) */ - if ((strcmpic(v[0], "get") == 0) || - (strcmpic(v[0], "head") == 0) OR_WEBDAV || - (strcmpic(v[0], "post") == 0)) + if ((0 == strcmpic(v[0], "get")) + || (0 == strcmpic(v[0], "head")) + || (0 == strcmpic(v[0], "post")) + /* These are the headers as defined in RFC2518 to add webDAV support: */ + || (0 == strcmpic(v[0], "propfind")) + || (0 == strcmpic(v[0], "proppatch")) + || (0 == strcmpic(v[0], "move")) + || (0 == strcmpic(v[0], "copy")) + || (0 == strcmpic(v[0], "mkcol")) + || (0 == strcmpic(v[0], "lock")) + || (0 == strcmpic(v[0], "unlock")) + ) { http->ssl = 0; http->gpc = strdup(v[0]); @@ -803,17 +790,17 @@ char *content_length(const struct parsers *v, char *s, struct client_state *csp) char *client_referrer(const struct parsers *v, char *s, struct client_state *csp) { const char * newval; -#ifdef FORCE_LOAD +#ifdef FEATURE_FORCE_LOAD /* Since the referrer can include the prefix even * even if the request itself is non-forced, we must * clean it unconditionally */ strclean(s, FORCE_PREFIX); -#endif /* def FORCE_LOAD */ +#endif /* def FEATURE_FORCE_LOAD */ -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST csp->referrer = strdup(s); -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ /* * Are we sending referer? @@ -912,7 +899,7 @@ char *client_uagent(const struct parsers *v, char *s, struct client_state *csp) csp->http->user_agent = strdup(s + 12); } -#ifdef DETECT_MSIE_IMAGES +#ifdef FEATURE_IMAGE_DETECT_MSIE if (strstr (s, "MSIE ")) { /* This is Microsoft Internet Explorer. @@ -920,7 +907,7 @@ char *client_uagent(const struct parsers *v, char *s, struct client_state *csp) */ csp->accept_types |= ACCEPT_TYPE_IS_MSIE; } -#endif /* def DETECT_MSIE_IMAGES */ +#endif /* def FEATURE_IMAGE_DETECT_MSIE */ if ((csp->action->flags & ACTION_HIDE_USER_AGENT) == 0) { @@ -1083,7 +1070,7 @@ char *client_x_forwarded(const struct parsers *v, char *s, struct client_state * } -#if defined(DETECT_MSIE_IMAGES) +#if defined(FEATURE_IMAGE_DETECT_MSIE) /********************************************************************* * * Function : client_accept @@ -1103,7 +1090,7 @@ char *client_x_forwarded(const struct parsers *v, char *s, struct client_state * *********************************************************************/ char *client_accept(const struct parsers *v, char *s, struct client_state *csp) { -#ifdef DETECT_MSIE_IMAGES +#ifdef FEATURE_IMAGE_DETECT_MSIE if (strstr (s, "image/gif")) { /* Client will accept HTML. If this seems counterintuitive, @@ -1115,12 +1102,12 @@ char *client_accept(const struct parsers *v, char *s, struct client_state *csp) { csp->accept_types |= ACCEPT_TYPE_MSIE_IMAGE; } -#endif /* def DETECT_MSIE_IMAGES */ +#endif /* def FEATURE_IMAGE_DETECT_MSIE */ return(strdup(s)); } -#endif /* defined(DETECT_MSIE_IMAGES) */ +#endif /* defined(FEATURE_IMAGE_DETECT_MSIE) */ @@ -1265,12 +1252,12 @@ void client_x_forwarded_adder(struct client_state *csp) *********************************************************************/ char *server_set_cookie(const struct parsers *v, char *s, struct client_state *csp) { -#ifdef JAR_FILES +#ifdef FEATURE_COOKIE_JAR if (csp->config->jar) { fprintf(csp->config->jar, "%s\t%s\n", csp->http->host, (s + v->len + 1)); } -#endif /* def JAR_FILES */ +#endif /* def FEATURE_COOKIE_JAR */ if ((csp->action->flags & ACTION_NO_COOKIE_SET) != 0) { @@ -1282,7 +1269,7 @@ char *server_set_cookie(const struct parsers *v, char *s, struct client_state *c } -#ifdef FORCE_LOAD +#ifdef FEATURE_FORCE_LOAD /********************************************************************* * * Function : client_host @@ -1307,10 +1294,10 @@ char *client_host(const struct parsers *v, char *s, struct client_state *csp) return(cleanhost); } -#endif /* def FORCE_LOAD */ +#endif /* def FEATURE_FORCE_LOAD */ -#ifdef FORCE_LOAD +#ifdef FEATURE_FORCE_LOAD /********************************************************************* * * Function : strclean @@ -1344,7 +1331,7 @@ int strclean(const char *string, const char *substring) return(hits); } -#endif /* def FORCE_LOAD */ +#endif /* def FEATURE_FORCE_LOAD */ /* diff --git a/parsers.h b/parsers.h index d721ac4a..1c6c391a 100644 --- a/parsers.h +++ b/parsers.h @@ -1,6 +1,6 @@ #ifndef PARSERS_H_INCLUDED #define PARSERS_H_INCLUDED -#define PARSERS_H_VERSION "$Id: parsers.h,v 1.8 2001/07/13 14:01:54 oes Exp $" +#define PARSERS_H_VERSION "$Id: parsers.h,v 1.9 2001/07/29 18:43:08 jongfoster Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.h,v $ @@ -43,6 +43,10 @@ * * Revisions : * $Log: parsers.h,v $ + * Revision 1.9 2001/07/29 18:43:08 jongfoster + * Changing #ifdef _FILENAME_H to FILENAME_H_INCLUDED, to conform to + * ANSI C rules. + * * Revision 1.8 2001/07/13 14:01:54 oes * Removed all #ifdef PCRS * @@ -121,14 +125,14 @@ extern char *server_set_cookie(const struct parsers *v, char *s, struct client_s extern char *content_type(const struct parsers *v, char *s, struct client_state *csp); extern char *content_length(const struct parsers *v, char *s, struct client_state *csp); -#ifdef FORCE_LOAD +#ifdef FEATURE_FORCE_LOAD char *client_host(const struct parsers *v, char *s, struct client_state *csp); int strclean(const char *string, const char *substring); -#endif /* def FORCE_LOAD */ +#endif /* def FEATURE_FORCE_LOAD */ -#if defined(DETECT_MSIE_IMAGES) +#if defined(FEATURE_IMAGE_DETECT_MSIE) extern char *client_accept(const struct parsers *v, char *s, struct client_state *csp); -#endif /* defined(DETECT_MSIE_IMAGES) */ +#endif /* defined(FEATURE_IMAGE_DETECT_MSIE) */ /* Revision control strings from this header and associated .c file */ extern const char parsers_rcs[]; diff --git a/project.h b/project.h index efd6bef2..5446bb79 100644 --- a/project.h +++ b/project.h @@ -1,6 +1,6 @@ #ifndef PROJECT_H_INCLUDED #define PROJECT_H_INCLUDED -#define PROJECT_H_VERSION "$Id: project.h,v 1.24 2001/07/25 17:20:27 oes Exp $" +#define PROJECT_H_VERSION "$Id: project.h,v 1.25 2001/07/29 18:43:08 jongfoster Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/project.h,v $ @@ -36,6 +36,10 @@ * * Revisions : * $Log: project.h,v $ + * Revision 1.25 2001/07/29 18:43:08 jongfoster + * Changing #ifdef _FILENAME_H to FILENAME_H_INCLUDED, to conform to + * ANSI C rules. + * * Revision 1.24 2001/07/25 17:20:27 oes * Introduced http->user_agent * @@ -468,7 +472,7 @@ struct url_actions /* Constants defining bitmask for csp->accept_types */ -#ifdef DETECT_MSIE_IMAGES +#ifdef FEATURE_IMAGE_DETECT_MSIE /* MSIE detected by user-agent string */ #define ACCEPT_TYPE_IS_MSIE 0x0001 @@ -486,7 +490,7 @@ struct url_actions */ #define ACCEPT_TYPE_MSIE_HTML 0x0004 -#endif /* def DETECT_MSIE_IMAGES */ +#endif /* def FEATURE_IMAGE_DETECT_MSIE */ struct client_state @@ -504,20 +508,20 @@ struct client_state int sfd; -#ifdef STATISTICS +#ifdef FEATURE_STATISTICS /* 1 if this URL was rejected, 0 otherwise. Allows actual stats inc to * occur in main thread only for thread-safety. */ int rejected; -#endif /* def STATISTICS */ +#endif /* def FEATURE_STATISTICS */ -#ifdef FORCE_LOAD +#ifdef FEATURE_FORCE_LOAD int force; -#endif /* def FORCE_LOAD */ +#endif /* def FEATURE_FORCE_LOAD */ -#ifdef TOGGLE +#ifdef FEATURE_TOGGLE int toggled_on; -#endif /* def TOGGLE */ +#endif /* def FEATURE_TOGGLE */ /* * Client PC's IP address, as reported by the accept()_ function. @@ -534,17 +538,17 @@ struct client_state char *my_ip_addr_str; char *my_hostname; -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST /* The referer in this request, if one was specified. */ char *referrer; -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ -#if defined(DETECT_MSIE_IMAGES) +#if defined(FEATURE_IMAGE_DETECT_MSIE) /* Types the client will accept. * Bitmask - see ACCEPT_TYPE_XXX constants. */ int accept_types; -#endif /* defined(DETECT_MSIE_IMAGES) */ +#endif /* defined(FEATURE_IMAGE_DETECT_MSIE) */ /* The URL that was requested */ struct http_request http[1]; @@ -576,9 +580,9 @@ struct client_state struct file_list *rlist; /* pcrs job file */ size_t content_length; /* Length after content modification */ -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST struct file_list *tlist; /* trustfile */ -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ struct client_state *next; }; @@ -618,13 +622,6 @@ struct file_list /* Used internally by sweep(). Do not access from elsewhere. */ int active; -#ifndef SPLIT_PROXY_ARGS - /* String to be displayed as part of show-proxy-args display. - * Read-only once the structure has been created. - */ - char *proxy_args; -#endif /* ndef SPLIT_PROXY_ARGS */ - /* Following variables allow us to check if file has been changed. * Read-only once the structure has been created. */ @@ -641,14 +638,14 @@ struct file_list }; -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST struct block_spec { struct url_spec url[1]; int reject; struct block_spec *next; }; -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ #define SOCKS_NONE 0 /* Don't use a SOCKS server */ @@ -682,7 +679,7 @@ struct re_filterfile_spec pcrs_job *joblist; }; -#ifdef ACL_FILES +#ifdef FEATURE_ACL #define ACL_PERMIT 1 /* accept connection request */ #define ACL_DENY 2 /* reject connection request */ @@ -701,7 +698,7 @@ struct access_control_list short action; struct access_control_list *next; }; -#endif /* def ACL_FILES */ +#endif /* def FEATURE_ACL */ /* Maximum number of loaders (actions, re_filter, ...) */ @@ -731,10 +728,10 @@ struct configuration_spec const char *re_filterfile; -#ifdef JAR_FILES +#ifdef FEATURE_COOKIE_JAR const char * jarfile; FILE * jar; -#endif /* def JAR_FILES */ +#endif /* def FEATURE_COOKIE_JAR */ /* * Port and IP to bind to. @@ -743,25 +740,16 @@ struct configuration_spec const char *haddr; int hport; -#ifndef SPLIT_PROXY_ARGS - const char *suppress_message; -#endif /* ndef SPLIT_PROXY_ARGS */ - -#ifndef SPLIT_PROXY_ARGS - /* suppress listing config files */ - int suppress_blocklists; -#endif /* ndef SPLIT_PROXY_ARGS */ - -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST const char * trustfile; struct list trust_info[1]; struct url_spec *trust_list[64]; -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ -#ifdef ACL_FILES +#ifdef FEATURE_ACL struct access_control_list *acl; -#endif /* def ACL_FILES */ +#endif /* def FEATURE_ACL */ struct forward_spec *forward; @@ -781,9 +769,9 @@ struct configuration_spec #define SZ(X) (sizeof(X) / sizeof(*X)) -#ifdef FORCE_LOAD +#ifdef FEATURE_FORCE_LOAD #define FORCE_PREFIX "/IJB-FORCE-LOAD" -#endif /* def FORCE_LOAD */ +#endif /* def FEATURE_FORCE_LOAD */ /* Hardwired URLs */ #define HOME_PAGE_URL "http://ijbswa.sourceforge.net" diff --git a/showargs.c b/showargs.c index ea83855b..016eb63b 100644 --- a/showargs.c +++ b/showargs.c @@ -1,4 +1,4 @@ -const char showargs_rcs[] = "$Id: showargs.c,v 1.19 2001/07/13 14:11:36 oes Exp $"; +const char showargs_rcs[] = "$Id: showargs.c,v 1.20 2001/07/18 17:27:22 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/showargs.c,v $ @@ -34,6 +34,9 @@ const char showargs_rcs[] = "$Id: showargs.c,v 1.19 2001/07/13 14:11:36 oes Exp * * Revisions : * $Log: showargs.c,v $ + * Revision 1.20 2001/07/18 17:27:22 oes + * Adapted to new #defines + * * Revision 1.19 2001/07/13 14:11:36 oes * - Included SHOW_RCS for deanimate.* * - Removed all #ifdef PCRS @@ -311,10 +314,10 @@ char *show_rcs(void) SHOW_RCS(jbsockets_rcs) SHOW_RCS(jcc_h_rcs) SHOW_RCS(jcc_rcs) -#ifdef KILLPOPUPS +#ifdef FEATURE_KILL_POPUPS SHOW_RCS(killpopup_h_rcs) SHOW_RCS(killpopup_rcs) -#endif /* def KILLPOPUPS */ +#endif /* def FEATURE_KILL_POPUPS */ SHOW_RCS(list_h_rcs) SHOW_RCS(list_rcs) SHOW_RCS(loadcfg_h_rcs) @@ -337,8 +340,6 @@ char *show_rcs(void) SHOW_RCS(w32log_h_rcs) SHOW_RCS(w32log_rcs) SHOW_RCS(w32res_h_rcs) - SHOW_RCS(w32rulesdlg_h_rcs) - SHOW_RCS(w32rulesdlg_rcs) SHOW_RCS(w32taskbar_h_rcs) SHOW_RCS(w32taskbar_rcs) #endif /* ndef _WIN_CONSOLE */ @@ -397,83 +398,71 @@ char *show_defines(void) b = strsav(b, "
  • #undef STATIC_PCRS - Using libpcrs rather than static built-in pcrs.
  • \n"); #endif /* ndef STATIC_PCRS */ -#ifdef TOGGLE - b = strsav(b, "
  • #define TOGGLE - Allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.
  • \n"); -#else /* ifndef TOGGLE */ - b = strsav(b, "
  • #undef TOGGLE - Do not allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.
  • \n"); -#endif /* ndef TOGGLE */ - -#ifdef FORCE_LOAD - b = strsav(b, "
  • #define FORCE_LOAD - Enables bypassing filtering for a single page using the prefix \"" FORCE_PREFIX "\".
  • \n"); -#else /* ifndef FORCE_LOAD */ - b = strsav(b, "
  • #undef FORCE_LOAD - Disables bypassing filtering for a single page.
  • \n"); -#endif /* ndef FORCE_LOAD */ - -#ifdef DENY_GZIP - b = strsav(b, "
  • #define DENY_GZIP - Prevents requests from being compressed - required for PCRS on some sites.
  • \n"); -#else /* ifndef DENY_GZIP */ - b = strsav(b, "
  • #undef DENY_GZIP - Allows requests to be compressed if the browser and server support it.
  • \n"); -#endif /* ndef DENY_GZIP */ - -#ifdef STATISTICS - b = strsav(b, "
  • #define STATISTICS - Enables statistics function.
  • \n"); -#else /* ifndef STATISTICS */ - b = strsav(b, "
  • #undef STATISTICS - Disables statistics function.
  • \n"); -#endif /* ndef STATISTICS */ - -#ifdef SPLIT_PROXY_ARGS - b = strsav(b, "
  • #define SPLIT_PROXY_ARGS - Split this page up by placing the configuration files on separate pages.
  • \n"); -#else /* ifndef SPLIT_PROXY_ARGS */ - b = strsav(b, "
  • #undef SPLIT_PROXY_ARGS - This page contains the text of the configuration files, they are not split onto separate pages.
  • \n"); -#endif /* ndef SPLIT_PROXY_ARGS */ - -#ifdef KILLPOPUPS - b = strsav(b, "
  • #define KILLPOPUPS - Enables killing JavaScript popups.
  • \n"); -#else /* ifndef KILLPOPUPS */ - b = strsav(b, "
  • #undef KILLPOPUPS - Disables killing JavaScript popups.
  • \n"); -#endif /* ndef KILLPOPUPS */ - -#ifdef WEBDAV - b = strsav(b, "
  • #define WEBDAV - Enables support for webDAV - e.g. stops Microsoft Outlook from accessing HotMail e-mail.
  • \n"); -#else /* ifndef WEBDAV */ - b = strsav(b, "
  • #undef WEBDAV - Disables support for webDAV - e.g. so Microsoft Outlook can access HotMail e-mail.
  • \n"); -#endif /* ndef WEBDAV */ - -#ifdef DETECT_MSIE_IMAGES - b = strsav(b, "
  • #define DETECT_MSIE_IMAGES - Enables detecting image requests automatically for MSIE.
  • \n"); -#else /* ifndef DETECT_MSIE_IMAGES */ - b = strsav(b, "
  • #undef DETECT_MSIE_IMAGES - Disables detecting image requests automatically for MSIE.
  • \n"); -#endif /* ndef DETECT_MSIE_IMAGES */ - -#ifdef IMAGE_BLOCKING - b = strsav(b, "
  • #define IMAGE_BLOCKING - Enables sending \"blocked\" images instead of HTML.
  • \n"); -#else /* ifndef IMAGE_BLOCKING */ - b = strsav(b, "
  • #undef IMAGE_BLOCKING - Disables sending \"blocked\" images instead of HTML.
  • \n"); -#endif /* ndef IMAGE_BLOCKING */ - -#ifdef ACL_FILES - b = strsav(b, "
  • #define ACL_FILES - Enables the use of ACL files to control access to the proxy by IP address.
  • \n"); -#else /* ifndef ACL_FILES */ - b = strsav(b, "
  • #undef ACL_FILES - Disables the use of ACL files to control access to the proxy by IP address.
  • \n"); -#endif /* ndef ACL_FILES */ - -#ifdef TRUST_FILES - b = strsav(b, "
  • #define TRUST_FILES - Enables the use of trust files.
  • \n"); -#else /* ifndef TRUST_FILES */ - b = strsav(b, "
  • #undef TRUST_FILES - Disables the use of trust files.
  • \n"); -#endif /* ndef TRUST_FILES */ - -#ifdef JAR_FILES - b = strsav(b, "
  • #define JAR_FILES - Enables the use of jar files to capture cookies.
  • \n"); -#else /* ifndef JAR_FILES */ - b = strsav(b, "
  • #undef JAR_FILES - Disables the use of jar files to capture cookies.
  • \n"); -#endif /* ndef JAR_FILES */ - -#ifdef FAST_REDIRECTS - b = strsav(b, "
  • #define FAST_REDIRECTS - Enables intercepting remote script redirects.
  • \n"); -#else /* ifndef FAST_REDIRECTS */ - b = strsav(b, "
  • #undef FAST_REDIRECTS - Disables intercepting remote script redirects.
  • \n"); -#endif /* ndef FAST_REDIRECTS */ +#ifdef FEATURE_TOGGLE + b = strsav(b, "
  • #define FEATURE_TOGGLE - Allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.
  • \n"); +#else /* ifndef FEATURE_TOGGLE */ + b = strsav(b, "
  • #undef FEATURE_TOGGLE - Do not allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.
  • \n"); +#endif /* ndef FEATURE_TOGGLE */ + +#ifdef FEATURE_FORCE_LOAD + b = strsav(b, "
  • #define FEATURE_FORCE_LOAD - Enables bypassing filtering for a single page using the prefix \"" FORCE_PREFIX "\".
  • \n"); +#else /* ifndef FEATURE_FORCE_LOAD */ + b = strsav(b, "
  • #undef FEATURE_FORCE_LOAD - Disables bypassing filtering for a single page.
  • \n"); +#endif /* ndef FEATURE_FORCE_LOAD */ + +#ifdef FEATURE_DENY_GZIP + b = strsav(b, "
  • #define FEATURE_DENY_GZIP - Prevents requests from being compressed - required for PCRS on some sites.
  • \n"); +#else /* ifndef FEATURE_DENY_GZIP */ + b = strsav(b, "
  • #undef FEATURE_DENY_GZIP - Allows requests to be compressed if the browser and server support it.
  • \n"); +#endif /* ndef FEATURE_DENY_GZIP */ + +#ifdef FEATURE_STATISTICS + b = strsav(b, "
  • #define FEATURE_STATISTICS - Enables statistics function.
  • \n"); +#else /* ifndef FEATURE_STATISTICS */ + b = strsav(b, "
  • #undef FEATURE_STATISTICS - Disables statistics function.
  • \n"); +#endif /* ndef FEATURE_STATISTICS */ + +#ifdef FEATURE_KILL_POPUPS + b = strsav(b, "
  • #define FEATURE_KILL_POPUPS - Enables killing JavaScript popups.
  • \n"); +#else /* ifndef FEATURE_KILL_POPUPS */ + b = strsav(b, "
  • #undef FEATURE_KILL_POPUPS - Disables killing JavaScript popups.
  • \n"); +#endif /* ndef FEATURE_KILL_POPUPS */ + +#ifdef FEATURE_IMAGE_DETECT_MSIE + b = strsav(b, "
  • #define FEATURE_IMAGE_DETECT_MSIE - Enables detecting image requests automatically for MSIE.
  • \n"); +#else /* ifndef FEATURE_IMAGE_DETECT_MSIE */ + b = strsav(b, "
  • #undef FEATURE_IMAGE_DETECT_MSIE - Disables detecting image requests automatically for MSIE.
  • \n"); +#endif /* ndef FEATURE_IMAGE_DETECT_MSIE */ + +#ifdef FEATURE_IMAGE_BLOCKING + b = strsav(b, "
  • #define FEATURE_IMAGE_BLOCKING - Enables sending \"blocked\" images instead of HTML.
  • \n"); +#else /* ifndef FEATURE_IMAGE_BLOCKING */ + b = strsav(b, "
  • #undef FEATURE_IMAGE_BLOCKING - Disables sending \"blocked\" images instead of HTML.
  • \n"); +#endif /* ndef FEATURE_IMAGE_BLOCKING */ + +#ifdef FEATURE_ACL + b = strsav(b, "
  • #define FEATURE_ACL - Enables the use of ACL files to control access to the proxy by IP address.
  • \n"); +#else /* ifndef FEATURE_ACL */ + b = strsav(b, "
  • #undef FEATURE_ACL - Disables the use of ACL files to control access to the proxy by IP address.
  • \n"); +#endif /* ndef FEATURE_ACL */ + +#ifdef FEATURE_TRUST + b = strsav(b, "
  • #define FEATURE_TRUST - Enables the use of trust files.
  • \n"); +#else /* ifndef FEATURE_TRUST */ + b = strsav(b, "
  • #undef FEATURE_TRUST - Disables the use of trust files.
  • \n"); +#endif /* ndef FEATURE_TRUST */ + +#ifdef FEATURE_COOKIE_JAR + b = strsav(b, "
  • #define FEATURE_COOKIE_JAR - Enables the use of jar files to capture cookies.
  • \n"); +#else /* ifndef FEATURE_COOKIE_JAR */ + b = strsav(b, "
  • #undef FEATURE_COOKIE_JAR - Disables the use of jar files to capture cookies.
  • \n"); +#endif /* ndef FEATURE_COOKIE_JAR */ + +#ifdef FEATURE_FAST_REDIRECTS + b = strsav(b, "
  • #define FEATURE_FAST_REDIRECTS - Enables intercepting remote script redirects.
  • \n"); +#else /* ifndef FEATURE_FAST_REDIRECTS */ + b = strsav(b, "
  • #undef FEATURE_FAST_REDIRECTS - Disables intercepting remote script redirects.
  • \n"); +#endif /* ndef FEATURE_FAST_REDIRECTS */ return b; } diff --git a/w32log.c b/w32log.c index c1a32566..f7cb7c31 100644 --- a/w32log.c +++ b/w32log.c @@ -1,4 +1,4 @@ -const char w32log_rcs[] = "$Id: w32log.c,v 1.13 2001/07/19 19:15:14 haroon Exp $"; +const char w32log_rcs[] = "$Id: w32log.c,v 1.14 2001/07/29 18:47:05 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/w32log.c,v $ @@ -32,6 +32,9 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.13 2001/07/19 19:15:14 haroon Exp $ * * Revisions : * $Log: w32log.c,v $ + * Revision 1.14 2001/07/29 18:47:05 jongfoster + * Adding missing #include "loadcfg.h" + * * Revision 1.13 2001/07/19 19:15:14 haroon * - Added a FIXME for EditFile but didn't fix :-) * @@ -123,7 +126,6 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.13 2001/07/19 19:15:14 haroon Exp $ #include "project.h" #include "w32log.h" #include "w32taskbar.h" -#include "w32rulesdlg.h" #include "win32.h" #include "w32res.h" #include "jcc.h" @@ -209,9 +211,9 @@ int g_nFontSize = DEFAULT_LOG_FONT_SIZE; const char * g_actions_file = NULL; const char * g_re_filterfile = NULL; -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST const char * g_trustfile = NULL; -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ /* FIXME: end kludge */ @@ -991,9 +993,6 @@ void OnLogRButtonUp(int nModifier, int x, int y) if (hMenu != NULL) { HMENU hMenuPopup = GetSubMenu(hMenu, 0); -#ifdef WIN_GUI_EDIT - char *szURL; -#endif /* def WIN_GUI_EDIT */ /* Check if there is a selection */ CHARRANGE range; @@ -1007,40 +1006,6 @@ void OnLogRButtonUp(int nModifier, int x, int y) EnableMenuItem(hMenuPopup, ID_EDIT_COPY, MF_BYCOMMAND | MF_ENABLED); } -#ifdef WIN_GUI_EDIT - /* Check if cursor is over a link */ - szURL = LogGetURLUnderCursor(); - if (szURL) - { - MENUITEMINFO item; - TCHAR szMenuItemTemplate[1000]; - char *szMenuItem; - - memset(&item, 0, sizeof(item)); - item.cbSize = sizeof(item); - item.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; - item.fType = MFT_STRING; - item.fState = MFS_ENABLED; - item.wID = ID_NEW_BLOCKER; - - /* Put the item into the menu */ - memset(szMenuItemTemplate, 0, sizeof(szMenuItemTemplate)); - LoadString(g_hInstance, IDS_NEW_BLOCKER, szMenuItemTemplate, sizeof(szMenuItemTemplate) / sizeof(szMenuItemTemplate[0])); - - szMenuItem = (char *)malloc(strlen(szMenuItemTemplate) + strlen(szURL) + 1); - sprintf(szMenuItem, szMenuItemTemplate, szURL); - - item.dwTypeData = szMenuItem; - item.cch = strlen(szMenuItem); - - InsertMenuItem(hMenuPopup, 1, TRUE, &item); - - SetDefaultRule(szURL); - - free(szURL); - } -#endif /* def WIN_GUI_EDIT */ - /* Display the popup */ TrackPopupMenu(hMenuPopup, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RIGHTBUTTON, x, y, 0, g_hwndLogFrame, NULL); DestroyMenu(hMenu); @@ -1101,7 +1066,7 @@ void OnLogCommand(int nCommand) /* SaveLogSettings(); */ break; -#ifdef TOGGLE +#ifdef FEATURE_TOGGLE /* by haroon - change toggle to its opposite value */ case ID_TOGGLE_IJB: g_bToggleIJB = !g_bToggleIJB; @@ -1114,7 +1079,7 @@ void OnLogCommand(int nCommand) log_error(LOG_LEVEL_INFO, "Now toggled OFF."); } break; -#endif +#endif /* def FEATURE_TOGGLE */ case ID_TOOLS_EDITJUNKBUSTER: EditFile(configfile); @@ -1128,17 +1093,11 @@ void OnLogCommand(int nCommand) EditFile(g_re_filterfile); break; -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST case ID_TOOLS_EDITTRUST: EditFile(g_trustfile); break; -#endif /* def TRUST_FILES */ - -#ifdef WIN_GUI_EDIT - case ID_NEW_BLOCKER: - ShowRulesDialog(g_hwndLogFrame); - break; -#endif /* def WIN_GUI_EDIT */ +#endif /* def FEATURE_TRUST */ case ID_HELP_GPL: ShellExecute(g_hwndLogFrame, "open", "gpl.html", NULL, NULL, SW_SHOWNORMAL); @@ -1186,19 +1145,19 @@ void OnLogInitMenu(HMENU hmenu) /* Only enable editors if there is a file to edit */ EnableMenuItem(hmenu, ID_TOOLS_EDITACTIONS, MF_BYCOMMAND | (g_actions_file ? MF_ENABLED : MF_GRAYED)); EnableMenuItem(hmenu, ID_TOOLS_EDITPERLRE, MF_BYCOMMAND | (g_re_filterfile ? MF_ENABLED : MF_GRAYED)); -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST EnableMenuItem(hmenu, ID_TOOLS_EDITTRUST, MF_BYCOMMAND | (g_trustfile ? MF_ENABLED : MF_GRAYED)); -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ /* Check/uncheck options */ CheckMenuItem(hmenu, ID_VIEW_LOGMESSAGES, MF_BYCOMMAND | (g_bLogMessages ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(hmenu, ID_VIEW_MESSAGEHIGHLIGHTING, MF_BYCOMMAND | (g_bHighlightMessages ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(hmenu, ID_VIEW_LIMITBUFFERSIZE, MF_BYCOMMAND | (g_bLimitBufferSize ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(hmenu, ID_VIEW_ACTIVITYANIMATION, MF_BYCOMMAND | (g_bShowActivityAnimation ? MF_CHECKED : MF_UNCHECKED)); -#ifdef TOGGLE +#ifdef FEATURE_TOGGLE /* by haroon - menu item for Enable toggle on/off */ CheckMenuItem(hmenu, ID_TOGGLE_IJB, MF_BYCOMMAND | (g_bToggleIJB ? MF_CHECKED : MF_UNCHECKED)); -#endif +#endif /* def FEATURE_TOGGLE */ } diff --git a/w32log.h b/w32log.h index 6d15a674..9f3f6b79 100644 --- a/w32log.h +++ b/w32log.h @@ -1,6 +1,6 @@ #ifndef W32LOG_H_INCLUDED #define W32LOG_H_INCLUDED -#define W32LOG_H_VERSION "$Id: w32log.h,v 1.6 2001/07/13 14:04:59 oes Exp $" +#define W32LOG_H_VERSION "$Id: w32log.h,v 1.7 2001/07/29 18:43:08 jongfoster Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/w32log.h,v $ @@ -34,6 +34,10 @@ * * Revisions : * $Log: w32log.h,v $ + * Revision 1.7 2001/07/29 18:43:08 jongfoster + * Changing #ifdef _FILENAME_H to FILENAME_H_INCLUDED, to conform to + * ANSI C rules. + * * Revision 1.6 2001/07/13 14:04:59 oes * Removed all #ifdef PCRS * @@ -118,9 +122,9 @@ extern int g_nFontSize; extern const char * g_actions_file; extern const char * g_re_filterfile; -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST extern const char * g_trustfile; -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ /* FIXME: end kludge */ diff --git a/w32res.h b/w32res.h index 61c15519..2bff9888 100644 --- a/w32res.h +++ b/w32res.h @@ -1,6 +1,6 @@ #ifndef W32RES_H_INCLUDED #define W32RES_H_INCLUDED -#define W32RES_H_VERSION "$Id: w32res.h,v 1.8 2001/07/13 14:04:59 oes Exp $" +#define W32RES_H_VERSION "$Id: w32res.h,v 1.9 2001/07/29 18:43:08 jongfoster Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/w32res.h,v $ @@ -34,6 +34,10 @@ * * Revisions : * $Log: w32res.h,v $ + * Revision 1.9 2001/07/29 18:43:08 jongfoster + * Changing #ifdef _FILENAME_H to FILENAME_H_INCLUDED, to conform to + * ANSI C rules. + * * Revision 1.8 2001/07/13 14:04:59 oes * Removed all #ifdef PCRS * @@ -97,22 +101,12 @@ * *********************************************************************/ -#ifdef WIN_GUI_EDIT -#define IDS_NEW_BLOCKER 1 - -#define ID_NEW_BLOCKER 100 -#endif /* def WIN_GUI_EDIT */ - #define IDR_TRAYMENU 101 #define IDI_IDLE 102 #define IDR_LOGVIEW 103 #define IDR_ACCELERATOR 104 #define IDR_POPUP_SELECTION 105 -#ifdef WIN_GUI_EDIT -#define IDD_RULES 106 -#endif /* def WIN_GUI_EDIT */ - #define IDI_JUNKBUSTER 200 #define IDI_JUNKBUSTER1 201 @@ -124,20 +118,6 @@ #define IDI_JUNKBUSTER7 207 #define IDI_JUNKBUSTER8 208 -#ifdef WIN_GUI_EDIT -#define IDI_DENYRULE 209 -#define IDI_ALLOWRULE 210 - -#define IDC_NEW 300 -#define IDC_ACTION 301 -#define IDC_RULES 302 -#define IDC_CREATE 303 -#define IDC_MOVEUP 304 -#define IDC_MOVEDOWN 305 -#define IDC_DELETE 306 -#define IDC_SAVE 307 -#endif /* def WIN_GUI_EDIT */ - #define ID_SHOWWINDOW 4000 #define ID_HELP_ABOUTJUNKBUSTER 4001 #define ID_FILE_EXIT 4002 @@ -150,18 +130,18 @@ #define ID_HELP_MANUAL 4009 #define ID_HELP_GPL 4010 #define ID_HELP_STATUS 4011 -#ifdef TOGGLE +#ifdef FEATURE_TOGGLE #define ID_TOGGLE_IJB 4012 -#endif +#endif /* def FEATURE_TOGGLE */ /* Break these out so they are easier to extend, but keep consecutive */ #define ID_TOOLS_EDITJUNKBUSTER 5000 #define ID_TOOLS_EDITACTIONS 5001 #define ID_TOOLS_EDITPERLRE 5002 -#ifdef TRUST_FILES +#ifdef FEATURE_TRUST #define ID_TOOLS_EDITTRUST 5003 -#endif /* def TRUST_FILES */ +#endif /* def FEATURE_TRUST */ /* * The following symbols are declared in in VC++. diff --git a/win32.h b/win32.h index da4164df..99e0e32e 100644 --- a/win32.h +++ b/win32.h @@ -1,6 +1,6 @@ #ifndef WIN32_H_INCLUDED #define WIN32_H_INCLUDED -#define WIN32_H_VERSION "$Id: win32.h,v 1.1.1.1 2001/05/15 13:59:08 oes Exp $" +#define WIN32_H_VERSION "$Id: win32.h,v 1.2 2001/07/29 18:43:08 jongfoster Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/win32.h,v $ @@ -33,6 +33,10 @@ * * Revisions : * $Log: win32.h,v $ + * Revision 1.2 2001/07/29 18:43:08 jongfoster + * Changing #ifdef _FILENAME_H to FILENAME_H_INCLUDED, to conform to + * ANSI C rules. + * * Revision 1.1.1.1 2001/05/15 13:59:08 oes * Initial import of version 2.9.3 source tree * @@ -66,7 +70,7 @@ extern const char win32_h_rcs[]; #endif #endif /* ndef WIN32_H_INCLUDED */ - + /* Local Variables: tab-width: 3