sprintf(csort,"sort -k 1,1 -k 2,2 -o \"%s\" \"%s\"",sortout,wdirname);
cstatus=system(csort);
if (!WIFEXITED(cstatus) || WEXITSTATUS(cstatus)) {
- debuga(_("sort command return status %d"),WEXITSTATUS(cstatus));
- debuga(_("sort command: %s"),csort);
+ debuga(_("sort command return status %d\n"),WEXITSTATUS(cstatus));
+ debuga(_("sort command: %s\n"),csort);
exit(1);
}
if((fp_in=fopen(sortout,"r"))==NULL) {
- fprintf(stderr, "SARG: (totday) %s: %s\n",_("Cannot open log file"),sortout);
- debuga(_("sort command: %s"),csort);
+ debuga(_("SARG: (totday) Cannot open log file: %s\n"),sortout);
+ debuga(_("sort command: %s\n"),csort);
exit(1);
}
unlink(wdirname);
if((fp_ou=fopen(arqout,"w"))==NULL) {
- fprintf(stderr, "SARG: (totday) %s: %s\n",_("Cannot open log file"),arqout);
+ debuga(_("(totday) Cannot open log file: %s\n"),arqout);
exit(1);
}
if (getword(data,sizeof(data),&gwarea,'\t')<0 || getword(hora,sizeof(hora),&gwarea,':')<0 ||
getword(min,sizeof(min),&gwarea,':')<0 || getword_skip(20,&gwarea,'\t')<0 ||
getword(elap,sizeof(elap),&gwarea,0)<0) {
- debuga(_("There is a broken record or garbage in file %s"),sortout);
+ debuga(_("There is a broken record or garbage in file %s\n"),sortout);
exit(1);
}