]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Quote more file names in messages
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Fri, 26 Dec 2014 13:42:09 +0000 (14:42 +0100)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Fri, 26 Dec 2014 13:42:09 +0000 (14:42 +0100)
For consistency, the file names reported in messages are always quoted in
the output string. These messages were overlooked in the previous commits.

26 files changed:
authfail.c
convlog.c
dansguardian_log.c
dansguardian_report.c
datafile.c
denied.c
download.c
email.c
getconf.c
html.c
index.c
ip2name.c
lastlog.c
log.c
realtime.c
redirector.c
repday.c
report.c
siteuser.c
smartfilter.c
sort.c
topsites.c
topuser.c
useragent.c
usertab.c
util.c

index 0900f0a0b163c8914541c8e64da14a9a7aee0523..36e5e648cd5aa439e49444f19ffa016730177dc9 100644 (file)
@@ -122,23 +122,23 @@ void authfail_report(void)
        while((buf=longline_read(fp_in,line))!=NULL) {
                getword_start(&gwarea,buf);
                if (getword(data,sizeof(data),&gwarea,'\t')<0) {
-                       debuga(_("There is a broken date in file %s\n"),authfail_in);
+                       debuga(_("Invalid date in file \"%s\"\n"),authfail_in);
                        exit(EXIT_FAILURE);
                }
                if (getword(hora,sizeof(hora),&gwarea,'\t')<0) {
-                       debuga(_("There is a broken time in file %s\n"),authfail_in);
+                       debuga(_("Invalid time in file \"%s\"\n"),authfail_in);
                        exit(EXIT_FAILURE);
                }
                if (getword(user,sizeof(user),&gwarea,'\t')<0) {
-                       debuga(_("There is a broken user ID in file %s\n"),authfail_in);
+                       debuga(_("Invalid user in file \"%s\"\n"),authfail_in);
                        exit(EXIT_FAILURE);
                }
                if (getword(ip,sizeof(ip),&gwarea,'\t')<0) {
-                       debuga(_("There is a broken IP address in file %s\n"),authfail_in);
+                       debuga(_("Invalid IP address in file \"%s\"\n"),authfail_in);
                        exit(EXIT_FAILURE);
                }
                if (getword_ptr(buf,&url,&gwarea,'\t')<0) {
-                       debuga(_("There is a broken url in file %s\n"),authfail_in);
+                       debuga(_("Invalid url in file \"%s\"\n"),authfail_in);
                        exit(EXIT_FAILURE);
                }
                if (sscanf(data,"%d/%d/%d",&day,&month,&year)!=3) continue;
@@ -147,7 +147,7 @@ void authfail_report(void)
 
                uinfo=userinfo_find_from_id(user);
                if (!uinfo) {
-                       debuga(_("Unknown user ID %s in file %s\n"),user,authfail_in);
+                       debuga(_("Unknown user ID %s in file \"%s\"\n"),user,authfail_in);
                        exit(EXIT_FAILURE);
                }
 
index cb77aeaa18185b2cc9ec574f2c8cf0fed867a7ef..5b6190c354890f3bea9dafed7f95a88f0f32a126 100644 (file)
--- a/convlog.c
+++ b/convlog.c
@@ -57,7 +57,7 @@ void convlog(const char *arq, char *df, int dfrom, int duntil)
        while((buf=longline_read(fp_in,line))!=NULL) {
                getword_start(&gwarea,buf);
                if (getword(data,sizeof(data),&gwarea,' ')<0) {
-                       debuga(_("Maybe you have a broken record or garbage in file %s\n"),arq);
+                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                        exit(EXIT_FAILURE);
                }
                tt=atoi(data);
index 627239e9e63fb0079f2686d972defd0a6bfa5907..3fde0157d287337b14990011881f1df4c5a542d2 100644 (file)
@@ -69,7 +69,7 @@ void dansguardian_log(void)
                if(strstr(buf,"loglocation ") != 0) {
                        getword_start(&gwarea,buf);
                        if (getword_skip(MAXLEN,&gwarea,'\'')<0 || getword(loglocation,sizeof(loglocation),&gwarea,'\'')<0) {
-                               debuga(_("Maybe you have a broken record or garbage in your %s file\n"),DansGuardianConf);
+                               debuga(_("Invalid record in file \"%s\"\n"),DansGuardianConf);
                                exit(EXIT_FAILURE);
                        }
                        if (debug) debuga(_("Using the dansguardian log file \"%s\" found in your configuration file \"%s\"\n"),
@@ -79,7 +79,7 @@ void dansguardian_log(void)
        }
 
        if(debug)
-               debuga(_("Reading DansGuardian log file: %s\n"),loglocation);
+               debuga(_("Reading DansGuardian log file \"%s\"\n"),loglocation);
 
        if((fp_in=MY_FOPEN(loglocation,"r"))==NULL) {
                debugapos("dansguardian",_("Cannot open file \"%s\": %s\n"),loglocation,strerror(errno));
@@ -96,11 +96,11 @@ void dansguardian_log(void)
                        exit(EXIT_FAILURE);
                }
                if (getword_atoi(&hour,&gwarea,':')<0 || getword(minsec,sizeof(minsec),&gwarea,' ')<0) {
-                       debuga(_("Invalid time found in file \"%s\"\n"),loglocation);
+                       debuga(_("Invalid time in file \"%s\"\n"),loglocation);
                        exit(EXIT_FAILURE);
                }
                if (getword(user,sizeof(user),&gwarea,' ')<0) {
-                       debuga(_("Invalid user found in file \"%s\"\n"),loglocation);
+                       debuga(_("Invalid user in file \"%s\"\n"),loglocation);
                        exit(EXIT_FAILURE);
                }
                if (getword(ip,sizeof(ip),&gwarea,' ')<0) {
@@ -108,16 +108,16 @@ void dansguardian_log(void)
                        exit(EXIT_FAILURE);
                }
                if (getword_skip(MAXLEN,&gwarea,'/')<0 || getword_skip(MAXLEN,&gwarea,'/')<0) {
-                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),loglocation);
+                       debuga(_("Invalid record in file \"%s\"\n"),loglocation);
                        exit(EXIT_FAILURE);
                }
                if (getword_ptr(buf,&url,&gwarea,' ')<0) {
-                       debuga(_("Maybe you have a broken url in your %s file\n"),loglocation);
+                       debuga(_("Invalid url in file \"%s\"\n"),loglocation);
                        exit(EXIT_FAILURE);
                }
                if (getword_skip(255,&gwarea,' ')<0 ||
                    getword(code1,sizeof(code1),&gwarea,' ')<0 || getword(code2,sizeof(code2),&gwarea,' ')<0) {
-                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),loglocation);
+                       debuga(_("Invalid record in file \"%s\"\n"),loglocation);
                        exit(EXIT_FAILURE);
                }
                idata = year*10000+mon*100+day;
@@ -140,7 +140,7 @@ void dansguardian_log(void)
        if(fp_ou) fclose(fp_ou);
 
        if(debug)
-               debuga(_("Sorting file: %s\n"),guard_ou);
+               debuga(_("Sorting file \"%s\"\n"),guard_ou);
 
        snprintf(tmp6,sizeof(tmp6),"sort -t \"\t\" -k 1,1 -k 2,2 -k 4,4 \"%s\" -o \"%s\"",guard_in, guard_ou);
        cstatus=system(tmp6);
index 07d8823fe0576ed1b5de519864ca65ef0499ff6d..b5bdfd4f69b768bb1f2efb751a0a3b24a1bf22b4 100644 (file)
@@ -92,15 +92,15 @@ void dansguardian_report(void)
                getword_start(&gwarea,buf);
                if (getword(user,sizeof(user),&gwarea,'\t')<0 || getword(date2,sizeof(date2),&gwarea,'\t')<0 ||
                    getword(hour,sizeof(hour),&gwarea,'\t')<0 || getword(ip,sizeof(ip),&gwarea,'\t')<0) {
-                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),dansguardian_in);
+                       debuga(_("Invalid record in file \"%s\"\n"),dansguardian_in);
                        exit(EXIT_FAILURE);
                }
                if (getword_ptr(buf,&url,&gwarea,'\t')<0) {
-                       debuga(_("Maybe you have a broken url in your %s file\n"),dansguardian_in);
+                       debuga(_("Invalid url in file \"%s\"\n"),dansguardian_in);
                        exit(EXIT_FAILURE);
                }
                if (getword(rule,sizeof(rule),&gwarea,'\n')<0) {
-                       debuga(_("Maybe you have a broken rule in your %s file\n"),dansguardian_in);
+                       debuga(_("Invalid rule in file \"%s\"\n"),dansguardian_in);
                        exit(EXIT_FAILURE);
                }
 
index a72b59e5d46822a206b88257dc84adb114379e73..5a70eddda89a7bf2a3f6f3fb7333a26a29a9b09f 100644 (file)
@@ -80,7 +80,7 @@ void data_file(char *tmp)
                        strcpy(nameantes,u2);
                }
                user_find(uinfo->label,MAX_USER_LEN, u2);
-               if(debug) debuga(_("Reading user file: %s/%s\n"),tmp,uinfo->filename);
+               if(debug) debuga(_("Reading user file \"%s/%s\"\n"),tmp,uinfo->filename);
 
                sort_users_log(tmp,debug,uinfo);
                if (snprintf(tmp3,sizeof(tmp3),"%s/%s.user_log",tmp,uinfo->filename)>=sizeof(tmp3)) {
@@ -106,11 +106,11 @@ void data_file(char *tmp)
                            getword(accip,sizeof(accip),&gwarea,'\t')<0 ||
                            getword_ptr(buf,&accurl,&gwarea,'\t')<0 || getword_atoll(&accbytes,&gwarea,'\t')<0 ||
                            getword(acccode,sizeof(acccode),&gwarea,'\t')<0 || getword_atoll(&accelap,&gwarea,'\t')<0) {
-                               debuga(_("There is a broken record or garbage in file %s\n"),tmp3);
+                               debuga(_("Invalid record in file \"%s\"\n"),tmp3);
                                exit(EXIT_FAILURE);
                        }
                        if (getword_skip(20000,&gwarea,'"')<0 || getword(accsmart,sizeof(accsmart),&gwarea,'"')<0) {
-                               debuga(_("There is an invalid smart info in file %s\n"),tmp3);
+                               debuga(_("Invalid smart info in file \"%s\"\n"),tmp3);
                                exit(EXIT_FAILURE);
                        }
 
index a7daecc3991c41fff70d07853fcf9e817e48125f..0630ea65a47db3346ae4b463b00ecb309a1b34ce 100644 (file)
--- a/denied.c
+++ b/denied.c
@@ -101,11 +101,11 @@ void gen_denied_report(void)
                getword_start(&gwarea,buf);
                if (getword(data,sizeof(data),&gwarea,'\t')<0 || getword(hora,sizeof(hora),&gwarea,'\t')<0 ||
                    getword(user,sizeof(user),&gwarea,'\t')<0 || getword(ip,sizeof(ip),&gwarea,'\t')<0) {
-                       debuga(_("There is a broken record or garbage in file %s\n"),denied_in);
+                       debuga(_("Invalid record in file \"%s\"\n"),denied_in);
                        exit(EXIT_FAILURE);
                }
                if (getword_ptr(buf,&url,&gwarea,'\t')<0) {
-                       debuga(_("There is a broken url in file %s\n"),denied_in);
+                       debuga(_("Invalid url in file \"%s\"\n"),denied_in);
                        exit(EXIT_FAILURE);
                }
                if (sscanf(data,"%d/%d/%d",&day,&month,&year)!=3) continue;
@@ -114,7 +114,7 @@ void gen_denied_report(void)
 
                uinfo=userinfo_find_from_id(user);
                if (!uinfo) {
-                       debuga(_("Unknown user ID %s in file %s\n"),user,denied_in);
+                       debuga(_("Unknown user ID %s in file \"%s\"\n"),user,denied_in);
                        exit(EXIT_FAILURE);
                }
 
index 335c62dd624b6ad66316453951ac3a908bdec4d6..4ed1f44a9eeae46c23b0e28cd9ffeb60bf59b7d0 100644 (file)
@@ -158,11 +158,11 @@ void download_report(void)
                getword_start(&gwarea,buf);
                if (getword(data,sizeof(data),&gwarea,'\t')<0 || getword(hora,sizeof(hora),&gwarea,'\t')<0 ||
                    getword(user,sizeof(user),&gwarea,'\t')<0 || getword(ip,sizeof(ip),&gwarea,'\t')<0) {
-                       debuga(_("There is a broken record or garbage in file %s\n"),report_in);
+                       debuga(_("Invalid record in file \"%s\"\n"),report_in);
                        exit(EXIT_FAILURE);
                }
                if (getword_ptr(buf,&url,&gwarea,'\t')<0) {
-                       debuga(_("There is a broken url in file %s\n"),report_in);
+                       debuga(_("Invalid url in file \"%s\"\n"),report_in);
                        exit(EXIT_FAILURE);
                }
                if (sscanf(data,"%d/%d/%d",&day,&month,&year)!=3) continue;
@@ -171,7 +171,7 @@ void download_report(void)
 
                uinfo=userinfo_find_from_id(user);
                if (!uinfo) {
-                       debuga(_("Unknown user ID %s in file %s\n"),user,report_in);
+                       debuga(_("Unknown user ID %s in file \"%s\"\n"),user,report_in);
                        exit(EXIT_FAILURE);
                }
                new_user=false;
diff --git a/email.c b/email.c
index d2f110abde81cd2abda861b7c3acc4996ba68573..5472c12d64294b0f72d9f20516d0a2c20d07767c 100644 (file)
--- a/email.c
+++ b/email.c
@@ -191,25 +191,25 @@ int geramail(const char *dirname, int debug, const char *outdir, const char *ema
                fixendofline(warea);
                getword_start(&gwarea,warea);
                if (getword(user,sizeof(user),&gwarea,'\t')<0) {
-                       debuga(_("There is an invalid user ID in file %s\n"),top1);
+                       debuga(_("Invalid user ID in file \"%s\"\n"),top1);
                        exit(EXIT_FAILURE);
                }
                if (getword_atoll(&nbytes,&gwarea,'\t')<0) {
-                       debuga(_("There is an invalid number of bytes in file %s\n"),top1);
+                       debuga(_("Invalid number of bytes in file \"%s\"\n"),top1);
                        exit(EXIT_FAILURE);
                }
                if (getword_atoll(&nacc,&gwarea,'\t')<0) {
-                       debuga(_("There is an invalid number of access in file %s\n"),top1);
+                       debuga(_("Invalid number of accesses in file \"%s\"\n"),top1);
                        exit(EXIT_FAILURE);
                }
                if (getword_atoll(&elap,&gwarea,'\0')<0) {
-                       debuga(_("There is an invalid elapsed time in file %s\n"),top1);
+                       debuga(_("Invalid elapsed time in file \"%s\"\n"),top1);
                        exit(EXIT_FAILURE);
                }
 
                uinfo=userinfo_find_from_id(user);
                if (!uinfo) {
-                       debuga(_("Unknown user ID %s in file %s\n"),user,top1);
+                       debuga(_("Unknown user ID %s in file \"%s\"\n"),user,top1);
                        exit(EXIT_FAILURE);
                }
 
index 2b9aaaf611cf45949d525c195ab589fd3080519f..acdcdb06352050b6ec0e5b53a8aa88516dd6a956 100644 (file)
--- a/getconf.c
+++ b/getconf.c
@@ -468,7 +468,7 @@ static void parmtest(char *buf)
        if (is_param("date_format",buf)) {
                getword_start(&gwarea,buf);
                if (getword_multisep(wbuf,sizeof(wbuf),&gwarea,' ')<0) {
-                       debuga(_("Maybe you have a broken record or garbage in \"date_format\" parameter\n"));
+                       debuga(_("Invalid value in the \"date_format\" parameter\n"));
                        exit(EXIT_FAILURE);
                }
                strncpy(DateFormat,gwarea.current,1);
diff --git a/html.c b/html.c
index 0080b0fbdd7dab1c5e43c3d3c74b9e842a47336b..8abea3bdf486703dd3f57e2ea9e6ede7fbfc1a15 100644 (file)
--- a/html.c
+++ b/html.c
@@ -137,35 +137,35 @@ void htmlrel(void)
                while((buf=longline_read(fp_in,line))!=NULL) {
                        getword_start(&gwarea,buf);
                        if (getword_atoll(&ltemp,&gwarea,'\t')<0) {
-                               debuga(_("There is a broken number of access in file %s\n"),arqin);
+                               debuga(_("Invalid number of accesses in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
                        tnacc+=ltemp;
                        if (getword_atoll(&ltemp,&gwarea,'\t')<0) {
-                               debuga(_("There is a broken downloaded size in file %s\n"),arqin);
+                               debuga(_("Invalid download size in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
                        tnbytes+=ltemp;
                        if (getword_ptr(NULL,NULL,&gwarea,'\t')<0) {
-                               debuga(_("There is a broken url in file %s\n"),arqin);
+                               debuga(_("Invalid url in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
                        if (getword_skip(MAXLEN,&gwarea,'\t')<0) {
-                               debuga(_("There is a broken access code in file %s\n"),arqin);
+                               debuga(_("Invalid access code in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
                        if (getword_atoll(&ltemp,&gwarea,'\t')<0) {
-                               debuga(_("There is a broken elapsed time in file %s\n"),arqin);
+                               debuga(_("Invalid elapsed time in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
                        tnelap+=ltemp;
                        if (getword_atoll(&ltemp,&gwarea,'\t')<0) {
-                               debuga(_("There is a broken in-cache volume in file %s\n"),arqin);
+                               debuga(_("Invalid in-cache volume in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
                        tnincache+=ltemp;
                        if (getword_atoll(&ltemp,&gwarea,'\n')<0) {
-                               debuga(_("There is a broken out-cache volume in file %s\n"),arqin);
+                               debuga(_("Invalid out-of-cache volume in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
                        tnoucache+=ltemp;
@@ -227,31 +227,31 @@ void htmlrel(void)
                while((buf=longline_read(fp_in,line))!=NULL) {
                        getword_start(&gwarea,buf);
                        if (getword_atoll(&twork,&gwarea,'\t')<0) {
-                               debuga(_("There is a broken number of access in file %s\n"),arqin);
+                               debuga(_("Invalid number of accesses in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
                        if (getword_atoll(&nnbytes,&gwarea,'\t')<0) {
-                               debuga(_("There is a broken number of bytes in file %s\n"),arqin);
+                               debuga(_("Invalid number of bytes in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
                        if (getword_ptr(buf,&url,&gwarea,'\t')<0) {
-                               debuga(_("There is a broken url in file %s\n"),arqin);
+                               debuga(_("Invalid url in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
                        if (getword(tmsg,sizeof(tmsg),&gwarea,'\t')<0) {
-                               debuga(_("There is a broken access code in file %s\n"),arqin);
+                               debuga(_("Invalid access code in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
                        if (getword_atoll(&nnelap,&gwarea,'\t')<0) {
-                               debuga(_("There is a broken elapsed time in file %s\n"),arqin);
+                               debuga(_("Invalid elapsed time in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
                        if (getword_atoll(&incache,&gwarea,'\t')<0) {
-                               debuga(_("There is a broken in cache column in file %s\n"),arqin);
+                               debuga(_("Invalid in-cache column in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
                        if (getword_atoll(&oucache,&gwarea,'\n')<0) {
-                               debuga(_("There is a broken out of cache column in file %s (%d)\n"),arqin,__LINE__);
+                               debuga(_("Invalid out-of-cache column in file \"%s\"\n"),arqin);
                                exit(EXIT_FAILURE);
                        }
 
@@ -353,28 +353,28 @@ void htmlrel(void)
                                while((buf=longline_read(fp_ip,line1))!=NULL) {
                                        getword_start(&gwarea,buf);
                                        if (getword(user_ip,sizeof(user_ip),&gwarea,'\t')<0) {
-                                               debuga(_("Maybe you have a broken user IP in your %s file\n"),tmp3);
+                                               debuga(_("Invalid user IP in file \"%s\"\n"),tmp3);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword_ptr(buf,&user_url,&gwarea,'\t')<0) {
-                                               debuga(_("Maybe you have a broken url in your %s file\n"),tmp3);
+                                               debuga(_("Invalid url in file \"%s\"\n"),tmp3);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (strncmp(user_url,url,strlen(url))!=0) continue;
                                        if (getword_skip(15,&gwarea,'\t')<0) {
-                                               debuga(_("Maybe you have a broken day in your %s file\n"),tmp3);
+                                               debuga(_("Invalid day in file \"%s\"\n"),tmp3);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword_skip(15,&gwarea,'\t')<0) {
-                                               debuga(_("Maybe you have a broken time in your %s file\n"),tmp3);
+                                               debuga(_("Invalid time in file \"%s\"\n"),tmp3);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword_atoll(&userbytes,&gwarea,'\t')<0) {
-                                               debuga(_("Maybe you have a broken size in your %s file\n"),tmp3);
+                                               debuga(_("Invalid size in file \"%s\"\n"),tmp3);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword_atoll(&userelap,&gwarea,'\0')<0) {
-                                               debuga(_("Maybe you have a broken elapsed time in your %s file\n"),tmp3);
+                                               debuga(_("Invalid elapsed time in file \"%s\"\n"),tmp3);
                                                exit(EXIT_FAILURE);
                                        }
                                        fprintf(fp_ip2,"%s\t%"PRIu64"\t%"PRIu64"\n",user_ip,(uint64_t)userbytes,(uint64_t)userelap);
@@ -414,15 +414,15 @@ void htmlrel(void)
                                while((buf=longline_read(fp_ip,line1))!=NULL) {
                                        getword_start(&gwarea,buf);
                                        if (getword(user_ip,sizeof(user_ip),&gwarea,'\t')<0) {
-                                               debuga(_("Maybe you have a broken user IP in your %s file\n"),tmp3);
+                                               debuga(_("Invalid user IP in file \"%s\"\n"),tmp3);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword_atoll(&userbytes,&gwarea,'\t')<0) {
-                                               debuga(_("Maybe you have a broken size in your %s file\n"),tmp3);
+                                               debuga(_("Invalid size in file \"%s\"\n"),tmp3);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword_atoll(&userelap,&gwarea,'\0')<0) {
-                                               debuga(_("Maybe you have a broken elapsed time in your %s file\n"),tmp3);
+                                               debuga(_("Invalid elapsed time in file \"%s\"\n"),tmp3);
                                                exit(EXIT_FAILURE);
                                        }
                                        if(strcmp(user_ip,olduserip) != 0) {
@@ -552,7 +552,7 @@ void htmlrel(void)
                                        fclose(fp_usr);
 
                                        if(debug)
-                                               debuga(_("User %s limit exceeded (%d MB). Added to file %s\n"),uinfo->label,PerUserLimit,PerUserLimitFile);
+                                               debuga(_("User %s limit exceeded (%d MB). Added to file \"%s\"\n"),uinfo->label,PerUserLimit,PerUserLimitFile);
                                }
                        }
                }
diff --git a/index.c b/index.c
index e9c83a32db72603c55c014a271103afecca31209..7febbe70ffb23cd840b80ad41a61077f358ef472 100644 (file)
--- a/index.c
+++ b/index.c
@@ -364,29 +364,29 @@ static void make_file_index(void)
                        */
                        getword_start(&gwarea,data);
                        if (getword_skip(16,&gwarea,' ')<0) {
-                               debuga(_("Maybe you have a broken week day in your %s%s/sarg-date file\n"),outdir,direntp->d_name);
+                               debuga(_("Invalid week day in file \"%s%s/sarg-date\"\n"),outdir,direntp->d_name);
                                exit(EXIT_FAILURE);
                        }
                        if (getword_multisep(mon,sizeof(mon),&gwarea,' ')<0) {
-                               debuga(_("Maybe you have a broken month in your %s%s/sarg-date file\n"),outdir,direntp->d_name);
+                               debuga(_("Invalid month in file \"%s%s/sarg-date\"\n"),outdir,direntp->d_name);
                                exit(EXIT_FAILURE);
                        }
                        if (getword_multisep(day,sizeof(day),&gwarea,' ')<0) {
-                               debuga(_("Maybe you have a broken day in your %s%s/sarg-date file\n"),outdir,direntp->d_name);
+                               debuga(_("Invalid day in file \"%s%s/sarg-date\"\n"),outdir,direntp->d_name);
                                exit(EXIT_FAILURE);
                        }
                        if (getword_multisep(hour,sizeof(hour),&gwarea,' ')<0) {
-                               debuga(_("Maybe you have a broken time in your %s%s/sarg-date file\n"),outdir,direntp->d_name);
+                               debuga(_("Invalid time in file \"%s%s/sarg-date\"\n"),outdir,direntp->d_name);
                                exit(EXIT_FAILURE);
                        }
                        do {
                                if (getword_multisep(year,sizeof(year),&gwarea,' ')<0) {
-                                       debuga(_("Maybe you have a broken year in your %s%s/sarg-date file\n"),outdir,direntp->d_name);
+                                       debuga(_("Invalid year in file \"%s%s/sarg-date\"\n"),outdir,direntp->d_name);
                                        exit(EXIT_FAILURE);
                                }
                        } while (year[0] && !isdigit(year[0])); //skip time zone information with spaces until the year is found
                        if (sscanf(hour,"%d:%d:%d",&ihour,&iminute,&isecond)!=3) {
-                               debuga(_("Maybe you have a broken time in your %s%s/sarg-date file\n"),outdir,direntp->d_name);
+                               debuga(_("Invalid time in file \"%s%s/sarg-date\"\n"),outdir,direntp->d_name);
                                exit(EXIT_FAILURE);
                        }
                        buildymd(day,mon,year,ftime);
index 32720c09c9557da02ab6e5fd14fab9d0795edb5e..0407543692ad0486cd9de64fd192c07154228332 100644 (file)
--- a/ip2name.c
+++ b/ip2name.c
@@ -320,7 +320,7 @@ void name2ip(char *name,int name_size)
        getword_start(&gwarea,inet_ntoa(ia));
        if (getword(n4,sizeof(n4),&gwarea,'.')<0 || getword(n3,sizeof(n3),&gwarea,'.')<0 ||
            getword(n2,sizeof(n2),&gwarea,'.')<0 || getword(n1,sizeof(n1),&gwarea,0)<0) {
-               printf("SARG: Maybe you have a broken record or garbage in your %s ip address.\n",gwarea.beginning);
+               debuga(_("Invalid record in IP address \"%s\"\n"),gwarea.beginning);
                exit(EXIT_FAILURE);
        }
        snprintf(name,name_size,"%s.%s.%s.%s",n1,n2,n3,n4);
index b994c91e37402e17c5b8f6812c4a9db883a211e8..7cf25096d54ef1a678505dd12627908ea76d92a2 100644 (file)
--- a/lastlog.c
+++ b/lastlog.c
@@ -119,12 +119,12 @@ void mklastlog(const char *outdir)
                fixendofline(buf);
                getword_start(&gwarea,buf);
                if (getword(warea,sizeof(warea),&gwarea,'\t')<0) {
-                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),temp);
+                       debuga(_("Invalid record in file \"%s\"\n"),temp);
                        exit(EXIT_FAILURE);
                }
 
                if(debug)
-                       debuga(_("Removing old report file %s\n"),gwarea.current);
+                       debuga(_("Removing old report file \"%s\"\n"),gwarea.current);
                if (snprintf(temp,sizeof(temp),"%s%s",outdir,gwarea.current)>=sizeof(temp)) {
                        debuga(_("Directory name too long: %s%s\n"),outdir,gwarea.current);
                        exit(EXIT_FAILURE);
diff --git a/log.c b/log.c
index c4d2456ce39c1def861dcffc6bb0c39645d4ab8a..6d49ada206b608bf3b6967f9bcca9e842b0cc5e8 100644 (file)
--- a/log.c
+++ b/log.c
@@ -932,7 +932,7 @@ int main(int argc,char *argv[])
                                getword_start(&gwarea,ExcludeString);
                                while(strchr(gwarea.current,':') != 0) {
                                        if (getword_multisep(val1,sizeof(val1),&gwarea,':')<0) {
-                                               debuga(_("Maybe you have a broken record or garbage in your exclusion string\n"));
+                                               debuga(_("Invalid record in exclusion string\n"));
                                                exit(EXIT_FAILURE);
                                        }
                                        if((str=(char *) strstr(linebuf,val1)) != (char *) NULL ) {
@@ -953,7 +953,7 @@ int main(int argc,char *argv[])
                        if (ilf==ILF_Squid || ilf==ILF_Common || ilf==ILF_Unknown) {
                                getword_start(&gwarea,linebuf);
                                if (getword(data,sizeof(data),&gwarea,' ')<0) {
-                                       debuga(_("Maybe you have a broken time in your access.log file\n"));
+                                       debuga(_("Invalid time in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                if((str=(char *) strchr(data, '.')) != (char *) NULL && (str=(char *) strchr(str+1, '.')) != (char *) NULL ) {
@@ -961,44 +961,44 @@ int main(int argc,char *argv[])
                                        strcpy(elap,"0");
                                        if(squid24) {
                                                if (getword(user,sizeof(user),&gwarea,' ')<0 || getword_skip(255,&gwarea,' ')<0) {
-                                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                                        exit(EXIT_FAILURE);
                                                }
                                        } else {
                                                if (getword_skip(255,&gwarea,' ')<0 || getword(user,sizeof(user),&gwarea,' ')<0) {
-                                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                                        exit(EXIT_FAILURE);
                                                }
                                        }
                                        if (getword(data,sizeof(data),&gwarea,']')<0 || getword_skip(MAXLEN,&gwarea,'"')<0 ||
                                            getword(fun,sizeof(fun),&gwarea,' ')<0) {
-                                               debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                               debuga(_("Invalid record in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword_ptr(linebuf,&full_url,&gwarea,' ')<0) {
-                                               debuga(_("Maybe you have a broken url in your %s file\n"),arq);
+                                               debuga(_("Invalid url in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword_skip(MAXLEN,&gwarea,' ')<0) {
-                                               debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                               debuga(_("Invalid record in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword(code2,sizeof(code2),&gwarea,' ')<0) {
-                                               debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                               debuga(_("Invalid record in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword(tam,sizeof(tam),&gwarea,' ')<0) {
-                                               debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                               debuga(_("Invalid record in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if((str=(char *) strchr(gwarea.current, ' ')) != (char *) NULL ) {
                                                if (getword(code,sizeof(code),&gwarea,' ')<0) {
-                                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                                        exit(EXIT_FAILURE);
                                                }
                                        } else {
                                                if (getword(code,sizeof(code),&gwarea,'\0')<0) {
-                                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                                        exit(EXIT_FAILURE);
                                                }
                                        }
@@ -1014,24 +1014,24 @@ int main(int argc,char *argv[])
 
                                        getword_start(&gwarea,data+1);
                                        if (getword_multisep(data,sizeof(data),&gwarea,':')<0){
-                                               debuga(_("Maybe you have a broken date in your %s file\n"),arq);
+                                               debuga(_("Invalid date in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword_multisep(hora,sizeof(hora),&gwarea,' ')<0){
-                                               debuga(_("Maybe you have a broken date in your %s file\n"),arq);
+                                               debuga(_("Invalid date in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        getword_start(&gwarea,data);
                                        if (getword_atoll(&iday,&gwarea,'/')<0){
-                                               debuga(_("Maybe you have a broken date in your %s file\n"),arq);
+                                               debuga(_("Invalid date in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword(mes,sizeof(mes),&gwarea,'/')<0){
-                                               debuga(_("Maybe you have a broken date in your %s file\n"),arq);
+                                               debuga(_("Invalid date in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword_atoll(&iyear,&gwarea,'/')<0){
-                                               debuga(_("Maybe you have a broken date in your %s file\n"),arq);
+                                               debuga(_("Invalid date in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
 
@@ -1040,7 +1040,7 @@ int main(int argc,char *argv[])
                                        computedate(iyear,imonth,iday,&tt);
                                        if (sscanf(hora,"%d:%d:%d",&tt.tm_hour,&tt.tm_min,&tt.tm_sec)!=3 || tt.tm_hour<0 || tt.tm_hour>=24 ||
                                                        tt.tm_min<0 || tt.tm_min>=60 || tt.tm_sec<0 || tt.tm_sec>=60) {
-                                               debuga(_("Invalid time found in file \"%s\"\n"),arq);
+                                               debuga(_("Invalid time in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        t=&tt;
@@ -1048,37 +1048,37 @@ int main(int argc,char *argv[])
 
                                if(ilf==ILF_Unknown || ilf==ILF_Squid) {
                                        if (getword(elap,sizeof(elap),&gwarea,' ')<0) {
-                                               debuga(_("Maybe you have a broken elapsed time in your %s file\n"),arq);
+                                               debuga(_("Invalid elapsed time in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        while(strcmp(elap,"") == 0 && gwarea.current[0] != '\0')
                                                if (getword(elap,sizeof(elap),&gwarea,' ')<0) {
-                                                       debuga(_("Maybe you have a broken elapsed time in your %s file\n"),arq);
+                                                       debuga(_("Invalid elapsed time in file \"%s\"\n"),arq);
                                                        exit(EXIT_FAILURE);
                                                }
                                        if(strlen(elap) < 1) continue;
                                        if (getword(ip,sizeof(ip),&gwarea,' ')<0){
-                                               debuga(_("Maybe you have a broken client IP address in your %s file\n"),arq);
+                                               debuga(_("Invalid client IP address in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword(code,sizeof(code),&gwarea,' ')<0){
-                                               debuga(_("Maybe you have a broken result code in your %s file\n"),arq);
+                                               debuga(_("Invalid result code in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword(tam,sizeof(tam),&gwarea,' ')<0){
-                                               debuga(_("Maybe you have a broken amount of data in your %s file\n"),arq);
+                                               debuga(_("Invalid amount of data in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword(fun,sizeof(fun),&gwarea,' ')<0){
-                                               debuga(_("Maybe you have a broken request method in your %s file\n"),arq);
+                                               debuga(_("Invalid request method in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword_ptr(linebuf,&full_url,&gwarea,' ')<0){
-                                               debuga(_("Maybe you have a broken url in your %s file\n"),arq);
+                                               debuga(_("Invalid url in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (getword(user,sizeof(user),&gwarea,' ')<0){
-                                               debuga(_("Maybe you have a broken user ID in your %s file\n"),arq);
+                                               debuga(_("Invalid user ID in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        ilf=ILF_Squid;
@@ -1099,59 +1099,59 @@ int main(int argc,char *argv[])
                        if (ilf==ILF_Sarg) {
                                getword_start(&gwarea,linebuf);
                                if (getword(data,sizeof(data),&gwarea,'\t')<0){
-                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                if (getword(hora,sizeof(hora),&gwarea,'\t')<0) {
-                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                if (getword(user,sizeof(user),&gwarea,'\t')<0) {
-                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                if (getword(ip,sizeof(ip),&gwarea,'\t')<0) {
-                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                if (getword_ptr(linebuf,&full_url,&gwarea,'\t')<0){
-                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                if (getword(tam,sizeof(tam),&gwarea,'\t')<0){
-                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                if (getword(code,sizeof(code),&gwarea,'\t')<0){
-                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                if (getword(elap,sizeof(elap),&gwarea,'\t')<0){
-                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                if (getword(smartfilter,sizeof(smartfilter),&gwarea,'\0')<0){
-                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                getword_start(&gwarea,data);
                                if (getword_atoll(&iday,&gwarea,'/')<0 || iday<1 || iday>31){
-                                       debuga(_("Maybe you have a broken date in your %s file\n"),arq);
+                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                if (getword_atoll(&imonth,&gwarea,'/')<0 || imonth<1 || imonth>12){
-                                       debuga(_("Maybe you have a broken date in your %s file\n"),arq);
+                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                if (getword_atoll(&iyear,&gwarea,'\0')<0){
-                                       debuga(_("Maybe you have a broken date in your %s file\n"),arq);
+                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                idata=builddia(iday,imonth,iyear);
                                computedate(iyear,imonth,iday,&tt);
                                if (sscanf(hora,"%d:%d:%d",&tt.tm_hour,&tt.tm_min,&tt.tm_sec)!=3 || tt.tm_hour<0 || tt.tm_hour>=24 ||
                                                tt.tm_min<0 || tt.tm_min>=60 || tt.tm_sec<0 || tt.tm_sec>=60) {
-                                       debuga(_("Invalid time found in file \"%s\"\n"),arq);
+                                       debuga(_("Invalid time in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                t=&tt;
@@ -1164,14 +1164,14 @@ int main(int argc,char *argv[])
                                        getword_start(&gwarea,linebuf);
                                        // remove the #Fields: column at the beginning of the line
                                        if (getword_skip(1000,&gwarea,' ')<0){
-                                               debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                               debuga(_("Invalid record in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        for (ncols=0 ; ncols<ISACOL_Last ; ncols++) cols[ncols]=-1;
                                        ncols=0;
                                        while(gwarea.current[0] != '\0') {
                                                if (getword(val1,sizeof(val1),&gwarea,'\t')<0){
-                                                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                                        exit(EXIT_FAILURE);
                                                }
                                                if(strcmp(val1,"c-ip") == 0) cols[ISACOL_Ip]=ncols;
@@ -1195,42 +1195,42 @@ int main(int argc,char *argv[])
                                getword_start(&gwarea,linebuf);
                                for (x=0 ; x<isa_ncols ; x++) {
                                        if (getword_ptr(linebuf,&str,&gwarea,'\t')<0) {
-                                               debuga(_("Maybe you have a broken record or garbage in your %s file\n"),arq);
+                                               debuga(_("Invalid record in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        if (x==isa_cols[ISACOL_Ip]) {
                                                if (strlen(str)>=sizeof(ip)) {
-                                                       debuga(_("Maybe you have a broken IP in your %s file\n"),arq);
+                                                       debuga(_("Invalid IP address in file \"%s\"\n"),arq);
                                                        exit(EXIT_FAILURE);
                                                }
                                                strcpy(ip,str);
                                        } else if (x==isa_cols[ISACOL_UserName]) {
                                                if (strlen(str)>=sizeof(user)) {
-                                                       debuga(_("Maybe you have a broken user ID in your %s file\n"),arq);
+                                                       debuga(_("Invalid user ID in file \"%s\"\n"),arq);
                                                        exit(EXIT_FAILURE);
                                                }
                                                strcpy(user,str);
                                        } else if (x==isa_cols[ISACOL_Date]) {
                                                if (strlen(str)>=sizeof(data)) {
-                                                       debuga(_("Maybe you have a broken date in your %s file\n"),arq);
+                                                       debuga(_("Invalid record in file \"%s\"\n"),arq);
                                                        exit(EXIT_FAILURE);
                                                }
                                                strcpy(data,str);
                                        } else if (x==isa_cols[ISACOL_Time]) {
                                                if (strlen(str)>=sizeof(hora)) {
-                                                       debuga(_("Maybe you have a broken time in your %s file\n"),arq);
+                                                       debuga(_("Invalid time in file \"%s\"\n"),arq);
                                                        exit(EXIT_FAILURE);
                                                }
                                                strcpy(hora,str);
                                        } else if (x==isa_cols[ISACOL_TimeTaken]) {
                                                if (strlen(str)>=sizeof(elap)) {
-                                                       debuga(_("Maybe you have a broken download duration in your %s file\n"),arq);
+                                                       debuga(_("Invalid download duration in file \"%s\"\n"),arq);
                                                        exit(EXIT_FAILURE);
                                                }
                                                strcpy(elap,str);
                                        } else if (x==isa_cols[ISACOL_Bytes]) {
                                                if (strlen(str)>=sizeof(tam)) {
-                                                       debuga(_("Maybe you have a broken download size in your %s file\n"),arq);
+                                                       debuga(_("Invalid download size in file \"%s\"\n"),arq);
                                                        exit(EXIT_FAILURE);
                                                }
                                                strcpy(tam,str);
@@ -1238,7 +1238,7 @@ int main(int argc,char *argv[])
                                                full_url=str;
                                        } else if (x==isa_cols[ISACOL_Status]) {
                                                if (strlen(str)>=sizeof(code)) {
-                                                       debuga(_("Maybe you have a broken access code in your %s file\n"),arq);
+                                                       debuga(_("Invalid access code in file \"%s\"\n"),arq);
                                                        exit(EXIT_FAILURE);
                                                }
                                                strcpy(code,str);
@@ -1251,15 +1251,15 @@ int main(int argc,char *argv[])
                                }
                                getword_start(&gwarea,data);
                                if (getword_atoll(&iyear,&gwarea,'-')<0){
-                                       debuga(_("Maybe you have a broken year in your %s file\n"),arq);
+                                       debuga(_("Invalid year in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                if (getword_atoll(&imonth,&gwarea,'-')<0){
-                                       debuga(_("Maybe you have a broken month in your %s file\n"),arq);
+                                       debuga(_("Invalid month in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                if (getword_atoll(&iday,&gwarea,'\0')<0){
-                                       debuga(_("Maybe you have a broken day in your %s file\n"),arq);
+                                       debuga(_("Invalid day in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
 
@@ -1268,7 +1268,7 @@ int main(int argc,char *argv[])
                                if (isa_cols[ISACOL_Time]>=0) {
                                        if (sscanf(hora,"%d:%d:%d",&tt.tm_hour,&tt.tm_min,&tt.tm_sec)!=3 || tt.tm_hour<0 || tt.tm_hour>=24 ||
                                                        tt.tm_min<0 || tt.tm_min>=60 || tt.tm_sec<0 || tt.tm_sec>=60) {
-                                               debuga(_("Invalid time found in file \"%s\"\n"),arq);
+                                               debuga(_("Invalid time in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                }
@@ -1805,7 +1805,7 @@ static void getusers(const char *pwdfile, int debug)
        while(fgets(buf,sizeof(buf),fp_usr)!=NULL) {
                str=strchr(buf,':');
                if (!str) {
-                       debuga(_("You have an invalid user in your %s file\n"),pwdfile);
+                       debuga(_("Invalid user in file \"%s\"\n"),pwdfile);
                        exit(EXIT_FAILURE);
                }
                str[1]='\0';
index 44d5d9f3a4fedc846fb8b1f14866e14d2abbc139..06c252be36ce1a37c2003db95ecdbfee6acfb222 100755 (executable)
@@ -86,7 +86,8 @@ static void getlog(void)
        }
        while((buf=longline_read(fp,line)) != NULL )
                if (getdata(buf,tmp)<0) {
-                       debuga(_("Maybe a broken record or garbage was returned by %s\n"),cmd);
+                       /* TRANSLATORS: The %s is the command returning the invalid data. */
+                       debuga(_("Invalid data returned by %s\n"),cmd);
                        exit(EXIT_FAILURE);
                }
        pclose(fp);
@@ -237,16 +238,16 @@ static void datashow(const char *tmp)
                        exit(EXIT_FAILURE);
                }
                if (getword(user,sizeof(user),&gwarea,'\t')<0) {
-                       debuga(_("Invalid user found in file \"%s\"\n"),tmp);
+                       debuga(_("Invalid user in file \"%s\"\n"),tmp);
                        exit(EXIT_FAILURE);
                }
                if (strlen(user) < 1) continue;
                if (getword_ptr(buf,&url,&gwarea,'\t')<0) {
-                       debuga(_("Invalid URL in file %s\n"),tmp);
+                       debuga(_("Invalid url in file \"%s\"\n"),tmp);
                        exit(EXIT_FAILURE);
                }
                if (getword(typ,sizeof(typ),&gwarea,'\t')<0) {
-                       debuga(_("Invalid access type in file %s\n"),tmp);
+                       debuga(_("Invalid access type in file \"%s\"\n"),tmp);
                        exit(EXIT_FAILURE);
                }
                if(strstr(RealtimeTypes,typ) == 0)
index fb114209cbb4a18b026ea1780cfb0272efdedaec..193af4403abe8f11f34fea21cfd10c89ae8ce4b5 100644 (file)
@@ -120,7 +120,7 @@ static void parse_log(FILE *fp_ou,char *buf)
                                        strcpy(ip,res);
                                } else if(strcmp(leks,"user") == 0) {
                                        if (strlen(res)>=sizeof(user)) {
-                                               debuga(_("User ID too long in redirector log file %s\n"),wentp);
+                                               debuga(_("User ID too long in redirector log file \"%s\"\n"),wentp);
                                                RedirectorErrors++;
                                                return;
                                        }
@@ -145,7 +145,7 @@ static void parse_log(FILE *fp_ou,char *buf)
                mon=(int)lmon;
                day=(int)lday;
                if (getword(hour,sizeof(hour),&gwarea,' ')<0) {
-                       debuga(_("Invalid time found in file \"%s\"\n"),wentp);
+                       debuga(_("Invalid time in file \"%s\"\n"),wentp);
                        RedirectorErrors++;
                        return;
                }
@@ -160,7 +160,7 @@ static void parse_log(FILE *fp_ou,char *buf)
                        return;
                }
                if (getword_skip(MAXLEN,&gwarea,' ')<0 || getword_limit(full_url,sizeof(full_url),&gwarea,' ')<0) {
-                       debuga(_("Invalid URL in file \"%s\"\n"),wentp);
+                       debuga(_("Invalid url in file \"%s\"\n"),wentp);
                        RedirectorErrors++;
                        return;
                }
@@ -170,7 +170,7 @@ static void parse_log(FILE *fp_ou,char *buf)
                        return;
                }
                if (getword_skip(MAXLEN,&gwarea,' ')<0 || getword(user,sizeof(user),&gwarea,' ')<0) {
-                       debuga(_("Invalid user found in file \"%s\"\n"),wentp);
+                       debuga(_("Invalid user in file \"%s\"\n"),wentp);
                        RedirectorErrors++;
                        return;
                }
@@ -227,7 +227,7 @@ static void read_log(const char *wentp, FILE *fp_ou,int dfrom,int duntil)
        longline line;
 
        if(debug) {
-               debuga(_("Reading redirector log file %s\n"),wentp);
+               debuga(_("Reading redirector log file \"%s\"\n"),wentp);
        }
 
        /* With squidGuard, you can log groups in only one log file.
@@ -385,7 +385,7 @@ void redirector_log(void)
        }
 
        if(debug) {
-               debuga(_("Sorting file: %s\n"),redirector_sorted);
+               debuga(_("Sorting file \"%s\"\n"),redirector_sorted);
        }
 
        if (snprintf(tmp6,sizeof(tmp6),"sort -t \"\t\" -k 1,1 -k 2,2 -k 4,4 \"%s\" -o \"%s\"",guard_in, redirector_sorted)>=sizeof(tmp6)) {
@@ -487,7 +487,7 @@ void redirector_report(void)
                        exit(EXIT_FAILURE);
                }
                if (getword(hora,sizeof(hora),&gwarea,'\t')<0) {
-                       debuga(_("Invalid time found in file \"%s\"\n"),redirector_sorted);
+                       debuga(_("Invalid time in file \"%s\"\n"),redirector_sorted);
                        exit(EXIT_FAILURE);
                }
                if (getword(ip,sizeof(ip),&gwarea,'\t')<0) {
@@ -495,17 +495,17 @@ void redirector_report(void)
                        exit(EXIT_FAILURE);
                }
                if (getword_ptr(buf,&url,&gwarea,'\t')<0) {
-                       debuga(_("Invalid URL in file %s\n"),redirector_sorted);
+                       debuga(_("Invalid url in file \"%s\"\n"),redirector_sorted);
                        exit(EXIT_FAILURE);
                }
                if (getword(rule,sizeof(rule),&gwarea,'\n')<0) {
-                       debuga(_("Invalid rule in file %s\n"),redirector_sorted);
+                       debuga(_("Invalid rule in file \"%s\"\n"),redirector_sorted);
                        exit(EXIT_FAILURE);
                }
 
                uinfo=userinfo_find_from_id(user);
                if (!uinfo) {
-                       debuga(_("Unknown user ID %s in file %s\n"),user,redirector_sorted);
+                       debuga(_("Unknown user ID %s in file \"%s\"\n"),user,redirector_sorted);
                        exit(EXIT_FAILURE);
                }
 
index d78c625653777e35a1e6db4802fc2c03db14a72e..179a38f9cc5b30dd1322638df92c72dac4777419 100644 (file)
--- a/repday.c
+++ b/repday.c
@@ -87,14 +87,14 @@ void report_day(const struct userinfostruct *uinfo)
                for (dayidx=0 ; dayidx<ndaylist && daynum!=daylist[dayidx] ; dayidx++);
                if (dayidx>=ndaylist) {
                        if (dayidx>=sizeof(daylist)/sizeof(*daylist)) {
-                               debuga(_("Too many different dates in %s\n"),wdirname);
+                               debuga(_("Too many different dates in \"%s\"\n"),wdirname);
                                exit(EXIT_FAILURE);
                        }
                        daylist[ndaylist++]=daynum;
                }
 
                if (getword_atoll(&hour,&gwarea,'\t')<0) {
-                       debuga(_("Invalid time found in file \"%s\"\n"),wdirname);
+                       debuga(_("Invalid time in file \"%s\"\n"),wdirname);
                        exit(EXIT_FAILURE);
                }
                ihour=(int)hour;
index 8fb260de5070eb211c7d7ecb3d0e0d870b9fee42..17450e7fbf87ead9ebbcf89ddc06d7104b526402 100644 (file)
--- a/report.c
+++ b/report.c
@@ -163,16 +163,16 @@ void gerarel(void)
                            getword(accip,sizeof(accip),&gwarea,'\t')<0 ||
                            getword_ptr(buf,&accurl,&gwarea,'\t')<0 || getword_atoll(&accbytes,&gwarea,'\t')<0 ||
                            getword(acccode,sizeof(acccode),&gwarea,'\t')<0) {
-                               debuga(_("There is a broken record or garbage in file %s\n"),tmp3);
+                               debuga(_("Invalid record in file \"%s\"\n"),tmp3);
                                exit(EXIT_FAILURE);
                        }
                        if(strncmp(acccode,"TCP_DENIED/407",14) == 0) continue;
                        if (getword_atoll(&accelap,&gwarea,'\t')<0) {
-                               debuga(_("There is a broken elapsed time in file %s\n"),tmp3);
+                               debuga(_("Invalid elapsed time in file \"%s\"\n"),tmp3);
                                exit(EXIT_FAILURE);
                        }
                        if (getword_skip(20000,&gwarea,'"')<0 || getword(accsmart,sizeof(accsmart),&gwarea,'"')<0) {
-                               debuga(_("There is a broken smart info in file %s\n"),tmp3);
+                               debuga(_("Invalid smart info in file \"%s\"\n"),tmp3);
                                exit(EXIT_FAILURE);
                        }
 
@@ -536,7 +536,7 @@ int ger_read(char *buffer,struct generalitemstruct *item,const char *filename)
                while (isdigit(*buffer))
                        number=(number * 10) + (*buffer++)-'0';
                if (*buffer!='\t') {
-                       debuga(_("Invalid total number of accesses in \"%s\"\n"),filename);
+                       debuga(_("Invalid total number of accesses in file \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                buffer++;
@@ -630,7 +630,7 @@ int ger_read(char *buffer,struct generalitemstruct *item,const char *filename)
                while (isdigit(*buffer))
                        number=(number * 10) + (*buffer++)-'0';
                if (*buffer!='\t') {
-                       debuga(_("Invalid number of accesses in \"%s\"\n"),filename);
+                       debuga(_("Invalid number of accesses in file \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                buffer++;
index bd4d0a65c72ea1e2a441362e4bff6d0f34f6648f..5da57774ed101462ffc40c56a9f851f9bb13deca 100644 (file)
@@ -116,7 +116,7 @@ void siteuser(void)
                if(item.total) continue;
                uinfo=userinfo_find_from_id(item.user);
                if (!uinfo) {
-                       debuga(_("Unknown user ID %s in file %s\n"),item.user,general2);
+                       debuga(_("Unknown user ID %s in file \"%s\"\n"),item.user,general2);
                        exit(EXIT_FAILURE);
                }
 
index a0eb8a4a02a4ddf3ba9302236766786f5bbf5f83..8695b148bb1eb3208bdde9ebb25dedf270a74cec 100644 (file)
@@ -122,13 +122,13 @@ void smartfilter_report(void)
                if (getword(user,sizeof(user),&gwarea,'\t')<0 || getword(data,sizeof(data),&gwarea,'\t')<0 ||
                    getword(hora,sizeof(hora),&gwarea,'\t')<0 || getword(ip,sizeof(ip),&gwarea,'\t')<0 ||
                    getword(url,sizeof(url),&gwarea,'\t')<0 || getword(smartcat,sizeof(smartcat),&gwarea,'\n')<0) {
-                       debuga(_("There is a broken record or garbage in file %s\n"),smart_ou);
+                       debuga(_("Invalid record in file \"%s\"\n"),smart_ou);
                        exit(EXIT_FAILURE);
                }
 
                uinfo=userinfo_find_from_id(user);
                if (!uinfo) {
-                       debuga(_("Unknown user ID %s in file %s\n"),user,smart_ou);
+                       debuga(_("Unknown user ID %s in file \"%s\"\n"),user,smart_ou);
                        exit(EXIT_FAILURE);
                }
                if(strcmp(ouser,user) != 0) {
diff --git a/sort.c b/sort.c
index ba4a5c338174972263f5b09928cdb59a4e2c2ef8..6b70ba9244dbfb2f6be12aaa0030bc9fe72e6a3d 100644 (file)
--- a/sort.c
+++ b/sort.c
@@ -72,7 +72,7 @@ void tmpsort(const struct userinfostruct *uinfo)
        }
 
        if(debug) {
-               debuga(_("Sorting file: %s\n"),arqin);
+               debuga(_("Sorting file \"%s\"\n"),arqin);
        }
 
        if (snprintf(csort,sizeof(csort),"sort -n -T \"%s\" -t \"\t\" %s -k %s -k %s -k %s -o \"%s\" \"%s\"",tmp,order,field1,field2,field3,arqou,arqin)>=sizeof(csort)) {
index 1829bff8db263f2acdb75a8d27fe9afcf951f911..3fa0e6313c0d260a5f82aa257b0c65628a0c21b9 100644 (file)
@@ -268,20 +268,24 @@ void topsites(void)
        while(regs<TopSitesNum && (buf=longline_read(fp_in,line))!=NULL) {
                getword_start(&gwarea,buf);
                if (getword_atoll(&nacc,&gwarea,'\t')<0) {
-                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),sites);
+                       debuga(_("Invalid number of accesses in file \"%s\"\n"),sites);
                        exit(EXIT_FAILURE);
                }
                if (nacc == 0) continue;
-               if (getword_atoll(&nbytes,&gwarea,'\t')<0 || getword_atoll(&ntime,&gwarea,'\t')<0) {
-                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),sites);
+               if (getword_atoll(&nbytes,&gwarea,'\t')<0) {
+                       debuga(_("Invalid number of bytes in file \"%s\"\n"),sites);
+                       exit(EXIT_FAILURE);
+               }
+               if (getword_atoll(&ntime,&gwarea,'\t')<0) {
+                       debuga(_("Invalid elapsed time in file \"%s\"\n"),sites);
                        exit(EXIT_FAILURE);
                }
                if (getword_atoi(&nusers,&gwarea,'\t')<0) {
-                       debuga(_("The number of users is invalid in file %s\n"),sites);
+                       debuga(_("Invalid number of users in file \"%s\"\n"),sites);
                        exit(EXIT_FAILURE);
                }
                if (getword_ptr(buf,&url,&gwarea,'\t')<0) {
-                       debuga(_("The url is invalid in file %s\n"),sites);
+                       debuga(_("Invalid url in file \"%s\"\n"),sites);
                        exit(EXIT_FAILURE);
                }
 
index 3030096f7dd023f7611ae2b9933249fc4f9d66b6..46baf8b4dec1583c42c50aaa6294becf63dda450 100644 (file)
--- a/topuser.c
+++ b/topuser.c
@@ -297,27 +297,27 @@ void topuser(void)
        while((warea=longline_read(fp_top1,line))!=NULL) {
                getword_start(&gwarea,warea);
                if (getword(user,sizeof(user),&gwarea,'\t')<0) {
-                       debuga(_("There is a broken user in file %s\n"),top1);
+                       debuga(_("Invalid user in file \"%s\"\n"),top1);
                        exit(EXIT_FAILURE);
                }
                if (getword_atoll(&nbytes,&gwarea,'\t')<0) {
-                       debuga(_("There is a broken number of bytes in file %s\n"),top1);
+                       debuga(_("Invalid number of bytes in file \"%s\"\n"),top1);
                        exit(EXIT_FAILURE);
                }
                if (getword_atoll(&nacc,&gwarea,'\t')<0) {
-                       debuga(_("There is a broken number of access in file %s\n"),top1);
+                       debuga(_("Invalid number of accesses in file \"%s\"\n"),top1);
                        exit(EXIT_FAILURE);
                }
                if (getword_atoll(&elap,&gwarea,'\t')<0) {
-                       debuga(_("There is a broken elpased time in file %s\n"),top1);
+                       debuga(_("Invalid elapsed time in file \"%s\"\n"),top1);
                        exit(EXIT_FAILURE);
                }
                if (getword_atoll(&incac,&gwarea,'\t')<0) {
-                       debuga(_("There is a broken in-cache size in file %s\n"),top1);
+                       debuga(_("Invalid in-cache size in file \"%s\"\n"),top1);
                        exit(EXIT_FAILURE);
                }
                if (getword_atoll(&oucac,&gwarea,'\n')<0) {
-                       debuga(_("There is a broken out-of-cache size in file %s\n"),top1);
+                       debuga(_("Invalid out-of-cache size in file \"%s\"\n"),top1);
                        exit(EXIT_FAILURE);
                }
                if(nacc < 1)
@@ -329,7 +329,7 @@ void topuser(void)
 
                uinfo=userinfo_find_from_id(user);
                if (!uinfo) {
-                       debuga(_("Unknown user ID %s in file %s\n"),user,top1);
+                       debuga(_("Unknown user ID %s in file \"%s\"\n"),user,top1);
                        exit(EXIT_FAILURE);
                }
                uinfo->topuser=1;
index bb8c08cb85ecd809d26c198a93d4b27fe68e6b30..2b4c7ab3e98524cd9547f1692a62ece869513cd8 100644 (file)
@@ -72,7 +72,7 @@ void useragent(void)
        }
 
        if(debug) {
-               debuga(_("Reading useragent log: %s\n"),UserAgentLog);
+               debuga(_("Reading useragent log \"%s\"\n"),UserAgentLog);
        }
 
        while(fgets(buf,sizeof(buf),fp_in)!=NULL) {
@@ -80,13 +80,13 @@ void useragent(void)
                getword_start(&gwarea,buf);
                if (getword(ip,sizeof(ip),&gwarea,' ')<0 || getword_skip(MAXLEN,&gwarea,'[')<0 ||
                    getword(data,sizeof(data),&gwarea,' ')<0) {
-                       debuga(_("Maybe you have a broken record or garbage in your %s file\n"),UserAgentLog);
+                       debuga(_("Invalid record in file \"%s\"\n"),UserAgentLog);
                        exit(EXIT_FAILURE);
                }
                getword_start(&gwarea1,data);
                if (getword(day,sizeof(day),&gwarea1,'/')<0 || getword(month,sizeof(month),&gwarea1,'/')<0 ||
                    getword(year,sizeof(year),&gwarea1,':')<0) {
-                       debuga(_("Maybe you have a broken date in your %s file\n"),UserAgentLog);
+                       debuga(_("Invalid date in file \"%s\"\n"),UserAgentLog);
                        exit(EXIT_FAILURE);
                }
                buildymd(day,month,year,wdate);
@@ -97,13 +97,13 @@ void useragent(void)
                        strcpy(idate,data);
                strcpy(fdate,data);
                if (getword_skip(MAXLEN,&gwarea,'"')<0 || getword(agent,sizeof(agent),&gwarea,'"')<0) {
-                       debuga(_("Maybe you have a broken useragent entry in your %s file\n"),UserAgentLog);
+                       debuga(_("Invalid useragent in file \"%s\"\n"),UserAgentLog);
                        exit(EXIT_FAILURE);
                }
 
                if(gwarea.current[0]!='\0') {
                        if (getword_skip(MAXLEN,&gwarea,' ')<0 || getword(user,sizeof(user),&gwarea,'\n')<0) {
-                               debuga(_("Maybe you have a broken record or garbage in your %s file\n"),UserAgentLog);
+                               debuga(_("Invalid record in file \"%s\"\n"),UserAgentLog);
                                exit(EXIT_FAILURE);
                        }
                        if(user[0] == '-')
@@ -129,7 +129,7 @@ void useragent(void)
        }
 
        if(debug) {
-               debuga(_("Sorting file: %s\n"),tmp2);
+               debuga(_("Sorting file \"%s\"\n"),tmp2);
        }
 
        if (snprintf(csort,sizeof(csort),"sort -n -t \"\t\" -k 3,3 -k 2,2 -k 1,1 -o \"%s\" \"%s\"",tmp2,tmp3)>=sizeof(csort)) {
@@ -177,7 +177,7 @@ void useragent(void)
        while(fgets(buf,sizeof(buf),fp_in)!=NULL) {
                getword_start(&gwarea,buf);
                if (getword(ip,sizeof(ip),&gwarea,'\t')<0) {
-                       debuga(_("There is an invalid IP address in file %s\n"),tmp2);
+                       debuga(_("Invalid IP address in file \"%s\"\n"),tmp2);
                        exit(EXIT_FAILURE);
                }
 
@@ -190,11 +190,11 @@ void useragent(void)
                }
 
                if (getword(agent,sizeof(agent),&gwarea,'\t')<0) {
-                       debuga(_("There is an invalid useragent in file %s\n"),tmp2);
+                       debuga(_("Invalid useragent in file \"%s\"\n"),tmp2);
                        exit(EXIT_FAILURE);
                }
                if (getword(user,sizeof(user),&gwarea,'\t')<0) {
-                       debuga(_("There is an invalid user ID in file %s\n"),tmp2);
+                       debuga(_("Invalid user ID in file \"%s\"\n"),tmp2);
                        exit(EXIT_FAILURE);
                }
 
@@ -247,11 +247,11 @@ void useragent(void)
        while(fgets(buf,sizeof(buf),fp_in)!=NULL) {
                getword_start(&gwarea,buf);
                if (getword(ip,sizeof(ip),&gwarea,'\t')<0) {
-                       debuga(_("There is an invalid IP address in file %s\n"),tmp3);
+                       debuga(_("Invalid IP address in file \"%s\"\n"),tmp3);
                        exit(EXIT_FAILURE);
                }
                if (getword(agent,sizeof(agent),&gwarea,'\t')<0) {
-                       debuga(_("There is an invalid useragent in file %s\n"),tmp3);
+                       debuga(_("Invalid useragent in file \"%s\"\n"),tmp3);
                        exit(EXIT_FAILURE);
                }
 
@@ -315,7 +315,7 @@ void useragent(void)
                fixendofline(buf);
                getword_start(&gwarea,buf);
                if (getword(tagent,sizeof(tagent),&gwarea,' ')<0) {
-                       debuga(_("There is an invalid useragent in file %s\n"),tmp3);
+                       debuga(_("Invalid useragent in file \"%s\"\n"),tmp3);
                        exit(EXIT_FAILURE);
                }
                nagent=atoi(tagent);
index a210e8a698bb3efdec863b3288942d3eb3563501..5431811f44ed1af3c543a8fd7256af9aab5276d3 100644 (file)
--- a/usertab.c
+++ b/usertab.c
@@ -90,7 +90,7 @@ static void init_file_usertab(const char *UserTabFile)
                z1=0;
                while(buf[z1] && (unsigned char)buf[z1]>' ') {
                        if (z2+3>=nreg) { //need at least 3 additional bytes for the minimum string "\n\t\0"
-                               debuga(_("The list of the users is too long in your %s file.\n"),UserTabFile);
+                               debuga(_("The list of the users is too long in file \"%s\"\n"),UserTabFile);
                                exit(EXIT_FAILURE);
                        }
                        userfile[z2++]=buf[z1++];
@@ -99,7 +99,7 @@ static void init_file_usertab(const char *UserTabFile)
                userfile[z2++]='\n';
                while(buf[z1] && (unsigned char)buf[z1]>=' ') {
                        if (z2+2>=nreg) { //need at least 2 additional bytes for "\t\0"
-                               debuga(_("The list of the users is too long in your %s file.\n"),UserTabFile);
+                               debuga(_("The list of the users is too long in file \"%s\"\n"),UserTabFile);
                                exit(EXIT_FAILURE);
                        }
                        userfile[z2++]=buf[z1++];
diff --git a/util.c b/util.c
index f098a6db0cc017e369b824139169249413443601..8249ef653668b2a6adeec2128f9ffaecfd08bc06 100644 (file)
--- a/util.c
+++ b/util.c
@@ -806,17 +806,17 @@ void obttotal(const char *dirname, const char *name, int nuser, long long int *t
                        continue;
                getword_start(&gwarea,buf);
                if (getword(user,sizeof(user),&gwarea,sep)<0) {
-                       debuga(_("There is an invalid user in file \"%s\"\n"),wdir);
+                       debuga(_("Invalid user in file \"%s\"\n"),wdir);
                        exit(EXIT_FAILURE);
                }
                if(strcmp(user,"TOTAL") != 0)
                        continue;
                if (getword_skip(MAXLEN,&gwarea,sep)<0) {
-                       debuga(_("There a broken total number of access in file \"%s\"\n"),wdir);
+                       debuga(_("Invalid total number of accesses in file \"%s\"\n"),wdir);
                        exit(EXIT_FAILURE);
                }
                if (getword_atoll(tbytes,&gwarea,sep)<0) {
-                       debuga(_("There is a broken number of bytes in file \"%s\"\n"),wdir);
+                       debuga(_("Invalid number of bytes in file \"%s\"\n"),wdir);
                        exit(EXIT_FAILURE);
                }
                break;