From: Frédéric Marchal Date: Thu, 18 Mar 2010 14:41:25 +0000 (+0000) Subject: Apply a few more recommandation from splint X-Git-Tag: v2.3-pre2~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2824ec9b3e999552bdb2ba5dbc3f072b9aed50e7;p=thirdparty%2Fsarg.git Apply a few more recommandation from splint --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 775ca6f..d350d2d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,10 +131,10 @@ IF(HAVE_GD_H) CHECK_INCLUDE_FILE(gdfontg.h HAVE_GDFONTG_H) FIND_LIBRARY(GD_LIBRARY NAMES gd bgd DOC "The GD library") IF(GD_LIBRARY) - #CHECK_LIBRARY_EXISTS(gd gdImagePng "." HAVE_GD) + #CHECK_LIBRARY_EXISTS(gd gdImagePng "." HAVE_GD_LIB) TARGET_LINK_LIBRARIES(sarg ${GD_LIBRARY}) - SET(HAVE_GD GD_LIBRARY CACHE PATH DOC "True IF GD was found") - SET(HAVE_GD CACHE BOOL DOC "True IF must use GD") + SET(HAVE_GD_LIB GD_LIBRARY CACHE PATH DOC "True IF GD was found") + SET(HAVE_GD_LIB CACHE BOOL DOC "True IF must use GD") ENDIF(GD_LIBRARY) ENDIF(HAVE_GD_H) diff --git a/configure.in b/configure.in index 6a0c239..6cc0625 100644 --- a/configure.in +++ b/configure.in @@ -77,7 +77,7 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string.h strings.h sys/time.h time.h unistd.h errno.h sys/resource.h sys/wait.h stdarg.h inttypes.h limits.h locale.h \ execinfo.h ldap.h math.h libintl.h libgen.h stdbool.h) -AC_CHECK_LIB(gd, gdImagePng,LIBS="-lgd ${LIBS}"; HAVE_GD="yes", HAVE_GD="") +AC_CHECK_LIB(gd, gdImagePng,LIBS="-lgd ${LIBS}"; HAVE_GD_LIB="yes", HAVE_GD_LIB="") AC_CHECK_LIB(ldap, ldap_init,LIBS="-lldap ${LIBS}"; HAVE_LDAP="yes", HAVE_LDAP="") dnl Checks for typedefs, structures, and compiler characteristics. diff --git a/documentation/exclude.txt b/documentation/exclude.txt index 8374da3..2645c38 100644 --- a/documentation/exclude.txt +++ b/documentation/exclude.txt @@ -85,7 +85,7 @@ Tell if the user is excluded from the report. -/*! \fn int is_indexonly(void) +/*! \fn bool is_indexonly(void) Tell if the exclusion list of the users mention the word "indexonly" meaning that the user only want to produce the index.html. diff --git a/download.c b/download.c index 2e379df..9660d25 100644 --- a/download.c +++ b/download.c @@ -27,8 +27,8 @@ #include "include/conf.h" #include "include/defs.h" -static char *DownloadSuffix=NULL; -static char **DownloadSuffixIndex=NULL; +/*@null@*/static char *DownloadSuffix=NULL; +/*@null@*/static char **DownloadSuffixIndex=NULL; static int NDownloadSuffix=0; void download_report(void) @@ -52,7 +52,7 @@ void download_report(void) int z=0; int count=0; int i; - int new_user; + bool new_user; struct getwordstruct gwarea; longline line; struct userinfostruct *uinfo; @@ -60,16 +60,14 @@ void download_report(void) ouser[0]='\0'; ouser2[0]='\0'; - sprintf(report_in,"%s/sarg/download.log",TempDir); + snprintf(report_in,sizeof(report_in),"%s/sarg/download.log",TempDir); if(access(report_in, R_OK) != 0) return; - strcpy(wdirname,outdirname); - sprintf(report,"%s/download.html",wdirname); - strcat(wdirname,"/"); - strcat(wdirname,"sarg-period"); + snprintf(report,sizeof(report),"%s/download.html",outdirname); + snprintf(wdirname,sizeof(wdirname),"%s/sarg-period",outdirname); - if ((fp_in = fopen(wdirname, "r")) == 0) { + if ((fp_in = fopen(wdirname, "r")) == NULL) { debuga(_("(download) Cannot open file %s\n"),wdirname); exit(EXIT_FAILURE); } @@ -121,20 +119,20 @@ void download_report(void) debuga(_("Unknown user ID %s in file %s\n"),user,report_in); exit(EXIT_FAILURE); } - new_user=0; + new_user=false; if(!z) { strcpy(ouser,user); strcpy(oip,ip); z++; - new_user=1; + new_user=true; } else { if(strcmp(ouser,user) != 0) { strcpy(ouser,user); - new_user=1; + new_user=true; } if(strcmp(oip,ip) != 0) { strcpy(oip,ip); - new_user=1; + new_user=true; } } @@ -245,7 +243,7 @@ void set_download_suffix(const char *list) } } -int is_download_suffix(const char *url) +bool is_download_suffix(const char *url) { int urllen; int i; @@ -254,17 +252,17 @@ int is_download_suffix(const char *url) int cmp; const int max_suffix=10; - if (DownloadSuffix == NULL || NDownloadSuffix == 0) return(0); + if (DownloadSuffix == NULL || NDownloadSuffix == 0) return(false); urllen=strlen(url)-1; - if (urllen<=0) return(0); - if (url[urllen] == '.') return(0); //reject a single trailing dot + if (urllen<=0) return(false); + if (url[urllen] == '.') return(false); //reject a single trailing dot for (i=0 ; i=urllen) return(0); // url is a hostname without any path or file to download + if (i>=urllen) return(false); // url is a hostname without any path or file to download for (i=0 ; i<=max_suffix && imax_suffix || i>=urllen) return(0); + if (url[urllen-i] == '/' || url[urllen-i] == '?') return(false); + if (i>max_suffix || i>=urllen) return(false); suffix=url+urllen-i+1; down=0; @@ -272,12 +270,12 @@ int is_download_suffix(const char *url) while (down<=up) { center=(down+up)/2; cmp=strcasecmp(suffix,DownloadSuffixIndex[center]); - if (cmp == 0) return(1); + if (cmp == 0) return(true); if (cmp < 0) up = center-1; else down = center+1; } - return(0); + return(false); } diff --git a/email.c b/email.c index c9c37d8..b9d42c5 100644 --- a/email.c +++ b/email.c @@ -27,7 +27,7 @@ #include "include/conf.h" #include "include/defs.h" -int geramail(const char *dirname, int debug, const char *outdir, int userip, const char *email, const char *TempDir) +int geramail(const char *dirname, int debug, const char *outdir, const char *email, const char *TempDir) { FILE *fp_in, *fp_top1, *fp_top2, *fp_top3; diff --git a/exclude.c b/exclude.c index 2b3602e..b50fbbf 100644 --- a/exclude.c +++ b/exclude.c @@ -375,9 +375,9 @@ int vuexclude(const char *user) return(1); } -int is_indexonly(void) +bool is_indexonly(void) { - if (excludeuser==NULL) return(0); + if (excludeuser==NULL) return(false); return(strstr(excludeuser,"indexonly") != NULL); } diff --git a/getconf.c b/getconf.c index 0678366..a2f9e08 100644 --- a/getconf.c +++ b/getconf.c @@ -597,7 +597,7 @@ static void parmtest(char *buf) if (getparam_string("graph_font",buf,GraphFont,sizeof(GraphFont))>0) return; if(strstr(buf,"squid24") != 0) { - squid24++; + squid24=true; return; } diff --git a/include/conf.h b/include/conf.h index 683ee88..b1fca21 100755 --- a/include/conf.h +++ b/include/conf.h @@ -63,6 +63,7 @@ #include #endif #ifdef HAVE_GD_H +#define HAVE_GD 1 #include gdImagePtr im; gdPoint points[4]; @@ -340,8 +341,6 @@ unsigned long int NtlmUserFormat; unsigned long int IndexTree; bool UserAuthentication; char AuthUserTemplateFile[1024]; -char *str; -char *str2; char val1[MAXLEN]; char val2[MAXLEN]; char val3[MAXLEN]; @@ -368,7 +367,6 @@ char Ulimit[6]; char RealtimeTypes[1024]; char cmd[255]; char ImageFile[255]; -char tbuf[128]; char RealtimeUnauthRec[15]; char LDAPHost[255]; char LDAPBindDN[512]; @@ -400,8 +398,8 @@ int dfrom; int duntil; int dataonly; int indexonly; -int iprel; -int userip; +bool iprel; +bool userip; int langcode; int debug; int debugz; @@ -415,15 +413,13 @@ int SquidGuardReportLimit; int UserReportLimit; int realtime_refresh; int realtime_access_log_lines; -int realt; int rc; int ntopsites; int nsitesusers; int nrepday; int ndownload; int ntopuser; -int squid24; -float perc; +bool squid24; long long int nocost; float cost; diff --git a/include/config.h.in b/include/config.h.in index d8b132d..7c7264b 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -24,7 +24,6 @@ #cmakedefine HAVE_NETINET_H #cmakedefine HAVE_SYS_STAT_H #cmakedefine HAVE_CTYPE_H -#cmakedefine HAVE_GD #cmakedefine HAVE_GD_H #cmakedefine HAVE_GDFONTL_H #cmakedefine HAVE_GDFONTT_H diff --git a/include/defs.h b/include/defs.h index b0246d2..d9ec4a4 100755 --- a/include/defs.h +++ b/include/defs.h @@ -84,17 +84,17 @@ void gen_denied_report(void); void download_report(void); void free_download(void); void set_download_suffix(const char *list); -int is_download_suffix(const char *url); +bool is_download_suffix(const char *url); // email.c -int geramail(const char *dirname, int debug, const char *outdir, int userip, const char *email, const char *TempDir); +int geramail(const char *dirname, int debug, const char *outdir, const char *email, const char *TempDir); // exclude.c void gethexclude(const char *hexfile, int debug); void getuexclude(const char *uexfile, int debug); int vhexclude(const char *url); int vuexclude(const char *user); -int is_indexonly(void); +bool is_indexonly(void); void free_exclude(void); // getconf.c diff --git a/log.c b/log.c index d439a1d..c7c4810 100644 --- a/log.c +++ b/log.c @@ -37,7 +37,7 @@ struct userfilestruct FILE *file; }; -static char *userfile=NULL; +/*@null@*/static char *userfile=NULL; numlist weekdays = { { 0, 1, 2, 3, 4, 5, 6 }, 7 }; numlist hours = { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, @@ -121,15 +121,14 @@ int main(int argc,char *argv[]) int x; int errflg=0; int puser=0; - int fhost=0; - int dns=0; - int fuser=0; + bool fhost=false; + bool dns=false; + bool fuser=false; int idata=0; int mindate=0; int iarq=0; - int exstring=0; int isa_ncols=0,isa_cols[ISACOL_Last]; - int from_stdin; + bool from_stdin; int blen; int maxopenfiles; int nopen; @@ -139,12 +138,13 @@ int main(int argc,char *argv[]) long totregsx=0; long totper=0; long int max_elapsed=0; + bool realt; time_t tt; struct tm *t; unsigned long recs1=0UL; unsigned long recs2=0UL; int OutputNonZero = REPORT_EVERY_X_LINES ; - int download_flag=0; + bool download_flag=false; char *download_url=NULL; struct getwordstruct gwarea; longline line; @@ -197,8 +197,8 @@ int main(int argc,char *argv[]) strcpy(OutputDir,"/var/www/html/squid-reports"); Ip2Name=0; strcpy(DateFormat,"u"); - OverwriteReport=0; - RemoveTempFiles=1; + OverwriteReport=false; + RemoveTempFiles=true; strcpy(ReplaceIndex,"index.html"); Index=INDEX_YES; RecordsWithoutUser=RECORDWITHOUTUSER_IP; @@ -220,7 +220,7 @@ int main(int argc,char *argv[]) Privacy=0; strcpy(PrivacyString,"***.***.***.***"); strcpy(PrivacyStringColor,"blue"); - SuccessfulMsg=1; + SuccessfulMsg=true; TopUserFields=TOPUSERFIELDS_NUM | TOPUSERFIELDS_DATE_TIME | TOPUSERFIELDS_USERID | TOPUSERFIELDS_CONNECT | TOPUSERFIELDS_BYTES | TOPUSERFIELDS_SETYB | TOPUSERFIELDS_IN_CACHE_OUT | TOPUSERFIELDS_USED_TIME | TOPUSERFIELDS_MILISEC | TOPUSERFIELDS_PTIME | @@ -231,10 +231,10 @@ int main(int argc,char *argv[]) strcpy(DataFileDelimiter,";"); DataFileFields=DATA_FIELD_USER | DATA_FIELD_DATE | DATA_FIELD_TIME | DATA_FIELD_URL | DATA_FIELD_CONNECT | DATA_FIELD_BYTES | DATA_FIELD_IN_CACHE | DATA_FIELD_OUT_CACHE | DATA_FIELD_ELAPSED; - ShowReadStatistics=1; + ShowReadStatistics=true; strcpy(IndexSortOrder,"D"); - ShowSargInfo=1; - ShowSargLogo=1; + ShowSargInfo=true; + ShowSargLogo=true; strcpy(ParsedOutputLog,"no"); strcpy(ParsedOutputLogCompress,"/bin/gzip -f"); strcpy(DisplayedValues,"abbreviation"); @@ -242,7 +242,7 @@ int main(int argc,char *argv[]) strcpy(TitleFontSize,"11px"); strcpy(AuthUserTemplateFile,"sarg_htaccess"); set_download_suffix("7z,ace,arj,avi,bat,bin,bz2,bzip,cab,com,cpio,dll,doc,dot,exe,gz,iso,lha,lzh,mdb,mov,mp3,mpeg,mpg,mso,nrg,ogg,ppt,rar,rtf,shs,src,sys,tar,tgz,vcd,vob,wma,wmv,zip"); - Graphs=1; + Graphs=true; #if defined(FONTDIR) strcpy(GraphFont,FONTDIR"/DejaVuSans.ttf"); #else @@ -312,18 +312,18 @@ int main(int argc,char *argv[]) debug=0; debugz=0; debugm=0; - iprel=0; - userip=0; + iprel=false; + userip=false; color1=0; color2=0; color3=0; - realt=0; + realt=false; realtime_refresh=3; realtime_access_log_lines=1000; cost=0.01; nocost=50000000; ndownload=0; - squid24=0; + squid24=false; bzero(IncludeUsers, sizeof(IncludeUsers)); bzero(ExcludeString, sizeof(ExcludeString)); @@ -352,7 +352,7 @@ int main(int argc,char *argv[]) strncpy(date,optarg,sizeof(date)-1); date[sizeof(date)-1]='\0'; getword_start(&gwarea,optarg); - if (getword(cdfrom,sizeof(cdfrom),&gwarea,'-')<0 || getword(cduntil,sizeof(cduntil),&gwarea,0)<0) { + if (getword(cdfrom,sizeof(cdfrom),&gwarea,'-')<0 || getword(cduntil,sizeof(cduntil),&gwarea,'\0')<0) { printf(_("SARG: The date range requested on the command line by option -d is invalid.\n")); exit(EXIT_FAILURE); } @@ -371,10 +371,9 @@ int main(int argc,char *argv[]) break; case 'h': usage(argv[0]); - exit(0); - break; + exit(EXIT_SUCCESS); case 'i': - iprel++; + iprel=true; break; case 'l': if (NAccessLog>=MAXLOGS) { @@ -392,16 +391,16 @@ int main(int argc,char *argv[]) debugm++; break; case 'n': - dns++; + dns=true; break; case 'o': strcpy(outdir,optarg); break; case 'p': - userip++; + userip=true; break; case 'r': - realt++; + realt=true; break; case 's': strcpy(site,optarg); @@ -415,7 +414,7 @@ int main(int argc,char *argv[]) strcpy(hmf,optarg); } else { getword_start(&gwarea,optarg); - if (getword(hm,sizeof(hm),&gwarea,'-')<0 || getword(hmf,sizeof(hmf),&gwarea,0)<0) { + if (getword(hm,sizeof(hm),&gwarea,'-')<0 || getword(hmf,sizeof(hmf),&gwarea,'\0')<0) { debuga(_("The time range passed on the command line with option -t is invalid\n")); exit(EXIT_FAILURE); } @@ -457,19 +456,18 @@ int main(int argc,char *argv[]) case '?': usage(argv[0]); exit(EXIT_FAILURE); - break; } } - if (errflg) { + if (errflg>0) { usage(argv[0]); exit(2); } if(debug) debuga(_("Init\n")); - if(ConfigFile[0] == '\0') sprintf(ConfigFile,"%s/sarg.conf",SYSCONFDIR); + 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)); exit(EXIT_FAILURE); @@ -478,13 +476,13 @@ int main(int argc,char *argv[]) if(access(ConfigFile, R_OK) == 0) getconf(); - if(UserIp) userip++; + if(UserIp) userip=true; - if(dns) Ip2Name=1; + if(dns) Ip2Name=true; if(realt) { realtime(); - exit(0); + exit(EXIT_SUCCESS); } if(IndexTree == INDEX_TREE_FILE) @@ -496,19 +494,19 @@ int main(int argc,char *argv[]) if(DataFile[0] != '\0') dataonly++; - if(!NAccessLog) { + if(NAccessLog == 0) { strcpy(AccessLog[0],"/var/log/squid/access.log"); NAccessLog++; } if(strcmp(hexclude,"onvert") == 0 && strcmp(site,"plit") != 0) { convlog(AccessLog[0], df, dfrom, duntil); - exit(0); + exit(EXIT_SUCCESS); } if(strcmp(site,"plit") == 0) { splitlog(AccessLog[0], df, dfrom, duntil, hexclude); - exit(0); + exit(EXIT_SUCCESS); } load_excludecodes(ExcludeCodes); @@ -522,7 +520,7 @@ int main(int argc,char *argv[]) strcpy(hexclude,ExcludeHosts); if(hexclude[0] != '\0') { gethexclude(hexclude,debug); - fhost++; + fhost=true; } if(ReportType == 0) { @@ -533,7 +531,7 @@ int main(int argc,char *argv[]) if(access(ExcludeUsers, R_OK) == 0) { getuexclude(ExcludeUsers,debug); - fuser++; + fuser=true; } indexonly=0; @@ -567,7 +565,7 @@ int main(int argc,char *argv[]) strcpy(tmp2,tmp); if(email[0] != '\0') { - sprintf(wtemp2,"%s/sarg",tmp2); + snprintf(wtemp2,sizeof(wtemp2),"%s/sarg",tmp2); my_mkdir(wtemp2); strcat(tmp2,"/sarg"); strcpy(outdir,tmp2); @@ -691,7 +689,7 @@ int main(int argc,char *argv[]) exit(EXIT_FAILURE); } - sprintf ( sz_Download_Unsort , "%s/sarg/download.unsort", tmp); + snprintf(sz_Download_Unsort,sizeof(sz_Download_Unsort),"%s/sarg/download.unsort", tmp); if(DataFile[0]=='\0') { if((ReportType & REPORT_TYPE_DENIED) != 0) { @@ -718,7 +716,7 @@ int main(int argc,char *argv[]) if(debug) debuga(_("Reading access log file: from stdin\n")); fp_in=stdin; - from_stdin=1; + from_stdin=true; } else { decomp(arq,zip,tmp); if(debug) @@ -727,14 +725,14 @@ int main(int argc,char *argv[]) debuga(_("(log) Cannot open log file: %s - %s\n"),arq,strerror(errno)); exit(EXIT_FAILURE); } - from_stdin=0; + from_stdin=false; } ilf=ILF_Unknown; - download_flag=0; + download_flag=false; // pre-read the file only if we have to show stats if(ShowReadStatistics && !from_stdin) { size_t nread,i; - int skipcr=0; + bool skipcr=false; char tmp4[MAXLEN]; recs1=0UL; @@ -744,11 +742,11 @@ int main(int argc,char *argv[]) for (i=0 ; i\n" "Language-Team: LANGUAGE \n" diff --git a/po/ca.po b/po/ca.po index be0dc6b..1d78e56 100644 --- a/po/ca.po +++ b/po/ca.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/cs.po b/po/cs.po index dd5ec30..5f130e7 100644 --- a/po/cs.po +++ b/po/cs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/de.po b/po/de.po index 445231d..7902800 100644 --- a/po/de.po +++ b/po/de.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/el.po b/po/el.po index fbce2b1..60db0b7 100644 --- a/po/el.po +++ b/po/el.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/es.po b/po/es.po index fd5b5d8..569f553 100644 --- a/po/es.po +++ b/po/es.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/fr.po b/po/fr.po index 190c893..e59c83a 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: fr\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: 2010-03-17 20:22+0100\n" "Last-Translator: Frédéric Marchal \n" "Language-Team: French \n" @@ -531,7 +531,8 @@ msgstr "Valeur «%s» inconnue pour le paramètre «%s»\n" #: getconf.c:301 #, c-format -msgid "Value \"%s\" conflicts with other selected values for parameter \"%s\"\n" +msgid "" +"Value \"%s\" conflicts with other selected values for parameter \"%s\"\n" msgstr "" "La valeur «%s» entre en conflit avec les autres valeurs sélectionnées pour le " "paramètre «%s»\n" @@ -543,7 +544,8 @@ msgstr "SARG: OPTION: %s\n" #: getconf.c:368 #, c-format -msgid "Maybe you have a broken record or garbage in \"date_format\" parameter\n" +msgid "" +"Maybe you have a broken record or garbage in \"date_format\" parameter\n" msgstr "" "Vous avez probablement un enregistrement erroné ou inattendu dans le " "paramètre «date_format»\n" @@ -1422,7 +1424,8 @@ msgstr "erreur d'allocation mémoire (%ld)\n" #: log.c:1691 #, c-format msgid "You have an invalid user in your %s file\n" -msgstr "Vous avez probablement un utilisateur incorrect dans votre fichier %s\n" +msgstr "" +"Vous avez probablement un utilisateur incorrect dans votre fichier %s\n" #: longline.c:109 longline.c:122 #, c-format @@ -1983,7 +1986,8 @@ msgstr " -d Date de-à jj/mm/aaaa-jj/mm/aaaa" #: usage.c:37 msgid " -e Email address to send reports (stdout for console)" -msgstr " -e Adresse e-mail où envoyer les rapports (stdout pour la console)" +msgstr "" +" -e Adresse e-mail où envoyer les rapports (stdout pour la console)" #: usage.c:38 #, c-format @@ -2176,7 +2180,8 @@ msgstr "Tampon inacceptable passé à getword_ptr\n" #: util.c:294 #, c-format msgid "Invalid path (%s). Please, use absolute paths only.\n" -msgstr "Chemin erroné (%s). Veuillez utiliser des chemins absolus uniquement.\n" +msgstr "" +"Chemin erroné (%s). Veuillez utiliser des chemins absolus uniquement.\n" #: util.c:295 util.c:310 util.c:322 #, c-format diff --git a/po/hu.po b/po/hu.po index c62a360..e359c47 100644 --- a/po/hu.po +++ b/po/hu.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/id.po b/po/id.po index 4e48e42..a8b3466 100644 --- a/po/id.po +++ b/po/id.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/it.po b/po/it.po index 37e8b5d..8faca70 100644 --- a/po/it.po +++ b/po/it.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/ja.po b/po/ja.po index 28199c3..852b503 100644 --- a/po/ja.po +++ b/po/ja.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/lv.po b/po/lv.po index 2788db9..73b41b8 100644 --- a/po/lv.po +++ b/po/lv.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/nl.po b/po/nl.po index 136fad8..24ac3a4 100644 --- a/po/nl.po +++ b/po/nl.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/pl.po b/po/pl.po index 330ebc2..8e2d601 100644 --- a/po/pl.po +++ b/po/pl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/pt.po b/po/pt.po index 521ae66..7771dbb 100644 --- a/po/pt.po +++ b/po/pt.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/ro.po b/po/ro.po index 60e69bb..3972151 100644 --- a/po/ro.po +++ b/po/ro.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/ru.po b/po/ru.po index 5e101e9..3f8ffc9 100644 --- a/po/ru.po +++ b/po/ru.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/sk.po b/po/sk.po index 78332c6..c85acbc 100644 --- a/po/sk.po +++ b/po/sk.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/sr.po b/po/sr.po index dea1818..cf5a46f 100644 --- a/po/sr.po +++ b/po/sr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/tr.po b/po/tr.po index d61764f..0be162a 100644 --- a/po/tr.po +++ b/po/tr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/uk.po b/po/uk.po index 8fabf58..087a04d 100644 --- a/po/uk.po +++ b/po/uk.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: sarg 2.3\n" "Report-Msgid-Bugs-To: fmarchal@users.sourceforge.net\n" -"POT-Creation-Date: 2010-03-17 20:20+0100\n" +"POT-Creation-Date: 2010-03-18 08:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/report.c b/report.c index c76cb84..903b42f 100644 --- a/report.c +++ b/report.c @@ -388,7 +388,7 @@ void gerarel(void) if(SuccessfulMsg) debuga(_("Successful report generated on %s\n"),outdirname); } else { - geramail(outdirname, debug, outdir, userip, email, TempDir); + geramail(outdirname, debug, outdir, email, TempDir); if((strcmp(email,"stdout") != 0) && SuccessfulMsg) debuga(_("Successful report generated and sent to %s\n"),email); diff --git a/splintrc b/splintrc index 151099f..9b19d38 100644 --- a/splintrc +++ b/splintrc @@ -1,6 +1,11 @@ +posixlib -retvalint +-retvalother +matchanyintegral +-formatconst +-initallelements +-nestedextern ++ignoresigns -I . @@ -25,7 +30,6 @@ -DHAVE_NETINET_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_CTYPE_H=1 --DHAVE_GD=1 -DHAVE_GD_H=1 -DHAVE_GDFONTL_H=1 -DHAVE_GDFONTT_H=1 diff --git a/util.c b/util.c index c3ebc64..42c7f96 100644 --- a/util.c +++ b/util.c @@ -1598,7 +1598,7 @@ void url_to_file(const char *url,char *file,int filesize) void version(void) { printf(_("SARG Version: %s\n"),VERSION); - exit(0); + exit(EXIT_SUCCESS); } char *get_param_value(const char *param,char *line)