]> git.ipfire.org Git - thirdparty/sarg.git/blame_incremental - include/conf.h
Use boolean to enable some options instead of string compares
[thirdparty/sarg.git] / include / conf.h
... / ...
CommitLineData
1#include "config.h"
2#include "info.h"
3
4#ifdef HAVE_WINDOWS_H
5#include <windows.h>
6#endif
7#ifdef HAVE_STDIO_H
8#include <stdio.h>
9#endif
10#ifdef HAVE_STDLIB_H
11#include <stdlib.h>
12#endif
13#ifdef HAVE_STRING_H
14#include <string.h>
15#endif
16#ifdef HAVE_STRINGS_H
17#include <strings.h>
18#endif
19#ifdef HAVE_SYS_TIME_H
20#include <sys/time.h>
21#endif
22#ifdef HAVE_TIME_H
23#include <time.h>
24#endif
25#ifdef HAVE_SYS_RESOURCE_H
26#include <sys/resource.h>
27#endif
28#ifdef HAVE_UNISTD_H
29#include <unistd.h>
30#endif
31#if defined(HAVE_SYS_DIRENT_H) && !defined(HAVE_DIRENT_H)
32#include <sys/dirent.h>
33#endif
34#ifdef HAVE_DIRENT_H
35#include <dirent.h>
36#endif
37#ifdef HAVE_SYS_SOCKET_H
38#include <sys/socket.h>
39#endif
40#ifdef HAVE_NETDB_H
41#include <netdb.h>
42#endif
43#ifdef HAVE_TYPES_H
44#include <types.h>
45#endif
46#ifdef HAVE_NETINET_IN_H
47#include <netinet/in.h>
48#endif
49#ifdef HAVE_ARPA_INET_H
50#include <arpa/inet.h>
51#endif
52#ifdef HAVE_SYS_STAT_H
53#include <sys/stat.h>
54#endif
55#ifdef HAVE_CTYPE_H
56#include <ctype.h>
57#endif
58#ifdef HAVE_ERRNO_H
59#include <errno.h>
60#endif
61#ifdef HAVE_SYS_WAIT_H
62#include <sys/wait.h>
63#endif
64#ifdef HAVE_GD_H
65#include <gd.h>
66#define HAVE_GD
67gdImagePtr im;
68gdPoint points[4];
69#endif
70#ifdef HAVE_GDFONTL_H
71#include <gdfontl.h>
72#endif
73#ifdef HAVE_GDFONTT_H
74#include <gdfontt.h>
75#endif
76#ifdef HAVE_GDFONTS_H
77#include <gdfonts.h>
78#endif
79#ifdef HAVE_GDFONTMB_H
80#include <gdfontmb.h>
81#endif
82#ifdef HAVE_GDFONTG_H
83#include <gdfontg.h>
84#endif
85#ifdef HAVE_STDARG_H
86#include <stdarg.h>
87#endif
88#ifdef HAVE_INTTYPES_H
89#include <inttypes.h>
90#endif
91#ifdef HAVE_LIMITS_H
92#include <limits.h>
93#endif
94#ifdef HAVE_WINSOCK_H
95#include <winsock.h>
96#endif
97#ifdef HAVE_LOCALE_H
98#include <locale.h>
99#endif
100
101#if defined(HAVE_FOPEN64)
102#define _FILE_OFFSET_BITS 64
103#define MY_FOPEN fopen64
104#else
105#define MY_FOPEN fopen
106#endif
107
108#if !defined(HAVE_BZERO)
109#define bzero(mem,size) memset(mem,0,size)
110#endif
111
112#if defined(IBERTY_LIB) && !defined(HAVE_MKSTEMP)
113int mkstemps(char *template, int suffixlen);
114#define mkstemp(template) mkstemps(template,0)
115#endif
116
117#if defined(__MINGW32__)
118#define mkdir(p,m) _mkdir(p)
119
120#ifndef WIFEXITED
121 #define WIFEXITED(S) 1
122#endif
123
124#ifndef WEXITSTATUS
125 #define WEXITSTATUS(S) (S)
126#endif
127
128#endif /*__MINGW32__*/
129
130#define MAXLEN 20000
131#define MAXLOGS 255
132
133long long int my_atoll (const char *nptr);
134
135FILE *fp_tt;
136
137char outdir[MAXLEN];
138char dirname[MAXLEN];
139char buf[MAXLEN];
140char url[MAXLEN];
141char urly[MAXLEN];
142char user[MAXLEN];
143char period[MAXLEN];
144char msg[1024];
145char per_hour[128];
146char code[MAXLEN];
147char code2[MAXLEN];
148char tmp[MAXLEN];
149char tmp2[MAXLEN];
150char tmp3[MAXLEN];
151char tmp4[MAXLEN];
152char tmp5[MAXLEN];
153char tmp6[MAXLEN];
154char tmp7[MAXLEN];
155char parse_out[MAXLEN];
156char arqtt[MAXLEN];
157char html[MAXLEN];
158char datestimes[MAXLEN];
159char ConfigFile[MAXLEN];
160char href[MAXLEN];
161char href2[MAXLEN];
162char href3[MAXLEN];
163char df[20];
164char day[3], month[4], year[5];
165char nmonth[30];
166char ltext110[50];
167char cdfrom[30];
168char cduntil[30];
169char LastLog[5];
170char RemoveTempFiles[4];
171char ReplaceIndex[256];
172char Index[20];
173char OverwriteReport[4];
174char u2[255];
175char RecordsWithoutUser[20];
176char UseComma[4];
177char MailUtility[PATH_MAX];
178char TopSitesNum[20];
179int TopUsersNum;
180char ExcludeCodes[256];
181char TopsitesSortField[15];
182char TopsitesSortType[20];
183char ReportType[255];
184char UserTabFile[255];
185char warea[MAXLEN];
186char name[MAXLEN];
187int LongUrl;
188int Ip2Name;
189char language[255];
190char bufy[MAXLEN];
191int NAccessLog;
192char AccessLog[MAXLOGS][MAXLEN];
193int AccessLogFromCmdLine;
194char Title[MAXLEN];
195char BgColor[MAXLEN];
196char BgImage[MAXLEN];
197char TxColor[MAXLEN];
198char TxBgColor[MAXLEN];
199char TiColor[MAXLEN];
200char LogoImage[MAXLEN];
201char LogoText[MAXLEN];
202char LogoTextColor[MAXLEN];
203char Width[MAXLEN];
204char Height[MAXLEN];
205char FontFace[MAXLEN];
206char HeaderColor[MAXLEN];
207char HeaderBgColor[MAXLEN];
208char FontSize[MAXLEN];
209char PasswdFile[MAXLEN];
210char TempDir[MAXLEN];
211char OutputDir[MAXLEN];
212char OutputEmail[MAXLEN];
213char TopuserSortField[30];
214char UserSortField[30];
215char TopuserSortOrder[10];
216char UserSortOrder[10];
217char UserAgentLog[255];
218char module[255];
219char ExcludeHosts[255];
220char ExcludeUsers[255];
221char DateFormat[2];
222char PerUserLimitFile[255];
223char PerUserLimit[20];
224int UserIp;
225char MaxElapsed[255];
226char datetimeby[10];
227char csort[255];
228char CharSet[255];
229char UserInvalidChar[255];
230char Graphs[5];
231char GraphDaysBytesBarColor[255];
232char Privacy[10];
233char PrivacyString[255];
234char PrivacyStringColor[30];
235char IncludeUsers[MAXLEN];
236char ExcludeString[MAXLEN];
237char SuccessfulMsg[5];
238char TopUserFields[255];
239char UserReportFields[255];
240char DataFile[MAXLEN];
241char DataFileDelimiter[3];
242char DataFileFields[MAXLEN];
243char DataFileUrl[20];
244char SiteUserTimeDateType[10];
245char ShowReadStatistics[5];
246char IndexSortOrder[5];
247char DansGuardianConf[MAXLEN];
248char DansguardianIgnoreDate[10];
249char SquidGuardConf[MAXLEN];
250char SquidGuarddbHome[255];
251char SquidGuardLogFormat[MAXLEN];
252char SquidGuardLogAlternate[MAXLEN];
253char SquidguardIgnoreDate[10];
254char ShowSargInfo[5];
255char BytesInSitesUsersReport[10];
256char ShowSargLogo[5];
257char ParsedOutputLog[MAXLEN];
258char ParsedOutputLogCompress[255];
259char DisplayedValues[20];
260char HeaderFontSize[5];
261char TitleFontSize[5];
262char wwwDocumentRoot[MAXLEN];
263char ExternalCSSFile[MAXLEN];
264char BlockIt[255];
265char BlockImage[512];
266char NtlmUserFormat[30];
267char hbc1[30];
268char hbc2[255];
269char hbc3[30];
270char hbc4[30];
271char hbc5[30];
272char hbc6[30];
273char hbc7[30];
274char hbc8[30];
275char hbc9[30];
276char hbc10[30];
277char IndexTree[10];
278char UserAuthentication[10];
279char AuthUserFile[255];
280char AuthName[512];
281char AuthType[255];
282char Require[512];
283char *userfile;
284char *str;
285char *str2;
286char text[200][255];
287char val1[MAXLEN];
288char val2[MAXLEN];
289char val3[MAXLEN];
290char val4[MAXLEN];
291char val5[MAXLEN];
292char val6[MAXLEN];
293char val7[MAXLEN];
294char val8[MAXLEN];
295char val9[MAXLEN];
296char val10[MAXLEN];
297char val11[MAXLEN];
298char wwork1[MAXLEN];
299char wwork2[MAXLEN];
300char wwork3[MAXLEN];
301char mask[MAXLEN];
302char httplink[MAXLEN];
303char html_old[MAXLEN];
304char site[MAXLEN];
305char us[50];
306char email[MAXLEN];
307char test[1];
308char ouser2[255];
309char user2[MAXLEN];
310char wentp[512];
311char addr[MAXLEN];
312char Ulimit[6];
313char RealtimeTypes[1024];
314char cmd[255];
315char ImageFile[255];
316char tbuf[128];
317char ip[25];
318char RealtimeUnauthRec[15];
319
320int idate;
321int smartfilter;
322int denied_count;
323int download_count;
324int authfail_count;
325int dansguardian_count;
326int squidguard_count;
327int limit_flag;
328int color1;
329int color2;
330int color3;
331int z1, z2, z3;
332int ttopen;
333int ind2;
334int sarglog;
335int isalog;
336int dfrom;
337int duntil;
338int dataonly;
339int indexonly;
340int iprel;
341int userip;
342int langcode;
343int debug;
344int debugz;
345int debugm;
346int AuthfailReportLimit;
347int DeniedReportLimit;
348int DownloadReportLimit;
349int SiteUsersReportLimit;
350int DansGuardianReportLimit;
351int SquidGuardReportLimit;
352int UserReportLimit;
353int dotinuser;
354int realtime_refresh;
355int realtime_access_log_lines;
356int realt;
357int rc;
358int ntopsites;
359int nsitesusers;
360int nrepday;
361int ndownload;
362int ntopuser;
363int squid24;
364float perc;
365
366long long int nocost;
367float cost;
368
369typedef struct
370{ int list[ 24 ];
371 int len;
372} numlist;
373
374DIR *dirp;
375struct dirent *direntp;