]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Merge messages
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Sun, 26 Apr 2015 11:32:06 +0000 (13:32 +0200)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Sun, 26 Apr 2015 11:32:06 +0000 (13:32 +0200)
These messages are related to file manipulation.

exclude.c
index.c
lastlog.c
log.c
realtime.c
usertab.c
util.c

index cc6aa4427c55939cd5b69902a50d5fb28901bca0..98e39d24e26a6fa09f03402f6f8f9fdfd479e7fd 100644 (file)
--- a/exclude.c
+++ b/exclude.c
@@ -322,7 +322,7 @@ 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);
@@ -332,7 +332,7 @@ void getuexclude(const char *uexfile, int debug)
        }
        nreg += 11;
        if (fseek(fp_ex, 0, SEEK_SET)==-1) {
-               debuga(_("Failed to rewind the excluded users file %s: %s\n"),uexfile,strerror(errno));
+               debuga(_("Failed to rewind file \"%s\": %s\n"),uexfile,strerror(errno));
                exit(EXIT_FAILURE);
        }
 
diff --git a/index.c b/index.c
index 46d1139ebc8e6998f02aaebed81b9068c4a20591..3075b1aee466b30a81a7be0835c47cd48453f889 100644 (file)
--- a/index.c
+++ b/index.c
@@ -167,7 +167,7 @@ static long long int get_size(char *path,int path_size)
                }
                strcpy(path+path_len,direntp->d_name);
                if (MY_LSTAT(path,&statb) == -1) {
-                       debuga(_("Failed to get the file statistics of %s: %s\n"),path,strerror(errno));
+                       debuga(_("Failed to get the statistics of file \"%s\": %s\n"),path,strerror(errno));
                        continue;
                }
                if (S_ISDIR(statb.st_mode))
@@ -266,7 +266,7 @@ static long long int make_date_index_day(char *monthdir,int monthdir_size,int or
                }
                strcpy(monthdir+monthdir_len,direntp->d_name);
                if (MY_LSTAT(monthdir,&statb) == -1) {
-                       debuga(_("Failed to get the file statistics of %s: %s\n"),monthdir,strerror(errno));
+                       debuga(_("Failed to get the statistics of file \"%s\": %s\n"),monthdir,strerror(errno));
                        continue;
                }
                if (S_ISDIR(statb.st_mode))
@@ -426,7 +426,7 @@ static long long int make_date_index_month(char *yeardir,int yeardir_size,int or
                }
                strcpy(yeardir+yeardir_len,direntp->d_name);
                if (MY_LSTAT(yeardir,&statb) == -1) {
-                       debuga(_("Failed to get the file statistics of %s: %s\n"),yeardir,strerror(errno));
+                       debuga(_("Failed to get the statistics of file \"%s\": %s\n"),yeardir,strerror(errno));
                        continue;
                }
                if (S_ISDIR(statb.st_mode))
index 7e174074f4fa1808d8ec5d6e0362f3af2f4daaad..5c6f9d34bc379fe3ff3393279e31993aad650212 100644 (file)
--- a/lastlog.c
+++ b/lastlog.c
@@ -105,7 +105,7 @@ static struct DirEntry *BuildDirDateList(struct DirEntry *List,char *Path,int Pa
                }
                strcpy(Path+Length,direntp->d_name);
                if (stat(Path,&statb) == -1) {
-                       debuga(_("Failed to get the last modification time of %s\n"),Path);
+                       debuga(_("Failed to get the statistics of file \"%s\": %s\n"),Path,strerror(errno));
                        continue;
                }
                if (!S_ISDIR(statb.st_mode)) continue;
@@ -170,7 +170,7 @@ static struct DirEntry *BuildDirList(const char *Path)
                }
                strcpy(warea+name_pos,direntp->d_name);
                if (stat(warea,&statb) == -1) {
-                       debuga(_("Failed to get the last modification time of %s\n"),warea);
+                       debuga(_("Failed to get the statistics of file \"%s\": %s\n"),warea,strerror(errno));
                        continue;
                }
                if (!S_ISDIR(statb.st_mode)) continue;
@@ -240,8 +240,7 @@ static void DeleteEmptyDirs(char *Path,int PathSize,int BasePos)
                        }
                        strcat(Path,"/"INDEX_HTML_FILE);
                        if (unlink(Path)==-1) {
-                               // TRANSLATORS: The %s at the end is the system error message describing the reason for the failure.
-                               debuga(_("Failed to delete index file \"%s\" in the empty report directory: %s\n"),Path,strerror(errno));
+                               debuga(_("Failed to delete \"%s\": %s\n"),Path,strerror(errno));
                                exit(EXIT_FAILURE);
                        }
                        *Dir='\0';
diff --git a/log.c b/log.c
index 05cf18d398cc77a3a0fd31ce0a586c78973bec8e..7eb46da1fa4ae4b5b7ef2bfe81e57208ac4bed02 100644 (file)
--- a/log.c
+++ b/log.c
@@ -765,7 +765,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);
@@ -775,7 +775,7 @@ static void getusers(const char *pwdfile, int debug)
        }
        nreg = nreg+5000;
        if (fseek(fp_usr, 0, SEEK_SET)==-1) {
-               debuga(_("Failed to rewind the users file %s: %s\n"),pwdfile,strerror(errno));
+               debuga(_("Failed to rewind file \"%s\": %s\n"),pwdfile,strerror(errno));
                exit(EXIT_FAILURE);
        }
 
index 0d2cf2abe802bffff818a4507b41314e36e058c7..975d71e01424344baec5024781ea478c387380d5 100644 (file)
@@ -215,7 +215,7 @@ void realtime(void)
        }
        fp = fopen(file_name, "r");
        if (!fp) {
-               debuga(_("Failed to open the last modified log file \"%s\": %s\n"),file_name,strerror(errno));
+               debuga(_("Cannot open file \"%s\": %s\n"),file_name,strerror(errno));
                exit(EXIT_FAILURE);
        }
        while((buf=longline_read(fp,line)) != NULL )
index 12af3d72e66792ba1ff4a0a5512a193f0d013953..03934e3671bd1ee9e1b3d006de61586a89d65f41 100644 (file)
--- a/usertab.c
+++ b/usertab.c
@@ -80,7 +80,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);
@@ -90,7 +90,7 @@ static void init_file_usertab(const char *UserTabFile)
        }
        nreg += 100;
        if (fseek(fp_usr, 0, SEEK_SET)==-1) {
-               debuga(_("Failed to rewind the usertab file %s: %s\n"),UserTabFile,strerror(errno));
+               debuga(_("Failed to rewind file \"%s\": %s\n"),UserTabFile,strerror(errno));
                exit(EXIT_FAILURE);
        }
        if((userfile=(char *) malloc(nreg))==NULL){
diff --git a/util.c b/util.c
index baceb98247e31cd4308e65a3a31b0d0fb9ea6a3d..86a2cd817d4307da086bb94e1ef44f14c1afc98b 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1759,7 +1759,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);
@@ -1768,7 +1768,7 @@ void load_excludecodes(const char *ExcludeCodes)
                exit(EXIT_FAILURE);
        }
        if (fseek(fp_in, 0, SEEK_SET)==-1) {
-               debuga(_("Failed to rewind the excluded codes file %s: %s\n"),ExcludeCodes,strerror(errno));
+               debuga(_("Failed to rewind file \"%s\": %s\n"),ExcludeCodes,strerror(errno));
                exit(EXIT_FAILURE);
        }
 
@@ -1785,7 +1785,7 @@ void load_excludecodes(const char *ExcludeCodes)
                for (i=strlen(data)-1 ; i>=0 && (unsigned char)data[i]<=' ' ; i--) data[i]='\0';
                if (i<0) continue;
                if (Stored+i+2>=MemSize) {
-                       debuga(_("Too many codes to exclude in file %s\n"),ExcludeCodes);
+                       debuga(_("Too many codes to exclude in file \"%s\"\n"),ExcludeCodes);
                        break;
                }
                strcat(excludecode,data);