Now cleans up properly on FATAL (removes taskbar icon etc)
[privoxy.git] / showargs.c
index 0a7cc2c..77172e7 100644 (file)
@@ -1,7 +1,7 @@
-const char showargs_rcs[] = "$Id: showargs.c,v 1.1 2001/05/13 21:57:07 administrator Exp $";
+const char showargs_rcs[] = "$Id: showargs.c,v 1.4 2001/05/20 16:44:47 jongfoster Exp $";
 /*********************************************************************
  *
- * File        :  $Source: /home/administrator/cvs/ijb/showargs.c,v $
+ * File        :  $Source: /cvsroot/ijbswa/current/showargs.c,v $
  *
  * Purpose     :  Contains various utility routines needed to 
  *                generate the show-proxy-args page.
@@ -33,6 +33,28 @@ const char showargs_rcs[] = "$Id: showargs.c,v 1.1 2001/05/13 21:57:07 administr
  *
  * Revisions   :
  *    $Log: showargs.c,v $
+ *    Revision 1.4  2001/05/20 16:44:47  jongfoster
+ *    Removing last hardcoded JunkBusters.com URLs.
+ *
+ *    Revision 1.3  2001/05/20 01:21:20  jongfoster
+ *    Version 2.9.4 checkin.
+ *    - Merged popupfile and cookiefile, and added control over PCRS
+ *      filtering, in new "permissionsfile".
+ *    - Implemented LOG_LEVEL_FATAL, so that if there is a configuration
+ *      file error you now get a message box (in the Win32 GUI) rather
+ *      than the program exiting with no explanation.
+ *    - Made killpopup use the PCRS MIME-type checking and HTTP-header
+ *      skipping.
+ *    - Removed tabs from "config"
+ *    - Moved duplicated url parsing code in "loaders.c" to a new funcition.
+ *    - Bumped up version number.
+ *
+ *    Revision 1.2  2001/05/17 23:01:01  oes
+ *     - Cleaned CRLF's from the sources and related files
+ *
+ *    Revision 1.1.1.1  2001/05/15 13:59:03  oes
+ *    Initial import of version 2.9.3 source tree
+ *
  *
  *********************************************************************/
 \f
@@ -97,16 +119,16 @@ char *strsav(char *old, const char *text_to_append)
    {
       if ((p = realloc(old, new_len)) == NULL)
       {
-         log_error(LOG_LEVEL_ERROR, "realloc(%d) bytes for proxy_args failed!", new_len);
-         exit(1);
+         log_error(LOG_LEVEL_FATAL, "realloc(%d) bytes for proxy_args failed!", new_len);
+         /* Never get here - LOG_LEVEL_FATAL causes program exit */\r
       }
    }
    else
    {
       if ((p = (char *)malloc(new_len)) == NULL)
       {
-         log_error(LOG_LEVEL_ERROR, "malloc(%d) bytes for proxy_args failed!", new_len);
-         exit(1);
+         log_error(LOG_LEVEL_FATAL, "malloc(%d) bytes for proxy_args failed!", new_len);
+         /* Never get here - LOG_LEVEL_FATAL causes program exit */\r
       }
    }
 
@@ -212,7 +234,7 @@ void init_proxy_args(int argc, const char *argv[])
       "</h1></center>\n"
       "<h2>You are using the " BANNER " <sup><small><small>TM</small></small></sup></h2>\n"
       "Version: " VERSION "\n"
-      "<br>Home page: <a href=\"" HOME_PAGE_URL "\">" HOME_PAGE_URL "</a>\n"\r
+      "<br>Home page: <a href=\"" HOME_PAGE_URL "\">" HOME_PAGE_URL "</a>\n"
       "<p>\n"
    );
 
@@ -329,7 +351,8 @@ void end_proxy_args(void)
    SHOW_RCS(showargs_rcs)
    SHOW_RCS(ssplit_h_rcs)
    SHOW_RCS(ssplit_rcs)
-#ifdef _WIN32
+#ifdef _WIN32\r
+#ifndef _WIN_CONSOLE\r
    SHOW_RCS(w32log_h_rcs)
    SHOW_RCS(w32log_rcs)
    SHOW_RCS(w32res_h_rcs)
@@ -337,6 +360,7 @@ void end_proxy_args(void)
    SHOW_RCS(w32rulesdlg_rcs)
    SHOW_RCS(w32taskbar_h_rcs)
    SHOW_RCS(w32taskbar_rcs)
+#endif /* ndef _WIN_CONSOLE */\r
    SHOW_RCS(win32_h_rcs)
    SHOW_RCS(win32_rcs)
 #endif /* def _WIN32 */
@@ -352,30 +376,30 @@ void end_proxy_args(void)
 #else /* ifndef REGEX */
    b = strsav(b, "  <li><code>#undef <b>REGEX</b></code> - No support for regular expressions in the path specs.</li>\n");
 #endif /* ndef REGEX */
-\r
-#ifdef PCRE\r
-   b = strsav(b, "  <li><code>#define <b>PCRE</b></code> - Use PCRE rather than old GNU regex library.</li>\n");\r
-#else /* ifndef PCRE */\r
-   b = strsav(b, "  <li><code>#undef <b>PCRE</b></code> - Use old GNU regex library rather than PCRE.</li>\n");\r
-#endif /* ndef PCRE */\r
+
+#ifdef PCRE
+   b = strsav(b, "  <li><code>#define <b>PCRE</b></code> - Use PCRE rather than old GNU regex library.</li>\n");
+#else /* ifndef PCRE */
+   b = strsav(b, "  <li><code>#undef <b>PCRE</b></code> - Use old GNU regex library rather than PCRE.</li>\n");
+#endif /* ndef PCRE */
 
 #ifdef PCRS
    b = strsav(b, "  <li><code>#define <b>PCRS</b></code> - Enables arbitrary content modification regexps.</li>\n");
 #else /* ifndef PCRS */
    b = strsav(b, "  <li><code>#undef <b>PCRS</b></code> - Disables arbitrary content modification regexps.</li>\n");
 #endif /* ndef PCRS */
-\r
-#ifdef TOGGLE\r
-   b = strsav(b, "  <li><code>#define <b>TOGGLE</b></code> - Allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.</li>\n");\r
-#else /* ifndef TOGGLE */\r
-   b = strsav(b, "  <li><code>#undef <b>TOGGLE</b></code> - Do not allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.</li>\n");\r
-#endif /* ndef TOGGLE */\r
-\r
-#ifdef FORCE_LOAD\r
-   b = strsav(b, "  <li><code>#define <b>FORCE_LOAD</b></code> - Enables bypassing filtering for a single page using the prefix \"" FORCE_PREFIX "\".</li>\n");\r
-#else /* ifndef FORCE_LOAD */\r
-   b = strsav(b, "  <li><code>#undef <b>FORCE_LOAD</b></code> - Disables bypassing filtering for a single page.</li>\n");\r
-#endif /* ndef FORCE_LOAD */\r
+
+#ifdef TOGGLE
+   b = strsav(b, "  <li><code>#define <b>TOGGLE</b></code> - Allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.</li>\n");
+#else /* ifndef TOGGLE */
+   b = strsav(b, "  <li><code>#undef <b>TOGGLE</b></code> - Do not allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.</li>\n");
+#endif /* ndef TOGGLE */
+
+#ifdef FORCE_LOAD
+   b = strsav(b, "  <li><code>#define <b>FORCE_LOAD</b></code> - Enables bypassing filtering for a single page using the prefix \"" FORCE_PREFIX "\".</li>\n");
+#else /* ifndef FORCE_LOAD */
+   b = strsav(b, "  <li><code>#undef <b>FORCE_LOAD</b></code> - Disables bypassing filtering for a single page.</li>\n");
+#endif /* ndef FORCE_LOAD */
 
 #ifdef DENY_GZIP
    b = strsav(b, "  <li><code>#define <b>DENY_GZIP</b></code> - Prevents requests from being compressed - required for PCRS.</li>\n");
@@ -424,34 +448,36 @@ void end_proxy_args(void)
 #else /* ifndef ACL_FILES */
    b = strsav(b, "  <li><code>#undef <b>ACL_FILES</b></code> - Disables the use of ACL files to control access to the proxy by IP address.</li>\n");
 #endif /* ndef ACL_FILES */
-\r
+
 #ifdef TRUST_FILES
    b = strsav(b, "  <li><code>#define <b>TRUST_FILES</b></code> - Enables the use of trust files.</li>\n");
 #else /* ifndef TRUST_FILES */
    b = strsav(b, "  <li><code>#undef <b>TRUST_FILES</b></code> - Disables the use of trust files.</li>\n");
 #endif /* ndef TRUST_FILES */
 
-#ifdef JAR_FILES\r
-   b = strsav(b, "  <li><code>#define <b>JAR_FILES</b></code> - Enables the use of jar files to capture cookies.</li>\n");\r
-#else /* ifndef JAR_FILES */\r
-   b = strsav(b, "  <li><code>#undef <b>JAR_FILES</b></code> - Disables the use of jar files to capture cookies.</li>\n");\r
-#endif /* ndef JAR_FILES */\r
+#ifdef JAR_FILES
+   b = strsav(b, "  <li><code>#define <b>JAR_FILES</b></code> - Enables the use of jar files to capture cookies.</li>\n");
+#else /* ifndef JAR_FILES */
+   b = strsav(b, "  <li><code>#undef <b>JAR_FILES</b></code> - Disables the use of jar files to capture cookies.</li>\n");
+#endif /* ndef JAR_FILES */
+
+#ifdef FAST_REDIRECTS
+   b = strsav(b, "  <li><code>#define <b>FAST_REDIRECTS</b></code> - Enables intercepting remote script redirects.</li>\n");
+#else /* ifndef FAST_REDIRECTS */
+   b = strsav(b, "  <li><code>#undef <b>FAST_REDIRECTS</b></code> - Disables intercepting remote script redirects.</li>\n");
+#endif  ndef /* FAST_REDIRECTS */
 
    b = strsav(b, "</ul>\n<br>\n");
 
    b = strsav(b,
       "<small><small><p>\n"
-      "Code and documentation of the " BANNER " Proxy"
-      "<sup><small>TM</small></sup>\n"
-      "<a href=\"http://www.junkbusters.com/ht/en/legal.html#copy\">\n" "Copyright</a>&#169; 1997 Junkbusters Corporation\n"
-      "<a href=\"http://www.junkbusters.com/ht/en/legal.html#marks\"><sup><small>TM</small></sup></a><br>\n"
-      "Copying and distribution permitted under the"
-      "<a href=\"http://www.gnu.org/copyleft/gpl.html\">\n"
-      "<small>GNU</small></a> "
-      "General Public License.\n"
-      "</small>"
-      "<address><kbd>webmaster@junkbusters.com</kbd></address>"
-      "</small>"
+      "The " BANNER " Proxy - \n"\r
+      "<a href=\"" HOME_PAGE_URL "\">" HOME_PAGE_URL "</a><p>\n"\r
+      "Copyright &#169; 2001 <a href=\"" HOME_PAGE_URL "\">the SourceForge IJBSWA team</a><br>\n"\r
+      "Copyright &#169; 1997 <a href=\"http://www.junkbusters.com/\">\n" "Junkbusters Corporation</a><br>\n"
+      "Copying and distribution permitted under the "
+      "<a href=\"http://www.gnu.org/copyleft/gpl.html\">GNU General Public License.</a>\n"
+      "</small></small>"
       "</body></html>\n"
    );