char csort[255];
char data[20];
int count=0;
- char oday[20];
- char day[20];
- char bytes[20];
+ int oday=0;
+ int day=0;
+ long long int llday;
+ long long int bytes;
char ftime[128];
long long int tot=0;
time_t t;
exit(1);
}
getword_start(&gwarea1,data);
- if (getword(day,sizeof(day),&gwarea1,'/')<0) {
+ if (getword_atoll(&llday,&gwarea1,'/')<0) {
printf("SARG: Maybe you have a broken record or garbage in your %s file.\n",tmp5);
exit(1);
}
if(strcmp(DateFormat,"u") == 0) {
- if (getword(day,sizeof(day),&gwarea1,'/')<0) {
+ if (getword_atoll(&llday,&gwarea1,'/')<0) {
printf("SARG: Maybe you have a broken record or garbage in your %s file.\n",tmp5);
exit(1);
}
}
+ day=(int)llday;
if(!count) {
- strcpy(oday,day);
+ oday=day;
count++;
}
- if (getword(bytes,sizeof(bytes),&gwarea,'\t')<0 || getword(bytes,sizeof(bytes),&gwarea,'\t')<0) {
+ if (getword_skip(20,&gwarea,'\t')<0 || getword_atoll(&bytes,&gwarea,'\t')<0) {
printf("SARG: Maybe you have a broken record or garbage in your %s file.\n",tmp5);
exit(1);
}
- if(strcmp(oday,day) != 0) {
- strcpy(warea,oday);
- x1 = 44 +(atoi(oday) * 20);
+ if(oday!=day) {
+ x1 = 44 +(oday * 20);
bar(x1,tot);
- strcpy(oday,day);
+ oday=day;
tot=0;
}
- tot=tot+my_atoll(bytes);
+ tot+=bytes;
}
if(tot) {
- x1 = 44 +(atoi(day) * 20);
+ x1 = 44 +(day * 20);
bar(x1,tot);
}
if(email[0] == '\0') {
if(strstr(ReportType,"downloads") != 0) download_report();
- if(strlen(DansGuardianConf) > 0) {
+ if(DansGuardianConf[0] != '\0') {
strcpy(wdirname,dirname);
dansguardian_log();
}
if(smartfilter) smartfilter_report();
- if(strlen(DansGuardianConf) > 0) dansguardian_report();
+ if(DansGuardianConf[0] != '\0') dansguardian_report();
squidguard_report();