]> git.ipfire.org Git - thirdparty/sarg.git/blame - include/conf.h
Add embryo of translation for the French language
[thirdparty/sarg.git] / include / conf.h
CommitLineData
b3695c67 1#include "config.h"
25697a35 2#include "info.h"
e3af0ae9 3#include "btree_cache.h"
25697a35 4
b3695c67
FM
5#ifdef HAVE_WINDOWS_H
6#include <windows.h>
7#endif
8#ifdef HAVE_STDIO_H
25697a35
GS
9#include <stdio.h>
10#endif
b3695c67 11#ifdef HAVE_STDLIB_H
25697a35
GS
12#include <stdlib.h>
13#endif
b3695c67 14#ifdef HAVE_STRING_H
25697a35
GS
15#include <string.h>
16#endif
b3695c67 17#ifdef HAVE_STRINGS_H
25697a35
GS
18#include <strings.h>
19#endif
b3695c67 20#ifdef HAVE_SYS_TIME_H
25697a35
GS
21#include <sys/time.h>
22#endif
b3695c67 23#ifdef HAVE_TIME_H
25697a35
GS
24#include <time.h>
25#endif
b3695c67 26#ifdef HAVE_SYS_RESOURCE_H
25697a35
GS
27#include <sys/resource.h>
28#endif
b3695c67 29#ifdef HAVE_UNISTD_H
25697a35
GS
30#include <unistd.h>
31#endif
b3695c67 32#if defined(HAVE_SYS_DIRENT_H) && !defined(HAVE_DIRENT_H)
25697a35
GS
33#include <sys/dirent.h>
34#endif
b3695c67 35#ifdef HAVE_DIRENT_H
25697a35
GS
36#include <dirent.h>
37#endif
b3695c67 38#ifdef HAVE_SYS_SOCKET_H
25697a35
GS
39#include <sys/socket.h>
40#endif
b3695c67 41#ifdef HAVE_NETDB_H
25697a35
GS
42#include <netdb.h>
43#endif
b3695c67 44#ifdef HAVE_TYPES_H
25697a35
GS
45#include <types.h>
46#endif
b3695c67 47#ifdef HAVE_NETINET_IN_H
25697a35
GS
48#include <netinet/in.h>
49#endif
b3695c67 50#ifdef HAVE_ARPA_INET_H
25697a35
GS
51#include <arpa/inet.h>
52#endif
b3695c67 53#ifdef HAVE_SYS_STAT_H
25697a35
GS
54#include <sys/stat.h>
55#endif
b3695c67 56#ifdef HAVE_CTYPE_H
25697a35
GS
57#include <ctype.h>
58#endif
b3695c67 59#ifdef HAVE_ERRNO_H
25697a35
GS
60#include <errno.h>
61#endif
b3695c67 62#ifdef HAVE_SYS_WAIT_H
d96e3ba6
FM
63#include <sys/wait.h>
64#endif
b3695c67 65#ifdef HAVE_GD_H
25697a35
GS
66#include <gd.h>
67#define HAVE_GD
68gdImagePtr im;
69gdPoint points[4];
70#endif
b3695c67 71#ifdef HAVE_GDFONTL_H
25697a35
GS
72#include <gdfontl.h>
73#endif
b3695c67 74#ifdef HAVE_GDFONTT_H
25697a35
GS
75#include <gdfontt.h>
76#endif
b3695c67 77#ifdef HAVE_GDFONTS_H
25697a35
GS
78#include <gdfonts.h>
79#endif
b3695c67 80#ifdef HAVE_GDFONTMB_H
25697a35
GS
81#include <gdfontmb.h>
82#endif
b3695c67 83#ifdef HAVE_GDFONTG_H
25697a35
GS
84#include <gdfontg.h>
85#endif
b3695c67 86#ifdef HAVE_STDARG_H
d2fe0c32
FM
87#include <stdarg.h>
88#endif
b3695c67 89#ifdef HAVE_INTTYPES_H
2357ef77
FM
90#include <inttypes.h>
91#endif
b3695c67 92#ifdef HAVE_LIMITS_H
4af2f8ff
FM
93#include <limits.h>
94#endif
b3695c67
FM
95#ifdef HAVE_WINSOCK_H
96#include <winsock.h>
97#endif
e3af0ae9
PO
98#ifdef HAVE_MATH_H
99#include <math.h>
100#endif
a1de61fe
FM
101#ifdef HAVE_LOCALE_H
102#include <locale.h>
103#endif
e6414a9d
FM
104#ifdef HAVE_EXECINFO_H
105#include <execinfo.h>
106#endif
25697a35 107
b3695c67 108#if defined(HAVE_FOPEN64)
25697a35 109#define _FILE_OFFSET_BITS 64
936c9905 110#define MY_FOPEN fopen64
25697a35
GS
111#else
112#define MY_FOPEN fopen
113#endif
114
b3695c67
FM
115#if !defined(HAVE_BZERO)
116#define bzero(mem,size) memset(mem,0,size)
117#endif
118
119#if defined(IBERTY_LIB) && !defined(HAVE_MKSTEMP)
120int mkstemps(char *template, int suffixlen);
121#define mkstemp(template) mkstemps(template,0)
122#endif
123
c0ec9cc7
FM
124#ifdef ENABLE_NLS
125#include <libintl.h>
126#define _(String) gettext(String)
127#ifdef gettext_noop
128#define N_(String) gettext_noop(String)
129#else
130#define N_(String) (String)
131#endif
132#else /* No NLS */
133#define _(String) (String)
134#define N_(String) (String)
135#define textdomain(String)
136#define bindtextdomain(Domain,Directory)
137#endif
138
b3695c67
FM
139#if defined(__MINGW32__)
140#define mkdir(p,m) _mkdir(p)
141
142#ifndef WIFEXITED
143 #define WIFEXITED(S) 1
144#endif
145
146#ifndef WEXITSTATUS
147 #define WEXITSTATUS(S) (S)
148#endif
149
150#endif /*__MINGW32__*/
25697a35
GS
151
152#define MAXLEN 20000
0a4e18e1 153#define MAXLOGS 255
25697a35 154
085c1e1f
FM
155#define REPORT_TYPE_USERS_SITES 0x0001UL
156#define REPORT_TYPE_SITE_USER_TIME_DATE 0x0002UL
157#define REPORT_TYPE_TOPUSERS 0x0004UL
158#define REPORT_TYPE_TOPSITES 0x0008UL
159#define REPORT_TYPE_SITES_USERS 0x0010UL
160#define REPORT_TYPE_DATE_TIME 0x0020UL
161#define REPORT_TYPE_DENIED 0x0040UL
162#define REPORT_TYPE_AUTH_FAILURES 0x0080UL
163#define REPORT_TYPE_DOWNLOADS 0x0100UL
164
165#define DATA_FIELD_USER 0x0001UL
166#define DATA_FIELD_DATE 0x0002UL
167#define DATA_FIELD_TIME 0x0004UL
168#define DATA_FIELD_URL 0x0008UL
169#define DATA_FIELD_CONNECT 0x0010UL
170#define DATA_FIELD_BYTES 0x0020UL
171#define DATA_FIELD_IN_CACHE 0x0040UL
172#define DATA_FIELD_OUT_CACHE 0x0080UL
173#define DATA_FIELD_ELAPSED 0x0100UL
174
175#define TOPUSERFIELDS_NUM 0x0001UL
176#define TOPUSERFIELDS_DATE_TIME 0x0002UL
177#define TOPUSERFIELDS_USERID 0x0004UL
178#define TOPUSERFIELDS_CONNECT 0x0008UL
179#define TOPUSERFIELDS_BYTES 0x0010UL
180#define TOPUSERFIELDS_SETYB 0x0020UL
181#define TOPUSERFIELDS_IN_CACHE_OUT 0x0040UL
182#define TOPUSERFIELDS_USED_TIME 0x0080UL
183#define TOPUSERFIELDS_MILISEC 0x0100UL
184#define TOPUSERFIELDS_PTIME 0x0200UL
185#define TOPUSERFIELDS_TOTAL 0x0400UL
186#define TOPUSERFIELDS_AVERAGE 0x0800UL
187
188#define USERREPORTFIELDS_CONNECT 0x0001UL
189#define USERREPORTFIELDS_BYTES 0x0002UL
190#define USERREPORTFIELDS_SETYB 0x0004UL
191#define USERREPORTFIELDS_IN_CACHE_OUT 0x0008UL
192#define USERREPORTFIELDS_USED_TIME 0x0010UL
193#define USERREPORTFIELDS_MILISEC 0x0020UL
194#define USERREPORTFIELDS_PTIME 0x0040UL
195#define USERREPORTFIELDS_TOTAL 0x0080UL
196#define USERREPORTFIELDS_AVERAGE 0x0100UL
197
0349fa24
FM
198#define INDEX_YES 0x0001UL
199#define INDEX_NO 0x0002UL
200#define INDEX_ONLY 0x0004UL
201
202#define INDEX_TREE_DATE 0x0001UL
203#define INDEX_TREE_FILE 0x0002UL
204
2357ef77 205FILE *fp_tt;
25697a35
GS
206
207char outdir[MAXLEN];
208char dirname[MAXLEN];
209char buf[MAXLEN];
210char url[MAXLEN];
211char urly[MAXLEN];
212char user[MAXLEN];
d6e703cc 213char period[MAXLEN];
d6e703cc
FM
214char code[MAXLEN];
215char code2[MAXLEN];
25697a35 216char tmp[MAXLEN];
25697a35
GS
217char tmp3[MAXLEN];
218char tmp4[MAXLEN];
219char tmp5[MAXLEN];
220char tmp6[MAXLEN];
d6e703cc 221char tmp7[MAXLEN];
25697a35
GS
222char parse_out[MAXLEN];
223char arqtt[MAXLEN];
224char html[MAXLEN];
225char datestimes[MAXLEN];
226char ConfigFile[MAXLEN];
227char href[MAXLEN];
228char href2[MAXLEN];
229char href3[MAXLEN];
230char df[20];
491b862f 231char day[3], month[4], year[5];
25697a35
GS
232char ltext110[50];
233char cdfrom[30];
234char cduntil[30];
0511cf2d 235int LastLog;
e6414a9d 236int RemoveTempFiles;
25697a35 237char ReplaceIndex[256];
0349fa24 238unsigned long int Index;
e6414a9d 239int OverwriteReport;
d6e703cc 240char u2[255];
25697a35 241char RecordsWithoutUser[20];
e6414a9d 242int UseComma;
4af2f8ff 243char MailUtility[PATH_MAX];
c0ec9cc7 244int TopSitesNum;
fb7c5f27 245int TopUsersNum;
25697a35
GS
246char ExcludeCodes[256];
247char TopsitesSortField[15];
491b862f 248char TopsitesSortType[20];
085c1e1f 249unsigned long int ReportType;
25697a35
GS
250char UserTabFile[255];
251char warea[MAXLEN];
252char name[MAXLEN];
246c8489
FM
253int LongUrl;
254int Ip2Name;
25697a35 255char language[255];
d6e703cc 256char bufy[MAXLEN];
0a4e18e1
FM
257int NAccessLog;
258char AccessLog[MAXLOGS][MAXLEN];
259int AccessLogFromCmdLine;
25697a35
GS
260char Title[MAXLEN];
261char BgColor[MAXLEN];
262char BgImage[MAXLEN];
263char TxColor[MAXLEN];
264char TxBgColor[MAXLEN];
265char TiColor[MAXLEN];
266char LogoImage[MAXLEN];
267char LogoText[MAXLEN];
268char LogoTextColor[MAXLEN];
269char Width[MAXLEN];
270char Height[MAXLEN];
271char FontFace[MAXLEN];
272char HeaderColor[MAXLEN];
273char HeaderBgColor[MAXLEN];
274char FontSize[MAXLEN];
275char PasswdFile[MAXLEN];
276char TempDir[MAXLEN];
277char OutputDir[MAXLEN];
278char OutputEmail[MAXLEN];
279char TopuserSortField[30];
280char UserSortField[30];
281char TopuserSortOrder[10];
282char UserSortOrder[10];
283char UserAgentLog[255];
284char module[255];
285char ExcludeHosts[255];
286char ExcludeUsers[255];
287char DateFormat[2];
288char PerUserLimitFile[255];
e6414a9d 289int PerUserLimit;
246c8489 290int UserIp;
25697a35
GS
291char MaxElapsed[255];
292char datetimeby[10];
293char csort[255];
294char CharSet[255];
295char UserInvalidChar[255];
e6414a9d 296int Graphs;
25697a35 297char GraphDaysBytesBarColor[255];
e6414a9d 298int Privacy;
25697a35
GS
299char PrivacyString[255];
300char PrivacyStringColor[30];
301char IncludeUsers[MAXLEN];
302char ExcludeString[MAXLEN];
e6414a9d 303int SuccessfulMsg;
085c1e1f
FM
304unsigned long int TopUserFields;
305unsigned long int UserReportFields;
25697a35
GS
306char DataFile[MAXLEN];
307char DataFileDelimiter[3];
085c1e1f 308unsigned long int DataFileFields;
491b862f 309char DataFileUrl[20];
25697a35 310char SiteUserTimeDateType[10];
e6414a9d 311int ShowReadStatistics;
25697a35
GS
312char IndexSortOrder[5];
313char DansGuardianConf[MAXLEN];
e6414a9d 314int DansguardianIgnoreDate;
25697a35
GS
315char SquidGuardConf[MAXLEN];
316char SquidGuarddbHome[255];
317char SquidGuardLogFormat[MAXLEN];
491b862f 318char SquidGuardLogAlternate[MAXLEN];
e6414a9d
FM
319int SquidguardIgnoreDate;
320int ShowSargInfo;
321int BytesInSitesUsersReport;
322int ShowSargLogo;
25697a35 323char ParsedOutputLog[MAXLEN];
ff8d5836 324char ParsedOutputLogCompress[512];
25697a35 325char DisplayedValues[20];
933aca19 326char HeaderFontSize[5];
491b862f 327char TitleFontSize[5];
25697a35
GS
328char wwwDocumentRoot[MAXLEN];
329char ExternalCSSFile[MAXLEN];
330char BlockIt[255];
331char BlockImage[512];
332char NtlmUserFormat[30];
0349fa24 333unsigned long int IndexTree;
e6414a9d 334int UserAuthentication;
25697a35
GS
335char AuthUserFile[255];
336char AuthName[512];
337char AuthType[255];
338char Require[512];
25697a35
GS
339char *str;
340char *str2;
341char text[200][255];
342char val1[MAXLEN];
343char val2[MAXLEN];
344char val3[MAXLEN];
345char val4[MAXLEN];
346char val5[MAXLEN];
347char val6[MAXLEN];
348char val7[MAXLEN];
349char val8[MAXLEN];
350char val9[MAXLEN];
351char val10[MAXLEN];
352char val11[MAXLEN];
353char wwork1[MAXLEN];
354char wwork2[MAXLEN];
355char wwork3[MAXLEN];
25697a35 356char mask[MAXLEN];
25697a35 357char html_old[MAXLEN];
25697a35
GS
358char site[MAXLEN];
359char us[50];
360char email[MAXLEN];
361char test[1];
362char ouser2[255];
363char user2[MAXLEN];
364char wentp[512];
365char addr[MAXLEN];
491b862f
GS
366char Ulimit[6];
367char RealtimeTypes[1024];
25697a35 368char cmd[255];
491b862f
GS
369char ImageFile[255];
370char tbuf[128];
371char ip[25];
372char RealtimeUnauthRec[15];
e3af0ae9
PO
373char LDAPHost[255];
374char LDAPBindDN[512];
375char LDAPBindPW[255];
965c4a6f
FM
376int LDAPPort;
377int LDAPProtocolVersion;
e3af0ae9
PO
378char LDAPBaseSearch[255];
379char LDAPFilterSearch[512];
380char LDAPTargetAttr[64];
491b862f 381
25697a35
GS
382int idate;
383int smartfilter;
384int denied_count;
385int download_count;
386int authfail_count;
387int dansguardian_count;
388int squidguard_count;
c0ec9cc7 389int useragent_count;
25697a35
GS
390int limit_flag;
391int color1;
392int color2;
393int color3;
394int z1, z2, z3;
395int ttopen;
396int ind2;
397int sarglog;
398int isalog;
2357ef77 399int dfrom;
25697a35
GS
400int duntil;
401int dataonly;
402int indexonly;
403int iprel;
404int userip;
405int langcode;
406int debug;
407int debugz;
408int debugm;
409int AuthfailReportLimit;
410int DeniedReportLimit;
94ff9470 411int DownloadReportLimit;
25697a35
GS
412int SiteUsersReportLimit;
413int DansGuardianReportLimit;
414int SquidGuardReportLimit;
415int UserReportLimit;
94ff9470 416int dotinuser;
491b862f
GS
417int realtime_refresh;
418int realtime_access_log_lines;
419int realt;
491b862f 420int rc;
d6e703cc
FM
421int ntopsites;
422int nsitesusers;
423int nrepday;
424int ndownload;
425int ntopuser;
426int squid24;
25697a35
GS
427float perc;
428
491b862f
GS
429long long int nocost;
430float cost;
25697a35
GS
431
432typedef struct
433{ int list[ 24 ];
434 int len;
435} numlist;
436
437DIR *dirp;
438struct dirent *direntp;