Now cleans up properly on FATAL (removes taskbar icon etc)
[privoxy.git] / loadcfg.h
1 #ifndef _LOADCFG_H
2 #define _LOADCFG_H
3 #define LOADCFG_H_VERSION "$Id: loadcfg.h,v 1.3 2001/05/20 01:21:20 jongfoster Exp $"
4 /*********************************************************************
5  *
6  * File        :  $Source: /cvsroot/ijbswa/current/loadcfg.h,v $
7  *
8  * Purpose     :  Loads settings from the configuration file into
9  *                global variables.  This file contains both the 
10  *                routine to load the configuration and the global
11  *                variables it writes to.
12  *
13  * Copyright   :  Written by and Copyright (C) 2001 the SourceForge
14  *                IJBSWA team.  http://ijbswa.sourceforge.net
15  *
16  *                Based on the Internet Junkbuster originally written
17  *                by and Copyright (C) 1997 Anonymous Coders and 
18  *                Junkbusters Corporation.  http://www.junkbusters.com
19  *
20  *                This program is free software; you can redistribute it 
21  *                and/or modify it under the terms of the GNU General
22  *                Public License as published by the Free Software
23  *                Foundation; either version 2 of the License, or (at
24  *                your option) any later version.
25  *
26  *                This program is distributed in the hope that it will
27  *                be useful, but WITHOUT ANY WARRANTY; without even the
28  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
29  *                PARTICULAR PURPOSE.  See the GNU General Public
30  *                License for more details.
31  *
32  *                The GNU General Public License should be included with
33  *                this file.  If not, you can view it at
34  *                http://www.gnu.org/copyleft/gpl.html
35  *                or write to the Free Software Foundation, Inc., 59
36  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
37  *
38  * Revisions   :
39  *    $Log: loadcfg.h,v $
40  *    Revision 1.3  2001/05/20 01:21:20  jongfoster
41  *    Version 2.9.4 checkin.
42  *    - Merged popupfile and cookiefile, and added control over PCRS
43  *      filtering, in new "permissionsfile".
44  *    - Implemented LOG_LEVEL_FATAL, so that if there is a configuration
45  *      file error you now get a message box (in the Win32 GUI) rather
46  *      than the program exiting with no explanation.
47  *    - Made killpopup use the PCRS MIME-type checking and HTTP-header
48  *      skipping.
49  *    - Removed tabs from "config"
50  *    - Moved duplicated url parsing code in "loaders.c" to a new funcition.
51  *    - Bumped up version number.
52  *
53  *    Revision 1.2  2001/05/17 23:01:01  oes
54  *     - Cleaned CRLF's from the sources and related files
55  *
56  *    Revision 1.1.1.1  2001/05/15 13:58:58  oes
57  *    Initial import of version 2.9.3 source tree
58  *
59  *
60  *********************************************************************/
61 \f
62
63 /* Declare struct FILE for vars and funcs. */
64 #include <stdio.h>
65
66 /* All of our project's data types. */
67 #include "project.h"
68
69 #ifdef __cplusplus
70 extern "C" {
71 #endif
72
73 /* Global variables */
74
75 #ifdef TOGGLE
76 /* indicates if ijb is enabled */
77 extern int g_bToggleIJB;
78 #endif
79
80 extern int debug;
81 extern int multi_threaded;
82
83 #if defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST)
84 extern int tinygif;
85 extern const char *tinygifurl;
86 #endif /* defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) */
87
88 extern const char *logfile;
89
90 extern const char *configfile;
91
92 #ifdef ACL_FILES
93 extern const char *aclfile;
94 #endif /* def ACL_FILES */
95
96 extern const char *blockfile;
97 extern const char *permissions_file;
98 extern const char *forwardfile;
99
100 #ifdef USE_IMAGE_LIST
101 extern const char *imagefile;
102 #endif /* def USE_IMAGE_LIST */
103
104 #ifdef TRUST_FILES
105 extern const char *trustfile;
106 #endif /* def TRUST_FILES */
107
108 #ifdef PCRS
109 extern const char *re_filterfile;
110 #endif /* def PCRS */
111
112 #ifdef FAST_REDIRECTS
113 extern int fast_redirects;
114 #endif /* def FAST_REDIRECTS */
115
116 extern int default_permissions;
117
118 #ifdef JAR_FILES
119 extern const char *jarfile;
120 extern FILE *jar;
121 #endif /* def JAR_FILES */
122
123 extern const char *referrer;
124 extern const char *uagent;
125 extern const char *from;
126
127 #ifndef SPLIT_PROXY_ARGS
128 extern const char *suppress_message;
129 #endif /* ndef SPLIT_PROXY_ARGS */
130
131 extern int suppress_vanilla_wafer;
132 extern int add_forwarded;
133
134 extern struct list wafer_list[];
135 extern struct list xtra_list[];
136
137 #ifdef TRUST_FILES
138 extern struct list trust_info[];
139 extern struct url_spec *trust_list[];
140 #endif /* def TRUST_FILES */
141
142 extern const char *haddr;
143 extern int   hport;
144
145 #ifndef SPLIT_PROXY_ARGS
146 extern int suppress_blocklists;  /* suppress listing sblock and simage */
147 #endif /* ndef SPLIT_PROXY_ARGS */
148
149 extern struct proxy_args proxy_args[1];
150
151 extern int configret; /* FIXME: This is obsolete, always 0. */
152 extern int config_changed;
153
154
155 /* The load_config function is now going to call:
156  * init_proxy_args, so it will need argc and argv.
157  * Since load_config will also be a signal handler,
158  * we need to have these globally available.
159  */
160 extern int Argc;
161 extern const char **Argv;
162
163
164 extern void load_config( int );
165
166
167 /* Revision control strings from this header and associated .c file */
168 extern const char loadcfg_rcs[];
169 extern const char loadcfg_h_rcs[];
170
171 #ifdef __cplusplus
172 } /* extern "C" */
173 #endif
174
175 #endif /* ndef _JCC_H */
176
177 /*
178   Local Variables:
179   tab-width: 3
180   end:
181 */