]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Reduce the number of distinct messages to translate
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Mon, 22 Dec 2014 12:59:25 +0000 (13:59 +0100)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Mon, 22 Dec 2014 12:59:25 +0000 (13:59 +0100)
Replace some messages to have less variants of the same message.

Be more consistent in the displayed messages strings. For instance, file
names are displayed between quotes.

27 files changed:
authfail.c
convlog.c
dansguardian_log.c
dansguardian_report.c
datafile.c
decomp.c
denied.c
download.c
email.c
exclude.c
grepday.c
html.c
index.c
ip2name.c
log.c
realtime.c
redirector.c
repday.c
report.c
siteuser.c
splitlog.c
topsites.c
topuser.c
url.c
useragent.c
usertab.c
util.c

index 9d14ef0175bca0a6e6d01f2dfcea7c437cb9caad..c429407e96ba929eb3bbd83aba57f12cc5af35fe 100644 (file)
@@ -114,7 +114,7 @@ void authfail_report(void)
        fprintf(fp_ou,"<tr><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th></tr>\n",_("USERID"),_("IP/NAME"),_("DATE/TIME"),_("ACCESSED SITE"));
 
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read file %s\n"),authfail_in);
+               debuga(_("Not enough memory to read file \"%s\"\n"),authfail_in);
                exit(EXIT_FAILURE);
        }
 
@@ -202,7 +202,7 @@ void authfail_report(void)
 
        fputs("</table></div>\n",fp_ou);
        if (write_html_trailer(fp_ou)<0)
-               debuga(_("Write error in file %s\n"),report);
+               debuga(_("Write error in file \"%s\"\n"),report);
        if (fclose(fp_ou)==EOF)
                debuga(_("Failed to close file \"%s\": %s\n"),report,strerror(errno));
 
index e05204a04a1372ef3426732f9cf1a72c422cd96a..cb77aeaa18185b2cc9ec574f2c8cf0fed867a7ef 100644 (file)
--- a/convlog.c
+++ b/convlog.c
@@ -50,7 +50,7 @@ void convlog(const char *arq, char *df, int dfrom, int duntil)
        }
 
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read the log file %s\n"),arq);
+               debuga(_("Not enough memory to read file \"%s\"\n"),arq);
                exit(EXIT_FAILURE);
        }
 
index d3786d173183c15de29bd8235dd4d26557ecd2d7..9dc60fc3e4c72cc84b7ed57f50c9067935ffe8ab 100644 (file)
@@ -97,19 +97,19 @@ void dansguardian_log(void)
                getword_start(&gwarea,buf);
                if (getword_atoi(&year,&gwarea,'.')<0 || getword_atoi(&mon,&gwarea,'.')<0 ||
                    getword_atoi(&day,&gwarea,' ')<0) {
-                       debuga(_("Invalid date found in your dansguardian log file %s\n"),loglocation);
+                       debuga(_("Invalid date in file \"%s\"\n"),loglocation);
                        exit(EXIT_FAILURE);
                }
                if (getword_atoi(&hour,&gwarea,':')<0 || getword(minsec,sizeof(minsec),&gwarea,' ')<0) {
-                       debuga(_("Invalid time found in your dansguardian log file %s\n"),loglocation);
+                       debuga(_("Invalid time found in file \"%s\"\n"),loglocation);
                        exit(EXIT_FAILURE);
                }
                if (getword(user,sizeof(user),&gwarea,' ')<0) {
-                       debuga(_("Invalid user found in your dansguardian log file %s\n"),loglocation);
+                       debuga(_("Invalid user found in file \"%s\"\n"),loglocation);
                        exit(EXIT_FAILURE);
                }
                if (getword(ip,sizeof(ip),&gwarea,' ')<0) {
-                       debuga(_("Invalid IP address found in your dansguardian log file %s\n"),loglocation);
+                       debuga(_("Invalid IP address in file \"%s\"\n"),loglocation);
                        exit(EXIT_FAILURE);
                }
                if (getword_skip(MAXLEN,&gwarea,'/')<0 || getword_skip(MAXLEN,&gwarea,'/')<0) {
index e8a62d2575a7258610c8916607176b0e4bcc8e89..07d8823fe0576ed1b5de519864ca65ef0499ff6d 100644 (file)
@@ -166,7 +166,7 @@ void dansguardian_report(void)
 
        fputs("</table></div>\n",fp_ou);
        if (write_html_trailer(fp_ou)<0)
-               debuga(_("Write error in file %s\n"),report);
+               debuga(_("Write error in file \"%s\"\n"),report);
        if (fclose(fp_ou)==EOF)
                debuga(_("Failed to close file \"%s\": %s\n"),report,strerror(errno));
 
index 6d20b43ce453923eacdb4767bffdfafec3fceb50..a72b59e5d46822a206b88257dc84adb114379e73 100644 (file)
@@ -94,7 +94,7 @@ void data_file(char *tmp)
                }
 
                if ((line=longline_create())==NULL) {
-                       debuga(_("Not enough memory to read the downloaded files.\n"));
+                       debuga(_("Not enough memory to read file \"%s\"\n"),tmp3);
                        exit(EXIT_FAILURE);
                }
 
@@ -195,7 +195,7 @@ void data_file(char *tmp)
        if (fp_ou) fclose(fp_ou);
 
        if(debug)
-               debuga(_("Datafile %s written successfully\n"),DataFile);
+               debuga(_("Datafile \"%s\" written successfully\n"),DataFile);
 }
 
 void saverecs(FILE *fp_ou, const struct userinfostruct *uinfo, long long int nacc, char *url, long long int nbytes, char *ip, char *hora, char *dia, long long int nelap, long long int incache, long long int oucache)
index e9c3b308030c018afb2849be2d206551bf6f67ea..dbdddac5e242adf363e6ebacb434d673b56bced6 100644 (file)
--- a/decomp.c
+++ b/decomp.c
@@ -33,15 +33,16 @@ FILE *decomp(const char *arq, bool *pipe)
        int arqlen;
 
        if(access(arq, R_OK) != 0) {
-               debuga(_("File not found: %s\n"),arq);
+               debuga(_("File \"%s\" not found\n"),arq);
                exit(EXIT_FAILURE);
        }
 
        arqlen=strlen(arq);
        if(arqlen>3 && strcmp(arq+arqlen-3,".gz") == 0) {
-               debuga(_("Decompressing log file \"%s\" with zcat\n"),arq);
+               /* TRANSLATORS: The last %s is the decompression program such as zcat or bzcat */
+               debuga(_("Decompressing log file \"%s\" with %s\n"),arq,"zcat");
                if (snprintf(cmd,sizeof(cmd),"zcat \"%s\"",arq)>=sizeof(cmd)) {
-                       debuga(_("decompression command too long for log file %s\n"),arq);
+                       debuga(_("Decompression command too long for log file \"%s\"\n"),arq);
                        exit(EXIT_FAILURE);
                }
                *pipe=true;
@@ -49,9 +50,9 @@ FILE *decomp(const char *arq, bool *pipe)
        }
 
        if(arqlen>4 && strcmp(arq+arqlen-4,".bz2") == 0) {
-               debuga(_("Decompressing log file \"%s\" with bzcat\n"),arq);
+               debuga(_("Decompressing log file \"%s\" with %s\n"),arq,"bzcat");
                if (snprintf(cmd,sizeof(cmd),"bzcat \"%s\"",arq)>=sizeof(cmd)) {
-                       debuga(_("decompression command too long for log file %s\n"),arq);
+                       debuga(_("Decompression command too long for log file \"%s\"\n"),arq);
                        exit(EXIT_FAILURE);
                }
                *pipe=true;
@@ -59,9 +60,9 @@ FILE *decomp(const char *arq, bool *pipe)
        }
 
        if(arqlen>2 && strcmp(arq+arqlen-2,".Z") == 0) {
-               debuga(_("Decompressing log file \"%s\" with zcat\n"),arq);
+               debuga(_("Decompressing log file \"%s\" with %s\n"),arq,"zcat");
                if (snprintf(cmd,sizeof(cmd),"zcat \"%s\"",arq)>=sizeof(cmd)) {
-                       debuga(_("decompression command too long for log file %s\n"),arq);
+                       debuga(_("Decompression command too long for log file \"%s\"\n"),arq);
                        exit(EXIT_FAILURE);
                }
                *pipe=true;
index 40fabad7f2667b56588aca5a6aee296cee48df3f..a7daecc3991c41fff70d07853fcf9e817e48125f 100644 (file)
--- a/denied.c
+++ b/denied.c
@@ -93,7 +93,7 @@ void gen_denied_report(void)
        fprintf(fp_ou,"<tr><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th></tr>\n",_("USERID"),_("IP/NAME"),_("DATE/TIME"),_("ACCESSED SITE"));
 
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read the denied accesses\n"));
+               debuga(_("Not enough memory to read file \"%s\"\n"),denied_in);
                exit(EXIT_FAILURE);
        }
 
@@ -173,7 +173,7 @@ void gen_denied_report(void)
 
        fputs("</table></div>\n",fp_ou);
        if (write_html_trailer(fp_ou)<0)
-               debuga(_("Write error in file %s\n"),report);
+               debuga(_("Write error in file \"%s\"\n"),report);
        if (fclose(fp_ou)==EOF)
                debuga(_("Failed to close file \"%s\": %s\n"),report,strerror(errno));
 
index 3987b5092c80b34653916b858a940c85e1966c3f..335c62dd624b6ad66316453951ac3a908bdec4d6 100644 (file)
@@ -150,7 +150,7 @@ void download_report(void)
        fprintf(fp_ou,"<tr><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th><th class=\"header_l\">%s</th></tr>\n",_("USERID"),_("IP/NAME"),_("DATE/TIME"),_("ACCESSED SITE"));
 
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read the downloaded files\n"));
+               debuga(_("Not enough memory to read file \"%s\"\n"),report_in);
                exit(EXIT_FAILURE);
        }
 
@@ -226,7 +226,7 @@ void download_report(void)
 
        fputs("</table></div>\n",fp_ou);
        if (write_html_trailer(fp_ou)<0)
-               debuga(_("Write error in file %s\n"),report);
+               debuga(_("Write error in file \"%s\"\n"),report);
        if (fclose(fp_ou)==EOF)
                debuga(_("Failed to close file \"%s\": %s\n"),report,strerror(errno));
 
diff --git a/email.c b/email.c
index ea508066f10ccb195ba28d2c83bbb29f35f08a80..ec540087a98e644ba6f66831e025fab40cf4c88f 100644 (file)
--- a/email.c
+++ b/email.c
@@ -78,7 +78,7 @@ int geramail(const char *dirname, int debug, const char *outdir, const char *ema
        totuser=0;
 
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read file %s\n"),wger);
+               debuga(_("Not enough memory to read file \"%s\"\n"),wger);
                exit(EXIT_FAILURE);
        }
 
index d1cb0385a5b4e8279527ce252c4a2f268c285646..3e7cebd8dae27b246f51cdbe92ec3e6e9407abd8 100644 (file)
--- a/exclude.c
+++ b/exclude.c
@@ -319,12 +319,12 @@ void getuexclude(const char *uexfile, int debug)
        }
 
        if (fseek(fp_ex, 0, SEEK_END)==-1) {
-               debuga(_("Failed to move till the end of the excluded users file %s: %s\n"),uexfile,strerror(errno));
+               debuga(_("Failed to move till the end of file \"%s\": %s\n"),uexfile,strerror(errno));
                exit(EXIT_FAILURE);
        }
        nreg = ftell(fp_ex);
        if (nreg<0) {
-               debuga(_("Cannot get the size of file %s\n"),uexfile);
+               debuga(_("Cannot get the size of file \"%s\": %s\n"),uexfile,strerror(errno));
                exit(EXIT_FAILURE);
        }
        nreg += 11;
@@ -334,7 +334,7 @@ void getuexclude(const char *uexfile, int debug)
        }
 
        if((excludeuser=(char *) malloc(nreg))==NULL){
-               debuga(_("malloc error (%ld bytes required)\n"),nreg);
+               debuga(_("malloc failed to allocate %ld bytes\n"),nreg);
                exit(EXIT_FAILURE);
        }
 
index c9ed6e509de9d3a5bf079543679f5ff7335086f7..efe63025f928a786c5344f1804ad80d38ae74af8 100644 (file)
--- a/grepday.c
+++ b/grepday.c
@@ -705,25 +705,25 @@ void greport_day(const struct userinfostruct *uinfo)
                fixendofline(buf);
                getword_start(&gwarea,buf);
                if (getword_atoll(&llday,&gwarea,'/')<0) {
-                       debuga(_("Invalid date in file %s\n"),wdirname);
+                       debuga(_("Invalid date in file \"%s\"\n"),wdirname);
                        exit(EXIT_FAILURE);
                }
                day=(int)llday;
                if (day<1 || day>31) continue;
                if (getword_skip(20,&gwarea,'\t')<0 || getword_skip(20,&gwarea,'\t')<0) {
-                       debuga(_("Invalid entry in file %s\n"),wdirname);
+                       debuga(_("Invalid entry in file \"%s\"\n"),wdirname);
                        exit(EXIT_FAILURE);
                }
                if ((datetimeby & DATETIME_BYTE)!=0) {
                        if (getword_atoll(&bytes,&gwarea,'\t')<0) {
-                               debuga(_("Invalid number of bytes in file %s\n"),wdirname);
+                               debuga(_("Invalid number of bytes in file \"%s\"\n"),wdirname);
                                exit(EXIT_FAILURE);
                        }
                        bytespoints[day-1]+=bytes;
                }
                if ((datetimeby & DATETIME_ELAP)!=0) {
                        if (getword_atoll(&elap,&gwarea,'\0')<0) {
-                               debuga(_("Invalid elapsed time in file %s\n"),wdirname);
+                               debuga(_("Invalid elapsed time in file \"%s\"\n"),wdirname);
                                exit(EXIT_FAILURE);
                        }
                        elappoints[day-1]+=elap;
@@ -775,7 +775,7 @@ void greport_day(const struct userinfostruct *uinfo)
        fputs("</table>\n",fp_ou);
 
        if (write_html_trailer(fp_ou)<0)
-               debuga(_("Write error in file %s\n"),wdirname);
+               debuga(_("Write error in file \"%s\"\n"),wdirname);
        if (fclose(fp_ou)==EOF)
                debuga(_("Failed to close file \"%s\": %s\n"),wdirname,strerror(errno));
 #endif //HAVE_GD
diff --git a/html.c b/html.c
index ed6aba9e274cecd150f6a11f3a03c2fa85cfc1c3..0080b0fbdd7dab1c5e43c3d3c74b9e842a47336b 100644 (file)
--- a/html.c
+++ b/html.c
@@ -95,7 +95,7 @@ void htmlrel(void)
 
                if (access(warea, R_OK) != 0) {
                        if (mkdir(warea,0755)) {
-                               debuga(_("Cannot create directory %s - %s\n"),warea,strerror(errno));
+                               debuga(_("Cannot create directory \"%s\": %s\n"),warea,strerror(errno));
                                exit(EXIT_FAILURE);
                        }
                }
@@ -125,7 +125,7 @@ void htmlrel(void)
                        have_denied_report=true;
 
                if ((line=longline_create())==NULL) {
-                       debuga(_("Not enough memory to read file %s\n"),arqin);
+                       debuga(_("Not enough memory to read file \"%s\"\n"),arqin);
                        exit(EXIT_FAILURE);
                }
 
@@ -219,7 +219,7 @@ void htmlrel(void)
                fputs("</tr></thead>\n",fp_ou);
 
                if(debug) {
-                       debuga(_("Making report: %s\n"),uinfo->id);
+                       debuga(_("Making report %s\n"),uinfo->id);
                }
                count=0;
                arqip[0]='\0';
@@ -408,7 +408,7 @@ void htmlrel(void)
                                olduserip[0]='\0';
 
                                if ((line1=longline_create())==NULL) {
-                                       debuga(_("Not enough memory to read file %s\n"),arqip);
+                                       debuga(_("Not enough memory to read file \"%s\"\n"),arqip);
                                        exit(EXIT_FAILURE);
                                }
                                while((buf=longline_read(fp_ip,line1))!=NULL) {
diff --git a/index.c b/index.c
index 04275c3d8d5f8f2656f8307ab9ba5ffaeab19397..e9c83a32db72603c55c014a271103afecca31209 100644 (file)
--- a/index.c
+++ b/index.c
@@ -558,7 +558,7 @@ static void file_index_to_date_index(const char *entry)
 
        sprintf(olddir,"%s%s",outdir,entry);
        if (rename(olddir,newdir)) {
-               debugapos("index",_("Error renaming \"%s\" into \"%s\": %s\n"),olddir,newdir,strerror(errno));
+               debugapos("index",_("Failed to rename \"%s\" into \"%s\": %s\n"),olddir,newdir,strerror(errno));
                exit(EXIT_FAILURE);
        }
 
@@ -660,7 +660,7 @@ static void date_index_to_file_index(const char *entry)
                        else continue;
                        sprintf(olddir,"%s%04d/%s/%s",outdir,y1,direntp2->d_name,direntp3->d_name);
                        if(rename(olddir,newdir)) {
-                               debugapos("index",_("Error renaming \"%s\" into \"%s\": %s\n"),olddir,newdir,strerror(errno));
+                               debugapos("index",_("Failed to rename \"%s\" into \"%s\": %s\n"),olddir,newdir,strerror(errno));
                                exit(EXIT_FAILURE);
                        }
                }
index a2cf6f1cafb35c1c399552df263bee6ca21d83ca..32720c09c9557da02ab6e5fd14fab9d0795edb5e 100644 (file)
--- a/ip2name.c
+++ b/ip2name.c
@@ -276,7 +276,7 @@ void name2ip(char *name,int name_size)
        error=getaddrinfo(addr,NULL,NULL,&res);
        if (error) {
                freeaddrinfo(res);
-               debuga(_("Cannot resolve host name %s: %s\n"),name,gai_strerror(error));
+               debuga(_("Cannot resolve host name \"%s\": %s\n"),name,gai_strerror(error));
                exit(EXIT_FAILURE);
        }
        if (res->ai_family==AF_INET) {
diff --git a/log.c b/log.c
index 3d12704a09a24236cf92e1df78cda43407879a77..c4d2456ce39c1def861dcffc6bb0c39645d4ab8a 100644 (file)
--- a/log.c
+++ b/log.c
@@ -548,7 +548,7 @@ int main(int argc,char *argv[])
 
        if(ConfigFile[0] == '\0') snprintf(ConfigFile,sizeof(ConfigFile),"%s/sarg.conf",SYSCONFDIR);
        if(access(ConfigFile, R_OK) != 0) {
-               debuga(_("Cannot open config file: %s - %s\n"),ConfigFile,strerror(errno));
+               debuga(_("Cannot open file \"%s\": %s\n"),ConfigFile,strerror(errno));
                exit(EXIT_FAILURE);
        }
 
@@ -740,11 +740,11 @@ int main(int argc,char *argv[])
                printf(_("                  Debug messages (-x) = %s\n"),(debug) ? _("Yes") : _("No"));
                printf(_("                Process messages (-z) = %s\n"),(debugz) ? _("Yes") : _("No"));
                printf(_(" Previous reports to keep (--lastlog) = %d\n"),LastLog);
-               printf(_("sarg version: %s\n"),VERSION);
+               printf(_("SARG version: %s\n"),VERSION);
        }
 
        if(debug)
-               debuga(_("sarg version: %s\n"),VERSION);
+               debuga(_("SARG version: %s\n"),VERSION);
 
 #ifdef ENABLE_DOUBLE_CHECK_DATA
        debuga(_("Sarg compiled to report warnings if the output is inconsistent\n"));
@@ -777,7 +777,7 @@ int main(int argc,char *argv[])
 #warning "No rlimit resource for the number of open files"
 #endif
                if(rc == -1) {
-                       debuga(_("setrlimit error - %s\n"),strerror(errno));
+                       debuga(_("setrlimit error: %s\n"),strerror(errno));
                }
 
                if(debug)
@@ -866,7 +866,7 @@ int main(int argc,char *argv[])
                                        }
                        }
                        rewind(fp_in);
-                       printf(_("SARG: Records in file: %lu, reading: %3.2f%%"),recs1,(float) 0);
+                       printf(_("SARG: Records in file: %lu, reading: %3.2lf%%"),recs1,0.);
                        putchar('\r');
                        fflush( stdout ) ;
                }
@@ -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 %s\n"),arq);
+                                               debuga(_("Invalid time found in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                        t=&tt;
@@ -1151,7 +1151,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 %s\n"),arq);
+                                       debuga(_("Invalid time found in file \"%s\"\n"),arq);
                                        exit(EXIT_FAILURE);
                                }
                                t=&tt;
@@ -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 %s\n"),arq);
+                                               debuga(_("Invalid time found in file \"%s\"\n"),arq);
                                                exit(EXIT_FAILURE);
                                        }
                                }
@@ -1459,7 +1459,7 @@ int main(int argc,char *argv[])
                        if (!ufile) {
                                ufile=malloc(sizeof(*ufile));
                                if (!ufile) {
-                                       debuga(_("Not enough memory to store the user %s\n"),user);
+                                       debuga(_("Not enough memory to store user %s\n"),user);
                                        exit(EXIT_FAILURE);
                                }
                                memset(ufile,0,sizeof(*ufile));
@@ -1573,8 +1573,10 @@ int main(int argc,char *argv[])
                                pclose(fp_in);
                        else {
                                fclose(fp_in);
-                               if( ShowReadStatistics )
-                                       printf(_("SARG: Records in file: %lu, reading: %3.2f%%\n"),recs1, (float) 100 );
+                               if( ShowReadStatistics ) {
+                                       printf(_("SARG: Records in file: %lu, reading: %3.2lf%%"),recs1,100.);
+                                       putchar('\n');
+                               }
                        }
                }
        }
@@ -1648,8 +1650,10 @@ int main(int argc,char *argv[])
                debugaz(_("period=%s\n"),period.text);
        }
 
-       if(debug)
-               debuga(_("Period: %s\n"),period.text);
+       if(debug) {
+               debuga(_("Period: %s"),period.text);
+               putchar('\n');
+       }
 
        if(fp_denied)
                fclose(fp_denied);
@@ -1776,7 +1780,7 @@ static void getusers(const char *pwdfile, int debug)
        }
 
        if (fseek(fp_usr, 0, SEEK_END)==-1) {
-               debuga(_("Failed to move till the end of the users file \"%s\": %s\n"),pwdfile,strerror(errno));
+               debuga(_("Failed to move till the end of file \"%s\": %s\n"),pwdfile,strerror(errno));
                exit(EXIT_FAILURE);
        }
        nreg = ftell(fp_usr);
@@ -1791,7 +1795,7 @@ static void getusers(const char *pwdfile, int debug)
        }
 
        if((userfile=(char *) malloc(nreg))==NULL){
-               debuga(_("malloc error (%ld)\n"),nreg);
+               debuga(_("malloc failed to allocate %ld bytes\n"),nreg);
                exit(EXIT_FAILURE);
        }
 
index b517cada06ae0acd24d08fab65f7d87392a271fd..44d5d9f3a4fedc846fb8b1f14866e14d2abbc139 100755 (executable)
@@ -80,7 +80,7 @@ static void getlog(void)
        sprintf(cmd,"tail -%d \"%s\"",realtime_access_log_lines,AccessLog[0]);
        fp = popen(cmd, "r");
        if (!fp) {
-               debuga(_("Failed to get the %d trailing lines of %s: %s\n"),realtime_access_log_lines,AccessLog[0],strerror(errno));
+               debuga(_("Failed to get the %d trailing lines of \"%s\": %s\n"),realtime_access_log_lines,AccessLog[0],strerror(errno));
                debuga(_("Failed \"tail\" command: %s\n"),cmd);
                exit(EXIT_FAILURE);
        }
@@ -233,11 +233,11 @@ static void datashow(const char *tmp)
                        exit(EXIT_FAILURE);
                }
                if (getword(ip,sizeof(ip),&gwarea,'\t')<0) {
-                       debuga(_("Invalid IP address in file %s\n"),tmp);
+                       debuga(_("Invalid IP address in file \"%s\"\n"),tmp);
                        exit(EXIT_FAILURE);
                }
                if (getword(user,sizeof(user),&gwarea,'\t')<0) {
-                       debuga(_("Invalid user name in file %s\n"),tmp);
+                       debuga(_("Invalid user found in file \"%s\"\n"),tmp);
                        exit(EXIT_FAILURE);
                }
                if (strlen(user) < 1) continue;
index 20af396cae50e47549e22af49e28fba556178ffc..fb114209cbb4a18b026ea1780cfb0272efdedaec 100644 (file)
@@ -80,7 +80,7 @@ static void parse_log(FILE *fp_ou,char *buf)
                        }
                        if(strcmp(leks,"end") != 0) {
                                if (getword_limit(res,sizeof(res),&gwarea,sep[0])<0) {
-                                       debuga(_("Parsing of tag \"%s\" in redirector log %s returned no result\n"),leks,wentp);
+                                       debuga(_("Parsing of tag \"%s\" in redirector log \"%s\" returned no result\n"),leks,wentp);
                                        RedirectorErrors++;
                                        return;
                                }
@@ -137,7 +137,7 @@ static void parse_log(FILE *fp_ou,char *buf)
        } else {
                if (getword_atoll(&lyear,&gwarea,'-')<0 || getword_atoll(&lmon,&gwarea,'-')<0 ||
                                getword_atoll(&lday,&gwarea,' ')<0) {
-                       debuga(_("Invalid date found in file %s\n"),wentp);
+                       debuga(_("Invalid date in 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 found in file \"%s\"\n"),wentp);
                        RedirectorErrors++;
                        return;
                }
@@ -155,22 +155,22 @@ static void parse_log(FILE *fp_ou,char *buf)
                        return;
                }
                if (getword(list,sizeof(list),&gwarea,'/')<0) {
-                       debuga(_("Invalid redirected list in file %s\n"),wentp);
+                       debuga(_("Invalid redirected list in file \"%s\"\n"),wentp);
                        RedirectorErrors++;
                        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;
                }
                if (getword(ip,sizeof(ip),&gwarea,'/')<0) {
-                       debuga(_("Invalid source IP in file %s\n"),wentp);
+                       debuga(_("Invalid source IP in file \"%s\"\n"),wentp);
                        RedirectorErrors++;
                        return;
                }
                if (getword_skip(MAXLEN,&gwarea,' ')<0 || getword(user,sizeof(user),&gwarea,' ')<0) {
-                       debuga(_("Invalid user in file %s\n"),wentp);
+                       debuga(_("Invalid user found in file \"%s\"\n"),wentp);
                        RedirectorErrors++;
                        return;
                }
@@ -269,7 +269,7 @@ static void read_log(const char *wentp, FILE *fp_ou,int dfrom,int duntil)
        }
 
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read the redirector log\n"));
+               debuga(_("Not enough memory to read file \"%s\"\n"),wentp);
                exit(EXIT_FAILURE);
        }
 
@@ -462,7 +462,7 @@ void redirector_report(void)
        }
 
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read the processed redirector log\n"));
+               debuga(_("Not enough memory to read file \"%s\"\n"),redirector_sorted);
                exit(EXIT_FAILURE);
        }
 
@@ -479,19 +479,19 @@ void redirector_report(void)
        while((buf=longline_read(fp_in,line))!=NULL) {
                getword_start(&gwarea,buf);
                if (getword(user,sizeof(user),&gwarea,'\t')<0) {
-                       debuga(_("Invalid user in file %s\n"),redirector_sorted);
+                       debuga(_("Invalid user found in file \"%s\"\n"),redirector_sorted);
                        exit(EXIT_FAILURE);
                }
                if (getword_atoll(&data2,&gwarea,'\t')<0) {
-                       debuga(_("Invalid date in file %s\n"),redirector_sorted);
+                       debuga(_("Invalid date in file \"%s\"\n"),redirector_sorted);
                        exit(EXIT_FAILURE);
                }
                if (getword(hora,sizeof(hora),&gwarea,'\t')<0) {
-                       debuga(_("Invalid time in file %s\n"),redirector_sorted);
+                       debuga(_("Invalid time found in file \"%s\"\n"),redirector_sorted);
                        exit(EXIT_FAILURE);
                }
                if (getword(ip,sizeof(ip),&gwarea,'\t')<0) {
-                       debuga(_("Invalid IP address in file %s\n"),redirector_sorted);
+                       debuga(_("Invalid IP address in file \"%s\"\n"),redirector_sorted);
                        exit(EXIT_FAILURE);
                }
                if (getword_ptr(buf,&url,&gwarea,'\t')<0) {
@@ -571,7 +571,7 @@ void redirector_report(void)
        
        fputs("</div>\n",fp_ou);
        if (write_html_trailer(fp_ou)<0)
-               debuga(_("Write error in file %s\n"),report);
+               debuga(_("Write error in file \"%s\"\n"),report);
        if (fclose(fp_ou)==EOF)
                debuga(_("Failed to close file \"%s\": %s\n"),report,strerror(errno));
 
index 0df048475cccdb5bcdcf70584d940b8d81de1581..d78c625653777e35a1e6db4802fc2c03db14a72e 100644 (file)
--- a/repday.c
+++ b/repday.c
@@ -78,7 +78,7 @@ void report_day(const struct userinfostruct *uinfo)
                fixendofline(buf);
                getword_start(&gwarea,buf);
                if (getword(data,sizeof(data),&gwarea,'\t')<0) {
-                       debuga(_("Invalid date in file %s\n"),wdirname);
+                       debuga(_("Invalid date in file \"%s\"\n"),wdirname);
                        exit(EXIT_FAILURE);
                }
                if (sscanf(data,"%d/%d/%d",&day,&month,&year)!=3) continue;
@@ -94,7 +94,7 @@ void report_day(const struct userinfostruct *uinfo)
                }
 
                if (getword_atoll(&hour,&gwarea,'\t')<0) {
-                       debuga(_("Invalid time in file %s\n"),wdirname);
+                       debuga(_("Invalid time found in file \"%s\"\n"),wdirname);
                        exit(EXIT_FAILURE);
                }
                ihour=(int)hour;
@@ -103,14 +103,14 @@ void report_day(const struct userinfostruct *uinfo)
                if ((datetimeby & DATETIME_BYTE)!=0) {
                        colsep=((datetimeby & DATETIME_ELAP)!=0) ? '\t' : '\0';
                        if (getword_atoll(&bytes,&gwarea,colsep)<0) {
-                               debuga(_("Invalid number of bytes in file %s\n"),wdirname);
+                               debuga(_("Invalid number of bytes in file \"%s\"\n"),wdirname);
                                exit(EXIT_FAILURE);
                        }
                        tbytes[i]+=bytes;
                }
                if ((datetimeby & DATETIME_ELAP)!=0) {
                        if (getword_atoll(&elap,&gwarea,'\0')<0) {
-                               debuga(_("Invalid elapsed time in file %s\n"),wdirname);
+                               debuga(_("Invalid elapsed time in file \"%s\"\n"),wdirname);
                                exit(EXIT_FAILURE);
                        }
                        telap[i]+=elap;
@@ -242,7 +242,7 @@ void report_day(const struct userinfostruct *uinfo)
        }
 
        if (write_html_trailer(fp_ou)<0)
-               debuga(_("Write error in file %s\n"),arqout);
+               debuga(_("Write error in file \"%s\"\n"),arqout);
        if (fclose(fp_ou)==EOF)
                debuga(_("Failed to close file \"%s\": %s\n"),arqout,strerror(errno));
        return;
index 7e703587a3f4c0d9c2eb82eab8d5a54b347095d7..8fb260de5070eb211c7d7ecb3d0e0d870b9fee42 100644 (file)
--- a/report.c
+++ b/report.c
@@ -90,7 +90,7 @@ void gerarel(void)
        }
 
        if(debugz){
-               debugaz(_("outdirname=%s\n"),outdirname);
+               debugaz(_("Report output directory name=%s\n"),outdirname);
        }
 
        if(UserAgentLog[0] != '\0' && email[0] == '\0') useragent();
@@ -153,7 +153,7 @@ void gerarel(void)
                oucache=0;
 
                if ((line=longline_create())==NULL) {
-                       debuga(_("Not enough memory to read the downloaded files\n"));
+                       debuga(_("Not enough memory to read file \"%s\"\n"),tmp3);
                        exit(EXIT_FAILURE);
                }
 
@@ -417,7 +417,7 @@ static FILE *maketmp(const char *user, const char *dirname, int debug)
        if((ReportType & REPORT_TYPE_USERS_SITES) == 0) return(NULL);
        if((ReportType & REPORT_TYPE_TOPUSERS) == 0) return(NULL);
 
-       if(debug) debuga(_("Making file: %s/%s\n"),tmp,user);
+       if(debug) debuga(_("Making file %s/%s\n"),tmp,user);
        if (snprintf(wdirname,sizeof(wdirname),"%s/%s.utmp",tmp,user)>=sizeof(wdirname)) {
                debuga(_("Temporary file name too long: %s/%s.utmp\n"),tmp,user);
                exit(EXIT_FAILURE);
@@ -488,7 +488,7 @@ static void gravager(FILE *fp_gen,const char *filename, const struct userinfostr
        to print a long long int unless it is exactly 64-bits long.
        */
        if (fprintf(fp_gen,"%s\t%"PRIu64"\t%"PRIu64"\t%s\t%s\t%s\t%s\t%"PRIu64"\t%"PRIu64"\t%"PRIu64"\n",uinfo->id,(uint64_t)nacc,(uint64_t)nbytes,url,ip,hora,dia,(uint64_t)nelap,(uint64_t)incache,(uint64_t)oucache)<0) {
-               debuga(_("Failed to write a line in %s\n"),filename);
+               debuga(_("Failed to write a line in \"%s\"\n"),filename);
                exit(EXIT_FAILURE);
        }
 
@@ -510,7 +510,7 @@ void totalger(FILE *fp_gen,const char *filename)
        to print a long long int unless it is exactly 64-bits long.
        */
        if (fprintf(fp_gen,"TOTAL\t%"PRIu64"\t%"PRIu64"\t%"PRIu64"\t%"PRIu64"\t%"PRIu64"\n",(uint64_t)globstat.nacc,(uint64_t)globstat.nbytes,(uint64_t)globstat.elap,(uint64_t)globstat.incache,(uint64_t)globstat.oucache)<0) {
-               debuga(_("Failed to write the total line in %s\n"),filename);
+               debuga(_("Failed to write the total line in \"%s\"\n"),filename);
                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 \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                buffer++;
@@ -553,7 +553,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 size in %s\n"),filename);
+                       debuga(_("Invalid total size in \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                buffer++;
@@ -570,7 +570,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 elapsed time in %s\n"),filename);
+                       debuga(_("Invalid total elapsed time in \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                buffer++;
@@ -587,7 +587,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 cache hit in %s\n"),filename);
+                       debuga(_("Invalid total cache hit in \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                buffer++;
@@ -604,7 +604,7 @@ int ger_read(char *buffer,struct generalitemstruct *item,const char *filename)
                while (isdigit(*buffer))
                        number=(number * 10) + (*buffer++)-'0';
                if (*buffer!='\0') {
-                       debuga(_("Invalid total cache miss in %s\n"),filename);
+                       debuga(_("Invalid total cache miss in \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                item->oucache=number*sign;
@@ -614,7 +614,7 @@ int ger_read(char *buffer,struct generalitemstruct *item,const char *filename)
                item->user=buffer;
                for (i=0 ; i<MAX_USER_LEN-1 && (unsigned char)*buffer>=' ' ; i++) buffer++;
                if (*buffer!='\t') {
-                       debuga(_("User name too long or invalid in %s\n"),filename);
+                       debuga(_("User name too long or invalid in \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                *buffer++='\0';
@@ -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 \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                buffer++;
@@ -647,7 +647,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 bytes in %s\n"),filename);
+                       debuga(_("Invalid number of bytes in file \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                buffer++;
@@ -656,7 +656,7 @@ int ger_read(char *buffer,struct generalitemstruct *item,const char *filename)
                item->url=buffer;
                while ((unsigned char)*buffer>=' ') buffer++;
                if (*buffer!='\t') {
-                       debuga(_("URL too long or invalid in %s\n"),filename);
+                       debuga(_("URL too long or invalid in \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                *buffer++='\0';
@@ -664,7 +664,7 @@ int ger_read(char *buffer,struct generalitemstruct *item,const char *filename)
                item->ip=buffer;
                for (i=0 ; i<MAX_IP_LEN-1 && (unsigned char)*buffer>=' ' ; i++) buffer++;
                if (*buffer!='\t') {
-                       debuga(_("IP address too long or invalid in %s\n"),filename);
+                       debuga(_("IP address too long or invalid in \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                *buffer++='\0';
@@ -672,7 +672,7 @@ int ger_read(char *buffer,struct generalitemstruct *item,const char *filename)
                item->time=buffer;
                for (i=0 ; i<MAX_DATETIME_LEN-1 && (unsigned char)*buffer>=' ' ; i++) buffer++;
                if (*buffer!='\t') {
-                       debuga(_("Time too long or invalid in %s\n"),filename);
+                       debuga(_("Time too long or invalid in \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                *buffer++='\0';
@@ -680,7 +680,7 @@ int ger_read(char *buffer,struct generalitemstruct *item,const char *filename)
                item->date=buffer;
                for (i=0 ; i<MAX_DATETIME_LEN-1 && (unsigned char)*buffer>=' ' ; i++) buffer++;
                if (*buffer!='\t') {
-                       debuga(_("Date too long or invalid in %s\n"),filename);
+                       debuga(_("Date too long or invalid in \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                *buffer++='\0';
@@ -696,7 +696,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 elapsed time in %s\n"),filename);
+                       debuga(_("Invalid elapsed time in file \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                buffer++;
@@ -713,7 +713,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 cache hit size in %s\n"),filename);
+                       debuga(_("Invalid cache hit size in \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                buffer++;
@@ -730,7 +730,7 @@ int ger_read(char *buffer,struct generalitemstruct *item,const char *filename)
                while (isdigit(*buffer))
                        number=(number * 10) + (*buffer++)-'0';
                if (*buffer!='\0') {
-                       debuga(_("Invalid cache miss size in %s\n"),filename);
+                       debuga(_("Invalid cache miss size in \"%s\"\n"),filename);
                        exit(EXIT_FAILURE);
                }
                item->oucache=number*sign;
@@ -744,7 +744,7 @@ static void grava_SmartFilter(const char *dirname, const char *user, const char
        char wdirname[MAXLEN];
 
        if (snprintf(wdirname,sizeof(wdirname),"%s/smartfilter.int_unsort",dirname)>=sizeof(wdirname)) {
-               debuga(_("File name too long for %s/smartfilter.int_unsort\n"),dirname);
+               debuga(_("File name too long: %s/smartfilter.int_unsort\n"),dirname);
                exit(EXIT_FAILURE);
        }
 
index e4268f6a686484e383aadd5137c19b3425304733..bd4d0a65c72ea1e2a441362e4bff6d0f34f6648f 100644 (file)
@@ -107,7 +107,7 @@ void siteuser(void)
        topuser_link=((ReportType & REPORT_TYPE_USERS_SITES) != 0 && !indexonly);
 
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read file %s\n"),general2);
+               debuga(_("Not enough memory to read file \"%s\"\n"),general2);
                exit(EXIT_FAILURE);
        }
 
index e1cfd33b812a3278cec09783520ffa91a2fb5e6d..7a30725d7afdfb6858eb5754685fa936adb721ab 100644 (file)
@@ -86,7 +86,7 @@ void splitlog(const char *arq, const char *df, int dfrom, int duntil, int conver
        }
 
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read the log file %s\n"),arq);
+               debuga(_("Not enough memory to read file \"%s\"\n"),arq);
                exit(EXIT_FAILURE);
        }
        time(&min_tt);
@@ -94,7 +94,7 @@ void splitlog(const char *arq, const char *df, int dfrom, int duntil, int conver
        while((buf=longline_read(fp_in,line))!=NULL) {
                getword_start(&gwarea,buf);
                if (getword(data,sizeof(data),&gwarea,' ')<0) {
-                       debuga(_("Invalid date found in file %s\n"),arq);
+                       debuga(_("Invalid date in file \"%s\"\n"),arq);
                        exit(EXIT_FAILURE);
                }
                tt=atoi(data);
index de53468247aa2a9548a578ce8dda87c43e83b322..1829bff8db263f2acdb75a8d27fe9afcf951f911 100644 (file)
@@ -103,7 +103,7 @@ void topsites(void)
        }
 
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read file %s\n"),general2);
+               debuga(_("Not enough memory to read file \"%s\"\n"),general2);
                exit(EXIT_FAILURE);
        }
 
@@ -261,7 +261,7 @@ void topsites(void)
        ntopsites = 0;
 
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read file %s\n"),sites);
+               debuga(_("Not enough memory to read file \"%s\"\n"),sites);
                exit(EXIT_FAILURE);
        }
 
@@ -316,7 +316,7 @@ void topsites(void)
 
        fputs("</table></div>\n",fp_ou);
        if (write_html_trailer(fp_ou)<0)
-               debuga(_("Write error in file %s\n"),report);
+               debuga(_("Write error in file \"%s\"\n"),report);
        if (fclose(fp_ou)==EOF)
                debuga(_("Failed to close file \"%s\": %s\n"),report,strerror(errno));
 
index 977c3b17c008838e12f9d42498ea97c59fe9ffa5..3030096f7dd023f7611ae2b9933249fc4f9d66b6 100644 (file)
--- a/topuser.c
+++ b/topuser.c
@@ -98,7 +98,7 @@ void topuser(void)
        totuser=0;
 
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read the file %s\n"),wger);
+               debuga(_("Not enough memory to read file \"%s\"\n"),wger);
                exit(EXIT_FAILURE);
        }
 
@@ -290,7 +290,7 @@ void topuser(void)
        ntopuser = 0;
 
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read the downloaded files\n"));
+               debuga(_("Not enough memory to read file \"%s\"\n"),top1);
                exit(EXIT_FAILURE);
        }
 
diff --git a/url.c b/url.c
index df86d22957af5f23526383ba2e15ada1a47dd994..f349ed3151591261bde48c1c4097d693e122561c 100644 (file)
--- a/url.c
+++ b/url.c
@@ -580,12 +580,12 @@ void read_hostalias(const char *Filename)
        if (debug) debuga(_("Reading host alias file \"%s\"\n"),Filename);
        fi=fopen(Filename,"rt");
        if (!fi) {
-               debuga(_("Cannot read host name alias file \"%s\" - %s\n"),Filename,strerror(errno));
+               debuga(_("Cannot read host name alias file \"%s\": %s\n"),Filename,strerror(errno));
                exit(EXIT_FAILURE);
        }
        
        if ((line=longline_create())==NULL) {
-               debuga(_("Not enough memory to read the host name aliases\n"));
+               debuga(_("Not enough memory to read file \"%s\"\n"),Filename);
                exit(EXIT_FAILURE);
        }
 
index 4553c20feb3814d173e72008a648d3fd791e9709..bb8c08cb85ecd809d26c198a93d4b27fe68e6b30 100644 (file)
@@ -329,7 +329,7 @@ void useragent(void)
 
        fputs("</table></div>\n",fp_ht);
        if (write_html_trailer(fp_ht)<0)
-               debuga(_("Write error in file %s\n"),hfile);
+               debuga(_("Write error in file \"%s\"\n"),hfile);
        if (fclose(fp_ht)==EOF)
                debuga(_("Failed to close file \"%s\": %s\n"),hfile,strerror(errno));
 
index 8f9258f77cb9a65259cddc9992ea7b6e4b9d4385..a210e8a698bb3efdec863b3288942d3eb3563501 100644 (file)
--- a/usertab.c
+++ b/usertab.c
@@ -65,7 +65,7 @@ static void init_file_usertab(const char *UserTabFile)
                exit(EXIT_FAILURE);
        }
        if (fseek(fp_usr, 0, SEEK_END)==-1) {
-               debuga(_("Failed to move till the end of the usertab file %s: %s\n"),UserTabFile,strerror(errno));
+               debuga(_("Failed to move till the end of file \"%s\": %s\n"),UserTabFile,strerror(errno));
                exit(EXIT_FAILURE);
        }
        nreg = ftell(fp_usr);
diff --git a/util.c b/util.c
index 8aec7aba7cab8b8a156682f93a3d19fb85a66dc8..fa502217dc7bb098f899c627b82c3a8b2142bb9b 100644 (file)
--- a/util.c
+++ b/util.c
@@ -342,7 +342,7 @@ void my_mkdir(const char *name)
        chars=0;
        for (i=0 ; name[i] ; i++) {
                if (i>=sizeof(w0)) {
-                       debuga(_("directory name too long: %s\n"),name);
+                       debuga(_("Directory name too long: %s\n"),name);
                        exit(EXIT_FAILURE);
                }
                if (chars>0 && name[i] == '/') {
@@ -787,9 +787,7 @@ void obttotal(const char *dirname, const char *name, int nuser, long long int *t
        }
 
        if ((line=longline_create())==NULL) {
-               /* TRANSLATORS: %s is a file name.
-                */
-               debuga(_("Not enough memory to read \"%s\"\n"),wdir);
+               debuga(_("Not enough memory to read file \"%s\"\n"),wdir);
                exit(EXIT_FAILURE);
        }
 
@@ -1136,7 +1134,7 @@ int vrfydir(const struct periodstruct *per1, const char *addr, const char *site,
 
        sprintf(wdir,"%s/sarg-date",outdirname);
        if ((fp_ou = fopen(wdir, "wt")) == 0) {
-               debuga(_("Cannot open \"%s\": %s\n"),wdir,strerror(errno));
+               debuga(_("Cannot open file \"%s\": %s\n"),wdir,strerror(errno));
                perror("SARG:");
                exit(EXIT_FAILURE);
        }
@@ -1150,7 +1148,7 @@ int vrfydir(const struct periodstruct *per1, const char *addr, const char *site,
                exit(EXIT_FAILURE);
        }
        if (fclose(fp_ou)==EOF) {
-               debuga(_("Failed to write the date in \"%s\": %s\n"),wdir,strerror(errno));
+               debuga(_("Failed to close file \"%s\": %s\n"),wdir,strerror(errno));
                perror("SARG:");
                exit(EXIT_FAILURE);
        }
@@ -1450,7 +1448,7 @@ void load_excludecodes(const char *ExcludeCodes)
        }
 
        if (fseek(fp_in, 0, SEEK_END)==-1) {
-               debuga(_("Failed to move till the end of the excluded codes file \"%s\": %s\n"),ExcludeCodes,strerror(errno));
+               debuga(_("Failed to move till the end of file \"%s\": %s\n"),ExcludeCodes,strerror(errno));
                exit(EXIT_FAILURE);
        }
        MemSize = ftell(fp_in);
@@ -1830,7 +1828,7 @@ void url_to_file(const char *url,char *file,int filesize)
 
 void version(void)
 {
-       printf(_("SARG Version: %s\n"),VERSION);
+       printf(_("SARG version: %s\n"),VERSION);
 #if defined(ENABLE_NLS) && defined(HAVE_LOCALE_H)
        if (debug) {
                printf(_("\nFor the translation to work, a valid message file should be installed as "