home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / sarg1221.zip / sarg-1.2.2.1-os2-diff < prev    next >
Text File  |  2002-10-14  |  45KB  |  1,383 lines

  1. diff -cbr sarg-1.2.2.1-org/authfail.c sarg-1.2.2.1/authfail.c
  2. *** sarg-1.2.2.1-org/authfail.c    Thu Jun 13 17:52:44 2002
  3. --- sarg-1.2.2.1/authfail.c    Fri Oct 11 14:14:18 2002
  4. ***************
  5. *** 42,48 ****
  6.      sprintf(per,"%s/periodo",dirname);
  7.      sprintf(report,"%s/authfail.html",dirname);
  8.   
  9. !    sprintf(csort,"sort -b -T %s -k 3,3 -k 5,5 -o %s %s", TempDir, authfail_in, tmp4);
  10.      system(csort);
  11.      unlink(tmp4);
  12.   
  13. --- 42,48 ----
  14.      sprintf(per,"%s/periodo",dirname);
  15.      sprintf(report,"%s/authfail.html",dirname);
  16.   
  17. !    sprintf(csort, SORT" -b -T %s -k 3,3 -k 5,5 -o %s %s", TempDir, authfail_in, tmp4);
  18.      system(csort);
  19.      unlink(tmp4);
  20.   
  21. ***************
  22. *** 70,83 ****
  23.      fputs(html,fp_ou);
  24.      fputs("</head>\n",fp_ou);
  25.   
  26. !    if(strlen(FontFace) > 0) {
  27. !       sprintf(url,"<font face=%s>\n",FontFace);
  28.         fputs(url,fp_ou);
  29. -    }
  30. -    sprintf(url,"<body bgcolor=%s text=%s background='%s'>\n",BgColor,TxColor,BgImage);
  31. -    fputs(url,fp_ou);
  32.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  33.   
  34.      if(strlen(LogoImage) > 0) {
  35. --- 70,78 ----
  36.      fputs(html,fp_ou);
  37.      fputs("</head>\n",fp_ou);
  38.   
  39. !    // DAS: Using style=font-family more corresponds to standards. 
  40. !    sprintf(url,"<body bgcolor=%s text=%s background='%s' style='font-family:%s;'>\n",BgColor,TxColor,BgImage,FontFace);
  41.      fputs(url,fp_ou);
  42.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  43.   
  44.      if(strlen(LogoImage) > 0) {
  45. ***************
  46. *** 156,165 ****
  47.            } else strcpy(name,user);
  48.         } else strcpy(name,user);
  49.   
  50. !       sprintf(html2,"<tr><td bgcolor=%s><font size=%s>%s</font></td>
  51. !             <td bgcolor=%s><font size=%s>%s</font></td>
  52. !             <td bgcolor=%s><font size=%s>%s-%s</font></td>
  53. !             <td bgcolor=%s><font size=%s><a href=\"%s\">%s</a></font></td></th>\n",
  54.               TxBgColor,FontSize,name,
  55.               TxBgColor,FontSize,ip,
  56.               TxBgColor,FontSize,data,hora,
  57. --- 151,161 ----
  58.            } else strcpy(name,user);
  59.         } else strcpy(name,user);
  60.   
  61. !       // DAS: The string must be terminated before end of line
  62. !       sprintf(html2,"<tr><td bgcolor=%s><font size=%s>%s</font></td>"
  63. !             "<td bgcolor=%s><font size=%s>%s</font></td>"
  64. !             "<td bgcolor=%s><font size=%s>%s-%s</font></td>"
  65. !             "<td bgcolor=%s><font size=%s><a href=\"%s\">%s</a></font></td></th>\n",
  66.               TxBgColor,FontSize,name,
  67.               TxBgColor,FontSize,ip,
  68.               TxBgColor,FontSize,data,hora,
  69. diff -cbr sarg-1.2.2.1-org/charset.c sarg-1.2.2.1/charset.c
  70. *** sarg-1.2.2.1-org/charset.c    Thu Jun 13 17:52:44 2002
  71. --- sarg-1.2.2.1/charset.c    Tue Oct  8 20:21:04 2002
  72. ***************
  73. *** 41,46 ****
  74. --- 41,49 ----
  75.      if(strcmp(CharSet,"Koi8-r") == 0)
  76.         strcpy(CharSet,"KOI8-R");
  77.   
  78. +    if(strcmp(CharSet,"Cyrillic-866") == 0)
  79. +       strcpy(CharSet,"CP866");
  80.      return;
  81.   
  82.   }
  83. diff -cbr sarg-1.2.2.1-org/denied.c sarg-1.2.2.1/denied.c
  84. *** sarg-1.2.2.1-org/denied.c    Thu Jun 13 17:52:44 2002
  85. --- sarg-1.2.2.1/denied.c    Fri Oct 11 14:16:00 2002
  86. ***************
  87. *** 63,76 ****
  88.      fputs(html,fp_ou);
  89.      fputs("</head>\n",fp_ou);
  90.   
  91. !    if(strlen(FontFace) > 0) {
  92. !       sprintf(url,"<font face=%s>\n",FontFace);
  93.         fputs(url,fp_ou);
  94. -    }
  95. -    sprintf(url,"<body bgcolor=%s text=%s background='%s'>\n",BgColor,TxColor,BgImage);
  96. -    fputs(url,fp_ou);
  97.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  98.   
  99.      if(strlen(LogoImage) > 0) {
  100. --- 63,71 ----
  101.      fputs(html,fp_ou);
  102.      fputs("</head>\n",fp_ou);
  103.   
  104. !    // DAS: Using style=font-family more corresponds to standards. 
  105. !    sprintf(url,"<body bgcolor=%s text=%s background='%s' style='font-family:%s;'>\n",BgColor,TxColor,BgImage,FontFace);
  106.      fputs(url,fp_ou);
  107.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  108.   
  109.      if(strlen(LogoImage) > 0) {
  110. ***************
  111. *** 149,158 ****
  112.            } else strcpy(name,user);
  113.         } else strcpy(name,user);
  114.   
  115. !       sprintf(html2,"<tr><td bgcolor=%s><font size=%s>%s</font></td>
  116. !             <td bgcolor=%s><font size=%s>%s</font></td>
  117. !             <td bgcolor=%s><font size=%s>%s-%s</font></td>
  118. !             <td bgcolor=%s><font size=%s><a href=\"%s\">%s</a></font></td></th>\n",
  119.               TxBgColor,FontSize,name,
  120.               TxBgColor,FontSize,ip,
  121.               TxBgColor,FontSize,data,hora,
  122. --- 144,154 ----
  123.            } else strcpy(name,user);
  124.         } else strcpy(name,user);
  125.   
  126. !       // DAS: The string must be terminated before end of line
  127. !       sprintf(html2,"<tr><td bgcolor=%s><font size=%s>%s</font></td>"
  128. !             "<td bgcolor=%s><font size=%s>%s</font></td>"
  129. !             "<td bgcolor=%s><font size=%s>%s-%s</font></td>"
  130. !             "<td bgcolor=%s><font size=%s><a href=\"%s\">%s</a></font></td></tr>\n",
  131.               TxBgColor,FontSize,name,
  132.               TxBgColor,FontSize,ip,
  133.               TxBgColor,FontSize,data,hora,
  134. diff -cbr sarg-1.2.2.1-org/email.c sarg-1.2.2.1/email.c
  135. *** sarg-1.2.2.1-org/email.c    Thu Jun 13 17:52:44 2002
  136. --- sarg-1.2.2.1/email.c    Tue Oct  8 16:14:56 2002
  137. ***************
  138. *** 130,136 ****
  139.      fclose(fp_in);
  140.      fclose(fp_top2);
  141.   
  142. !    sprintf(csort,"sort -n -T %s -r -k 2,2 -o %s %s", TempDir, top1, top2);
  143.      system(csort);
  144.   
  145.      unlink(top2);
  146. --- 130,136 ----
  147.      fclose(fp_in);
  148.      fclose(fp_top2);
  149.   
  150. !    sprintf(csort, SORT" -n -T %s -r -k 2,2 -o %s %s", TempDir, top1, top2);
  151.      system(csort);
  152.   
  153.      unlink(top2);
  154. ***************
  155. *** 297,303 ****
  156.         system(buf);
  157.      }
  158.    
  159. !    sprintf(csort,"rm -r %s/sarg_tmp",TempDir);
  160.      system(csort);
  161.   
  162.      return (0);
  163. --- 297,303 ----
  164.         system(buf);
  165.      }
  166.    
  167. !    sprintf(csort, RM" -r %s/sarg_tmp",TempDir);
  168.      system(csort);
  169.   
  170.      return (0);
  171. diff -cbr sarg-1.2.2.1-org/exclude.c sarg-1.2.2.1/exclude.c
  172. *** sarg-1.2.2.1-org/exclude.c    Thu Jun 13 17:52:44 2002
  173. --- sarg-1.2.2.1/exclude.c    Fri Oct 11 14:18:06 2002
  174. ***************
  175. *** 11,26 ****
  176.      char whost[1024];
  177.      char wip1[1024], wip2[1024];
  178.      char sn1[4], sn2[4], sn3[4];
  179. !    char str[strlen(excludefile)];
  180.   
  181.      whost[0]='\0';
  182. -    strcpy(str,excludefile);
  183.      getword(whost,str,' ');
  184.      
  185.      while(strcmp(whost,"*FIM*") != 0) {
  186.   
  187.         if(strstr(ip,whost) !=0)
  188.            return(0);
  189.   
  190.         strcpy(wip1,ip);
  191.         getword(sn1,wip1,'.');
  192. --- 11,29 ----
  193.      char  whost[1024];
  194.      char  wip1[1024], wip2[1024];
  195.      char  sn1[4], sn2[4], sn3[4];
  196. !    // DAS: Usage of "str[strlen(excludefile)]" is not corresponds to C standard
  197. !    char *str = strdup(excludefile);
  198.   
  199.      whost[0]='\0';
  200.      getword(whost,str,' ');
  201.      
  202.      while(strcmp(whost,"*FIM*") != 0) {
  203.   
  204.         if(strstr(ip,whost) !=0)
  205. +       {
  206. +          free(str);
  207.            return(0);
  208. +       }
  209.   
  210.         strcpy(wip1,ip);
  211.         getword(sn1,wip1,'.');
  212. ***************
  213. *** 30,44 ****
  214.         sprintf(wip1,"%s.%s.%s.0",sn1,sn2,sn3);
  215.         sprintf(wip2,"%s.%s.0.0",sn1,sn2);
  216.   
  217. !       if(strstr(whost,wip1) !=0)
  218. !          return(0);
  219. !       if(strstr(whost,wip2) !=0)
  220.            return(0);
  221.   
  222.         getword(whost,str,' ');
  223.      }
  224.   
  225.      return(1);
  226.   }
  227.   
  228. --- 33,48 ----
  229.         sprintf(wip1,"%s.%s.%s.0",sn1,sn2,sn3);
  230.         sprintf(wip2,"%s.%s.0.0",sn1,sn2);
  231.   
  232. !       if(strstr(whost,wip1) !=0 || strstr(whost,wip2) !=0 )
  233. !       {
  234. !          free(str);
  235.            return(0);
  236. +       }
  237.   
  238.         getword(whost,str,' ');
  239.      }
  240.   
  241. +    free(str);
  242.      return(1);
  243.   }
  244.   
  245. diff -cbr sarg-1.2.2.1-org/html.c sarg-1.2.2.1/html.c
  246. *** sarg-1.2.2.1-org/html.c    Thu Jun 13 17:52:44 2002
  247. --- sarg-1.2.2.1/html.c    Mon Oct 14 11:00:02 2002
  248. ***************
  249. *** 16,22 ****
  250.      long long int totelap=0, totelap2=0, nnelap=0, unelap=0, tnelap=0;
  251.      long long int incache=0, oucache=0, tnincache=0, tnoucache=0, twork=0, twork2=0;
  252.      char arqin[MAXLEN], arqou[MAXLEN], arqper[MAXLEN], arqip[MAXLEN];
  253. !    char nacc[20], nbytes[20], url[1024], purl[1024], tmsg[30], tmsg2[30], nelap[20], csort[MAXLEN];
  254.      char periodo[MAXLEN], usuario[MAXLEN], wusuario[MAXLEN], u2[MAXLEN], duser[MAXLEN];
  255.      char userbytes[20], userelap[20], userurl[1024], userip[MAXLEN], userhora[9], userdia[9];
  256.      char olduserip[MAXLEN], tmp2[MAXLEN], tmp3[MAXLEN], incac[20], oucac[20];
  257. --- 16,22 ----
  258.      long long int totelap=0, totelap2=0, nnelap=0, unelap=0, tnelap=0;
  259.      long long int incache=0, oucache=0, tnincache=0, tnoucache=0, twork=0, twork2=0;
  260.      char arqin[MAXLEN], arqou[MAXLEN], arqper[MAXLEN], arqip[MAXLEN];
  261. !    char nacc[20], nbytes[20], url[1024], purl[1024], tmsg[31], tmsg2[30], nelap[20], csort[MAXLEN];
  262.      char periodo[MAXLEN], usuario[MAXLEN], wusuario[MAXLEN], u2[MAXLEN], duser[MAXLEN];
  263.      char userbytes[20], userelap[20], userurl[1024], userip[MAXLEN], userhora[9], userdia[9];
  264.      char olduserip[MAXLEN], tmp2[MAXLEN], tmp3[MAXLEN], incac[20], oucac[20];
  265. ***************
  266. *** 164,182 ****
  267.         fputs(html,fp_ou);
  268.         fputs("</head>\n",fp_ou);
  269.   
  270. !       if(strlen(FontFace) > 0) {
  271. !          sprintf(html,"<font face=%s>\n",FontFace);
  272.            fputs(html,fp_ou);
  273. -       }
  274. -       sprintf(html,"<body bgcolor=%s text=%s background='%s'>\n",BgColor,TxColor,BgImage);
  275. -       fputs(html,fp_ou);
  276.         fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  277.   
  278.         if(strlen(LogoImage) > 0) {
  279. !          sprintf(html,"<tr><th align=left><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s
  280. !    >%s</font>\n",LogoImage,Width,Height,LogoTextColor,LogoText);
  281.            fputs(html,fp_ou);
  282.         }
  283.   
  284. --- 164,176 ----
  285.         fputs(html,fp_ou);
  286.         fputs("</head>\n",fp_ou);
  287.   
  288. !       // DAS: Using style=font-family more corresponds to standards. 
  289. !       sprintf(html,"<body bgcolor=%s text=%s background='%s' style='font-family:%s;'>\n",BgColor,TxColor,BgImage,FontFace);
  290.         fputs(html,fp_ou);
  291.         fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  292.   
  293.         if(strlen(LogoImage) > 0) {
  294. !          sprintf(html,"<tr><th align=left><img src='%s' border=0 align=absmiddle width=%s height=%s><font color=%s>%s</font>\n",LogoImage,Width,Height,LogoTextColor,LogoText);
  295.            fputs(html,fp_ou);
  296.         }
  297.   
  298. ***************
  299. *** 258,263 ****
  300. --- 252,258 ----
  301.            }else {
  302.               strcpy(purl,url);
  303.               strncpy(tmsg,"                              ",30);
  304. +             tmsg[30]='\0'; // DAS: strncpy don't add '\0'
  305.            }
  306.   
  307.            nnbytes=my_atoll(nbytes);
  308. ***************
  309. *** 297,324 ****
  310.               sprintf(httplink,"<font size=%s color=%s><href=http://%s>%s",    \
  311.                   FontSize,PrivacyStringColor,PrivacyString,PrivacyString);
  312.        else
  313. !             sprintf(httplink,"<font size=%s><a href=http://%s>%s</A>",FontSize,url,purl);
  314.   
  315.            if(strstr(ReportType,"site_user_time_date") != 0) {
  316.               sprintf(ltext110,"%s",text[110]);
  317. !             if(ltext110){
  318.                  for(s=ltext110; *s; ++s)
  319.                     *s=tolower(*s);
  320.               }
  321. !             z1=0;
  322. !             z2=0;
  323. !         strcpy(siteind,url);
  324. !             str=siteind;
  325. !             for(z1=0; z1<=strlen(str); z1++) {
  326. !                if(str[z1]=='-')
  327. !                   str[z1]='_';
  328. !                if(str[z1]=='.')
  329. !                   str[z1]='_';
  330. !                if(str[z1]==':')
  331. !                   str[z1]='_';
  332. !                siteind[z2]=str[z1];
  333. !                z2++;
  334. !             }
  335.           sprintf(href2,"<a href='tt%s-%s.html' style='color:FF3333;'>",usuario,siteind);
  336.            } else {
  337.               bzero(href2, MAXLEN);
  338. --- 292,306 ----
  339.               sprintf(httplink,"<font size=%s color=%s><href=http://%s>%s",    \
  340.                   FontSize,PrivacyStringColor,PrivacyString,PrivacyString);
  341.        else
  342. !             sprintf(httplink,"<font size=%s><a href=http://%s>%s</a>",FontSize,url,purl);
  343.   
  344.            if(strstr(ReportType,"site_user_time_date") != 0) {
  345.               sprintf(ltext110,"%s",text[110]);
  346. !             if(*ltext110){
  347.                  for(s=ltext110; *s; ++s)
  348.                     *s=tolower(*s);
  349.               }
  350. !             encode_filename( siteind, url );
  351.           sprintf(href2,"<a href='tt%s-%s.html' style='color:FF3333;'>",usuario,siteind);
  352.            } else {
  353.               bzero(href2, MAXLEN);
  354. ***************
  355. *** 353,359 ****
  356.                fclose(fp_ip);
  357.                fclose(fp_ip2);
  358.   
  359. !              sprintf(csort,"sort -n -T %s -k 1,1 -k 5,5 -o %s %s",TempDir,tmp3,tmp2);
  360.   
  361.                system(csort);
  362.   
  363. --- 335,341 ----
  364.                fclose(fp_ip);
  365.                fclose(fp_ip2);
  366.   
  367. !              sprintf(csort, SORT" -n -T %s -k 1,1 -k 5,5 -o %s %s",TempDir,tmp3,tmp2);
  368.   
  369.                system(csort);
  370.   
  371. diff -cbr sarg-1.2.2.1-org/include/conf.h sarg-1.2.2.1/include/conf.h
  372. *** sarg-1.2.2.1-org/include/conf.h    Thu Jun 13 18:38:10 2002
  373. --- sarg-1.2.2.1/include/conf.h    Tue Oct  8 16:45:36 2002
  374. ***************
  375. *** 1,6 ****
  376. --- 1,45 ----
  377.   
  378.   #include "info.h"
  379.   
  380. + #if defined(__OS2__)
  381. +   #include <io.h>
  382. +   #include <memory.h>
  383. +   #include <getopt.h>
  384. +   #define bzero(p,s) memset( p, 0, s )
  385. +   #define SYSCONFDIR "."
  386. +   #define F_OK 0
  387. +   #define X_OK 4
  388. +   #define W_OK 2
  389. +   #define R_OK 4
  390. +   #include <sys/time.h>
  391. +   #include <types.h>
  392. +   #include <sys/select.h>
  393. +   #include <unistd.h>
  394. +   #include <netinet/in.h>
  395. +   #include <arpa/inet.h>
  396. +   #include <netinet/in.h>
  397. +   #include <sys/socket.h>
  398. +   #include <netdb.h>
  399. +   #define SORT  "sasort"
  400. +   #define MKDIR "samd"
  401. +   #define RM    "sarm"
  402. +   #define HAVE_STDIO_H   1
  403. +   #define HAVE_STDLIB_H  1
  404. +   #define HAVE_STRING_H  1
  405. +   #define HAVE_CTYPE_H   1
  406. +   #define HAVE_DIRENT_H  1
  407. + #else
  408. +   #define SORT  "sort"
  409. +   #define MKDIR "mkdir"
  410. +   #define RM    "rm"
  411. + #endif
  412.   #if HAVE_STDIO_H
  413.   #include <stdio.h>
  414.   #endif
  415. diff -cbr sarg-1.2.2.1-org/index.c sarg-1.2.2.1/index.c
  416. *** sarg-1.2.2.1-org/index.c    Thu Jun 13 17:52:46 2002
  417. --- sarg-1.2.2.1/index.c    Fri Oct 11 14:10:06 2002
  418. ***************
  419. *** 5,11 ****
  420.   
  421.   #include "include/conf.h"
  422.   
  423. ! #define SORTINDEX
  424.   #ifdef SORTINDEX
  425.   #include <dirent.h>
  426.   #include <sys/stat.h>
  427. --- 5,14 ----
  428.   
  429.   #include "include/conf.h"
  430.   
  431. ! #if !defined(__OS2__)
  432. !   #define SORTINDEX
  433. ! #endif
  434.   #ifdef SORTINDEX
  435.   #include <dirent.h>
  436.   #include <sys/stat.h>
  437. ***************
  438. *** 71,84 ****
  439.      fputs(html,fp_ou);
  440.      fputs("</head>\n",fp_ou);
  441.   
  442. !    if(strlen(FontFace) > 0) {
  443. !       sprintf(html,"<font face=%s>\n",FontFace);
  444. !       fputs(html,fp_ou);
  445. !    }
  446. !    sprintf(html,"<body bgcolor=%s text=%s background='%s'>\n",BgColor,TxColor,BgImage);
  447.      fputs(html,fp_ou);
  448.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  449.   
  450.      if(strlen(LogoImage) > 0) {
  451. --- 74,82 ----
  452.      fputs(html,fp_ou);
  453.      fputs("</head>\n",fp_ou);
  454.   
  455. !    // DAS: Using style=font-family more corresponds to standards. 
  456. !    sprintf(html,"<body bgcolor=%s text=%s background='%s' style='font-family:%s;'>\n",BgColor,TxColor,BgImage,FontFace);
  457.      fputs(html,fp_ou);
  458.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  459.   
  460.      if(strlen(LogoImage) > 0) {
  461. ***************
  462. *** 115,121 ****
  463.         obtuser(dirname,direntp->d_name,tuser);
  464.         obttotal(dirname,direntp->d_name,tbytes,tuser,media);
  465.   
  466. !       sprintf(html,"<tr><td bgcolor=%s><font size=%s><a href='%s/%s'>%s</font></a></td><td bgcolor=%s><font size=%s>%s</font></td><td align=right bgcolor=%s><font size=%s>%s</font></td><td align=right bgcolor=%s><font size=%s>%s</font></td><td align=right bgcolor=%s><font size=%s>%s</font></td></tr>\n",TxBgColor,FontSize,direntp->d_name,ReplaceIndex,direntp->d_name,TxBgColor,FontSize,data,TxBgColor,FontSize,tuser,TxBgColor,FontSize,tbytes,TxBgColor,FontSize,media);
  467.         fputs(html,fp_ou);
  468.      }
  469.   
  470. --- 113,119 ----
  471.         obtuser(dirname,direntp->d_name,tuser);
  472.         obttotal(dirname,direntp->d_name,tbytes,tuser,media);
  473.   
  474. !       sprintf(html,"<tr><td bgcolor=%s><font size=%s><a href='%s/%s'>%s</a></font></a></td><td bgcolor=%s><font size=%s>%s</font></td><td align=right bgcolor=%s><font size=%s>%s</font></td><td align=right bgcolor=%s><font size=%s>%s</font></td><td align=right bgcolor=%s><font size=%s>%s</font></td></tr>\n",TxBgColor,FontSize,direntp->d_name,ReplaceIndex,direntp->d_name,TxBgColor,FontSize,data,TxBgColor,FontSize,tuser,TxBgColor,FontSize,tbytes,TxBgColor,FontSize,media);
  475.         fputs(html,fp_ou);
  476.      }
  477.   
  478. Only in sarg-1.2.2.1/languages: Russian
  479. diff -cbr sarg-1.2.2.1-org/lastlog.c sarg-1.2.2.1/lastlog.c
  480. *** sarg-1.2.2.1-org/lastlog.c    Thu Jun 13 17:52:46 2002
  481. --- sarg-1.2.2.1/lastlog.c    Tue Oct  8 16:25:28 2002
  482. ***************
  483. *** 46,52 ****
  484.      (void)closedir( dirp );
  485.      fclose(fp_ou);
  486.      
  487. !    sprintf(buf,"sort -n -k 1,1 -o %slastlog %s",outdir,temp);
  488.      system(buf);
  489.   
  490.      unlink(temp);
  491. --- 46,52 ----
  492.      (void)closedir( dirp );
  493.      fclose(fp_ou);
  494.      
  495. !    sprintf(buf, SORT" -n -k 1,1 -o %slastlog %s",outdir,temp);
  496.      system(buf);
  497.   
  498.      unlink(temp);
  499. ***************
  500. *** 75,84 ****
  501.               sprintf(msg,"%s: %s",text[81],buf);
  502.               debuga(msg);
  503.            }
  504. ! //         sprintf(temp,"%s%s",outdir,buf);
  505. !          sprintf(temp,"rm -r %s%s",outdir,buf);
  506.            system(temp);
  507. -          unlink(temp);
  508.            ftot--;
  509.         }
  510.      }
  511. --- 75,82 ----
  512.               sprintf(msg,"%s: %s",text[81],buf);
  513.               debuga(msg);
  514.            }
  515. !          sprintf(temp, RM" -r %s%s",outdir,buf);
  516.            system(temp);
  517.            ftot--;
  518.         }
  519.      }
  520. diff -cbr sarg-1.2.2.1-org/log.c sarg-1.2.2.1/log.c
  521. *** sarg-1.2.2.1-org/log.c    Thu Jun 13 17:54:04 2002
  522. --- sarg-1.2.2.1/log.c    Fri Oct 11 10:15:48 2002
  523. ***************
  524. *** 457,463 ****
  525.      strcpy(tmp6,tmp);
  526.   
  527.      if(strlen(email) > 0) {
  528. !       sprintf(wtemp2,"mkdir -p %s/sarg_tmp",tmp2);
  529.         system(wtemp2);
  530.         strcat(tmp2,"/sarg_tmp");
  531.         strcpy(outdir,tmp2);
  532. --- 457,463 ----
  533.      strcpy(tmp6,tmp);
  534.   
  535.      if(strlen(email) > 0) {
  536. !       sprintf(wtemp2, MKDIR" -p %s/sarg_tmp",tmp2);
  537.         system(wtemp2);
  538.         strcat(tmp2,"/sarg_tmp");
  539.         strcpy(outdir,tmp2);
  540. ***************
  541. *** 648,654 ****
  542.      while(fgets(bufz,sizeof(bufz),fp_in)!=NULL) {
  543.       recs2++;
  544.       if(debug) 
  545. !        printf("SARG: Records in file=%d Reading=%d Rest=%d\r",recs1,recs2,recs1-recs2);
  546.           if(!bufz[0]) continue;
  547.           if(strstr(bufz,"HTTP/0.0") != 0) continue;
  548.           if(strstr(bufz,"logfile turned over") != 0) continue;
  549. --- 648,654 ----
  550.      while(fgets(bufz,sizeof(bufz),fp_in)!=NULL) {
  551.       recs2++;
  552.       if(debug) 
  553. !        printf("SARG: Records in file=%d Reading=%d Rest=%d \r",recs1,recs2,recs1-recs2);
  554.           if(!bufz[0]) continue;
  555.           if(strstr(bufz,"HTTP/0.0") != 0) continue;
  556.           if(strstr(bufz,"logfile turned over") != 0) continue;
  557. ***************
  558. *** 975,983 ****
  559.               fclose(fp_denied);
  560.            if(fp_authfail)
  561.               fclose(fp_authfail);
  562. !          if(tmp4)
  563.               unlink(tmp4);
  564. !          if(tmp6)
  565.               unlink(tmp6);
  566.            unlink(tmp3);
  567.            exit(0);
  568. --- 975,983 ----
  569.               fclose(fp_denied);
  570.            if(fp_authfail)
  571.               fclose(fp_authfail);
  572. !          if(*tmp4)
  573.               unlink(tmp4);
  574. !          if(*tmp6)
  575.               unlink(tmp6);
  576.            unlink(tmp3);
  577.            exit(0);
  578. ***************
  579. *** 1024,1035 ****
  580.        debuga(msg);
  581.      }
  582.   
  583. !    sprintf(csort,"sort -T %s -k 3,3 -k 5,5 -o %s %s", tmp, tmp2, tmp3);
  584.      system(csort);
  585.      unlink(tmp3);
  586.   
  587.      if(strstr(ReportType,"denied") != 0) {
  588. !       sprintf(csort,"sort -T %s -k 3,3 -k 5,5 -o %s %s", tmp, tmp5, tmp4);
  589.         system(csort);
  590.         unlink(tmp4);
  591.      }
  592. --- 1024,1035 ----
  593.        debuga(msg);
  594.      }
  595.   
  596. !    sprintf(csort, SORT" -T %s -k 3,3 -k 5,5 -o %s %s", tmp, tmp2, tmp3);
  597.      system(csort);
  598.      unlink(tmp3);
  599.   
  600.      if(strstr(ReportType,"denied") != 0) {
  601. !       sprintf(csort, SORT" -T %s -k 3,3 -k 5,5 -o %s %s", tmp, tmp5, tmp4);
  602.         system(csort);
  603.         unlink(tmp4);
  604.      }
  605. Only in sarg-1.2.2.1: Makefile.os2
  606. Only in sarg-1.2.2.1: os2
  607. diff -cbr sarg-1.2.2.1-org/repday.c sarg-1.2.2.1/repday.c
  608. *** sarg-1.2.2.1-org/repday.c    Thu Jun 13 17:54:26 2002
  609. --- sarg-1.2.2.1/repday.c    Fri Oct 11 14:10:10 2002
  610. ***************
  611. *** 57,68 ****
  612.      fputs(html,fp_ou);
  613.      fputs("</head>\n",fp_ou);
  614.   
  615. !    if(strlen(FontFace) > 0) {
  616. !       sprintf(html,"<font face=%s>\n",FontFace);
  617. !       fputs(html,fp_ou);
  618. !    }
  619. !    sprintf(html,"<body bgcolor=%s text=%s background='%s'>\n",BgColor,TxColor,BgImage);
  620.      fputs(html,fp_ou);
  621.   
  622.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  623. --- 57,64 ----
  624.      fputs(html,fp_ou);
  625.      fputs("</head>\n",fp_ou);
  626.   
  627. !    // DAS: Using style=font-family more corresponds to standards. 
  628. !    sprintf(html,"<body bgcolor=%s text=%s background='%s' style='font-family:%s;'>\n",BgColor,TxColor,BgImage,FontFace);
  629.      fputs(html,fp_ou);
  630.   
  631.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  632. ***************
  633. *** 111,117 ****
  634.      fputs("<tr><td></td></tr><tr><td></td></tr>\n",fp_ou);
  635.      fputs("<tr><td></td></tr><tr><td></td></tr></table>\n",fp_ou);
  636.   
  637. !    fputs("<table border=1 cellpadding=2 cellspacing=0>\n", fp_ou);
  638.   
  639.      fputs( "<tr><td border=0></td>\n", fp_ou );
  640.   
  641. --- 107,113 ----
  642.      fputs("<tr><td></td></tr><tr><td></td></tr>\n",fp_ou);
  643.      fputs("<tr><td></td></tr><tr><td></td></tr></table>\n",fp_ou);
  644.   
  645. !    fputs("<table cellpadding=1 cellspacing=1>\n", fp_ou);
  646.   
  647.      fputs( "<tr><td border=0></td>\n", fp_ou );
  648.   
  649. diff -cbr sarg-1.2.2.1-org/report.c sarg-1.2.2.1/report.c
  650. *** sarg-1.2.2.1-org/report.c    Thu Jun 13 17:52:44 2002
  651. --- sarg-1.2.2.1/report.c    Fri Oct 11 14:21:20 2002
  652. ***************
  653. *** 159,180 ****
  654.         if(strstr(ReportType,"site_user_time_date") != 0) {
  655.            if(!ttopen) {
  656.               ind2++;
  657. !         strcpy(siteind,accurl);
  658. !             z1=0;
  659. !         z2=0;
  660. !         str=siteind;
  661. !         for(z1=0; z1<=strlen(str); z1++) {
  662. !            if(str[z1]=='-')
  663. !                   str[z1]='_';
  664. !            if(str[z1]=='.')
  665. !                   str[z1]='_';
  666. !            if(str[z1]==':')
  667. !                   str[z1]='_';
  668. !            if(str[z1]=='/')
  669. !                   str[z1]='_';
  670. !                siteind[z2]=str[z1];
  671. !                z2++;
  672. !             }
  673.           sprintf(arqtt,"%s/tt%s-%s.html",dirname,accuser,siteind);
  674.               if ((fp_tt = fopen(arqtt, "w")) == 0) {
  675.                  fprintf(stderr, "SARG: (report) %s: %s\n",text[45],arqtt);
  676. --- 159,165 ----
  677.         if(strstr(ReportType,"site_user_time_date") != 0) {
  678.            if(!ttopen) {
  679.               ind2++;
  680. !             encode_filename( siteind, accurl );
  681.           sprintf(arqtt,"%s/tt%s-%s.html",dirname,accuser,siteind);
  682.               if ((fp_tt = fopen(arqtt, "w")) == 0) {
  683.                  fprintf(stderr, "SARG: (report) %s: %s\n",text[45],arqtt);
  684. ***************
  685. *** 186,195 ****
  686.                  sprintf(httplink,"<font size=%s color=%s><href=http://%s>%s",    \
  687.                         FontSize,PrivacyStringColor,PrivacyString,PrivacyString);
  688.            else
  689. !                sprintf(httplink,"<font size=%s><a href=http://%s>%s</A>",FontSize,accurl,accurl);
  690.   
  691.               sprintf(ltext110,"%s",text[110]);
  692. !             if(ltext110){
  693.                  for(s=ltext110; *s; ++s)
  694.                     *s=tolower(*s);
  695.               }
  696. --- 171,180 ----
  697.                  sprintf(httplink,"<font size=%s color=%s><href=http://%s>%s",    \
  698.                         FontSize,PrivacyStringColor,PrivacyString,PrivacyString);
  699.            else
  700. !                sprintf(httplink,"<font size=%s><a href=http://%s>%s</a>",FontSize,accurl,accurl);
  701.   
  702.               sprintf(ltext110,"%s",text[110]);
  703. !             if(*ltext110){
  704.                  for(s=ltext110; *s; ++s)
  705.                     *s=tolower(*s);
  706.               }
  707. ***************
  708. *** 200,213 ****
  709.               fputs(html,fp_tt);
  710.               fputs("</head>\n",fp_tt);
  711.   
  712. !             if(strlen(FontFace) > 0) {
  713. !                sprintf(html,"<font face=%s>\n",FontFace);
  714.                  fputs(html,fp_tt);
  715. -             }
  716. -             sprintf(html,"<body bgcolor=%s text=%s background='%s'>\n",BgColor,TxColor,BgImage);
  717. -             fputs(html,fp_tt);
  718.               fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_tt);
  719.   
  720.               if(strlen(LogoImage) > 0) {
  721. --- 185,193 ----
  722.               fputs(html,fp_tt);
  723.               fputs("</head>\n",fp_tt);
  724.   
  725. !             // DAS: Using style=font-family more corresponds to standards. 
  726. !             sprintf(html,"<body bgcolor=%s text=%s background='%s' style='font-family:%s;'>\n",BgColor,TxColor,BgImage,FontFace);
  727.               fputs(html,fp_tt);
  728.               fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_tt);
  729.   
  730.               if(strlen(LogoImage) > 0) {
  731. ***************
  732. *** 235,242 ****
  733.               fputs("<tr><td></td><td></td></tr>",fp_tt);
  734.               bzero(tmp4, MAXLEN);
  735.               bzero(tmp5, MAXLEN);
  736. !             strncpy(tmp4,text[110],4);
  737. !             strncpy(tmp5,text[110]+5,4);
  738.               sprintf(html,"<tr><th align=left bgcolor=%s><font size=%s color=%s>%s</font></th><td></td><td></td><th bgcolor=%s><font size=%s color=%s>%s</font></th><td></td><td></td><th bgcolor=%s><font size=%s color=%s>%s</font></th></tr>\n",HeaderBgColor,FontSize,HeaderColor,text[91],HeaderBgColor,FontSize,HeaderColor,tmp4,HeaderBgColor,FontSize,HeaderColor,tmp5);
  739.               fputs(html,fp_tt);
  740.        }
  741. --- 215,222 ----
  742.               fputs("<tr><td></td><td></td></tr>",fp_tt);
  743.               bzero(tmp4, MAXLEN);
  744.               bzero(tmp5, MAXLEN);
  745. !             strncpy(tmp4,text[110],4);   // FIXME: This is not multilanguage!
  746. !             strncpy(tmp5,text[110]+5,4); // FIXME: This is not multilanguage!
  747.               sprintf(html,"<tr><th align=left bgcolor=%s><font size=%s color=%s>%s</font></th><td></td><td></td><th bgcolor=%s><font size=%s color=%s>%s</font></th><td></td><td></td><th bgcolor=%s><font size=%s color=%s>%s</font></th></tr>\n",HeaderBgColor,FontSize,HeaderColor,text[91],HeaderBgColor,FontSize,HeaderColor,tmp4,HeaderBgColor,FontSize,HeaderColor,tmp5);
  748.               fputs(html,fp_tt);
  749.        }
  750. Only in sarg-1.2.2.1: samd.exe
  751. diff -cbr sarg-1.2.2.1-org/sarg.conf sarg-1.2.2.1/sarg.conf
  752. *** sarg-1.2.2.1-org/sarg.conf    Thu Jun 13 17:52:44 2002
  753. --- sarg-1.2.2.1/sarg.conf    Tue Oct  8 21:11:38 2002
  754. ***************
  755. *** 16,21 ****
  756. --- 16,22 ----
  757.   #        Polish
  758.   #        Portuguese
  759.   #        Romanian
  760. + #        Russian
  761.   #        Russian_koi8
  762.   #        Russian_windows1251
  763.   #        Serbian
  764. ***************
  765. *** 310,315 ****
  766. --- 311,317 ----
  767.   #        Latin6
  768.   #        Windows-1251
  769.   #        Koi8-r
  770. + #        Cyrillic-866
  771.   #
  772.   #charset Latin1
  773.   
  774. Only in sarg-1.2.2.1: sarg.exe
  775. Only in sarg-1.2.2.1: sarm.exe
  776. Only in sarg-1.2.2.1: sasort.exe
  777. diff -cbr sarg-1.2.2.1-org/siteuser.c sarg-1.2.2.1/siteuser.c
  778. *** sarg-1.2.2.1-org/siteuser.c    Thu Jun 13 17:52:44 2002
  779. --- sarg-1.2.2.1/siteuser.c    Fri Oct 11 14:10:20 2002
  780. ***************
  781. *** 44,50 ****
  782.      fgets(periodo,sizeof(periodo),fp_in);
  783.      fclose(fp_in);
  784.   
  785. !    sprintf(csort,"sort -k 4,4 -k 1,1 -o %s %s",geral2,geral);
  786.      system(csort);
  787.   
  788.      if((fp_in=fopen(geral2,"r"))==NULL) {
  789. --- 44,50 ----
  790.      fgets(periodo,sizeof(periodo),fp_in);
  791.      fclose(fp_in);
  792.   
  793. !    sprintf(csort, SORT" -k 4,4 -k 1,1 -o %s %s",geral2,geral);
  794.      system(csort);
  795.   
  796.      if((fp_in=fopen(geral2,"r"))==NULL) {
  797. ***************
  798. *** 63,74 ****
  799.      fputs(html,fp_ou);
  800.      fputs("</head>\n",fp_ou);
  801.   
  802. !    if(strlen(FontFace) > 0) {
  803. !       sprintf(url,"<font face=%s>\n",FontFace);
  804. !       fputs(url,fp_ou);
  805. !    }
  806. !    sprintf(url,"<body bgcolor=%s text=%s background='%s'>\n",BgColor,TxColor,BgImage);
  807.      fputs(url,fp_ou);
  808.   
  809.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  810. --- 63,70 ----
  811.      fputs(html,fp_ou);
  812.      fputs("</head>\n",fp_ou);
  813.   
  814. !    // DAS: Using style=font-family more corresponds to standards. 
  815. !    sprintf(url,"<body bgcolor=%s text=%s background='%s' style='font-family:%s;'>\n",BgColor,TxColor,BgImage,FontFace);
  816.      fputs(url,fp_ou);
  817.   
  818.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  819. ***************
  820. *** 133,139 ****
  821.         }
  822.   
  823.         if(strcmp(url,ourl) != 0) {
  824. !          sprintf(html,"<tr><td bgcolor=%s align=right><font size=%s>%d</font></td><td> </td><td align=left border=0 bgcolor=%s><font size=%s><a href=\"http://%s\">%s</font></td><td> </td><td bgcolor=%s align=left><font size=%s>%s</font></td></tr>\n",TxBgColor,FontSize,regs,TxBgColor,FontSize,ourl,ourl,TxBgColor,FontSize,users);
  825.            fputs(html,fp_ou);
  826.            regs++;
  827.            ucount=0;
  828. --- 129,135 ----
  829.         }
  830.   
  831.         if(strcmp(url,ourl) != 0) {
  832. !          sprintf(html,"<tr><td bgcolor=%s align=right><font size=%s>%d</font></td><td> </td><td align=left border=0 bgcolor=%s><font size=%s><a href=\"http://%s\">%s</a></font></td><td> </td><td bgcolor=%s align=left><font size=%s>%s</font></td></tr>\n",TxBgColor,FontSize,regs,TxBgColor,FontSize,ourl,ourl,TxBgColor,FontSize,users);
  833.            fputs(html,fp_ou);
  834.            regs++;
  835.            ucount=0;
  836. diff -cbr sarg-1.2.2.1-org/smartfilter.c sarg-1.2.2.1/smartfilter.c
  837. *** sarg-1.2.2.1-org/smartfilter.c    Thu Jun 13 17:52:44 2002
  838. --- sarg-1.2.2.1/smartfilter.c    Fri Oct 11 14:10:22 2002
  839. ***************
  840. *** 51,57 ****
  841.      fgets(periodo,sizeof(periodo),fp_in);
  842.      fclose(fp_in);
  843.   
  844. !    sprintf(csort,"sort -n -k 1,1 -k 2,2 -k 3,3 -o %s %s",smart_ou,smart_in);
  845.      system(csort);
  846.      unlink(smart_in);
  847.   
  848. --- 51,57 ----
  849.      fgets(periodo,sizeof(periodo),fp_in);
  850.      fclose(fp_in);
  851.   
  852. !    sprintf(csort, SORT" -n -k 1,1 -k 2,2 -k 3,3 -o %s %s",smart_ou,smart_in);
  853.      system(csort);
  854.      unlink(smart_in);
  855.   
  856. ***************
  857. *** 71,84 ****
  858.      fputs(html,fp_ou);
  859.      fputs("</head>\n",fp_ou);
  860.   
  861. !    if(strlen(FontFace) > 0) {
  862. !       sprintf(url,"<font face=%s>\n",FontFace);
  863.         fputs(url,fp_ou);
  864. -    }
  865. -    sprintf(url,"<body bgcolor=%s text=%s background='%s'>\n",BgColor,TxColor,BgImage);
  866. -    fputs(url,fp_ou);
  867.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  868.   
  869.      if(strlen(LogoImage) > 0) {
  870. --- 71,79 ----
  871.      fputs(html,fp_ou);
  872.      fputs("</head>\n",fp_ou);
  873.   
  874. !    // DAS: Using style=font-family more corresponds to standards. 
  875. !    sprintf(url,"<body bgcolor=%s text=%s background='%s' style='font-family:%s;'>\n",BgColor,TxColor,BgImage,FontFace);
  876.      fputs(url,fp_ou);
  877.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  878.   
  879.      if(strlen(LogoImage) > 0) {
  880. diff -cbr sarg-1.2.2.1-org/sort.c sarg-1.2.2.1/sort.c
  881. *** sarg-1.2.2.1-org/sort.c    Thu Jun 13 17:52:44 2002
  882. --- sarg-1.2.2.1/sort.c    Fri Oct 11 11:44:12 2002
  883. ***************
  884. *** 13,19 ****
  885.      struct dirent *direntp;
  886.   
  887.      char csort[MAXLEN];
  888. !    char wentp[20];
  889.      char arqou[MAXLEN], arqin[MAXLEN], wnome[MAXLEN], wnome2[MAXLEN];
  890.      char field1[10]="2,2";
  891.      char field2[10]="1,1";
  892. --- 13,19 ----
  893.      struct dirent *direntp;
  894.   
  895.      char csort[MAXLEN];
  896. !    char wentp[MAXLEN];
  897.      char arqou[MAXLEN], arqin[MAXLEN], wnome[MAXLEN], wnome2[MAXLEN];
  898.      char field1[10]="2,2";
  899.      char field2[10]="1,1";
  900. ***************
  901. *** 79,86 ****
  902.            order[0]='\0';
  903.           
  904.         strcat(arqou,".txt");
  905. !       sprintf(csort,"sort -n -T %s %s -k %s -k %s -k %s -o %s %s",TempDir,order,field1,field2,field3,arqou,arqin);
  906.         system(csort);
  907.   
  908.         unlink(arqin);
  909. --- 79,85 ----
  910.            order[0]='\0';
  911.           
  912.         strcat(arqou,".txt");
  913. !       sprintf(csort, SORT" -n -T %s %s -k %s -k %s -k %s -o %s %s",TempDir,order,field1,field2,field3,arqou,arqin);
  914.         system(csort);
  915.   
  916.         unlink(arqin);
  917. diff -cbr sarg-1.2.2.1-org/topsites.c sarg-1.2.2.1/topsites.c
  918. *** sarg-1.2.2.1-org/topsites.c    Thu Jun 13 17:52:46 2002
  919. --- sarg-1.2.2.1/topsites.c    Fri Oct 11 14:10:26 2002
  920. ***************
  921. *** 47,53 ****
  922.      fgets(periodo,sizeof(periodo),fp_in);
  923.      fclose(fp_in);
  924.   
  925. !    sprintf(csort,"sort -k 4,4 -o %s %s",geral2,geral);
  926.      system(csort);
  927.   
  928.      if((fp_in=fopen(geral2,"r"))==NULL) {
  929. --- 47,53 ----
  930.      fgets(periodo,sizeof(periodo),fp_in);
  931.      fclose(fp_in);
  932.   
  933. !    sprintf(csort, SORT" -k 4,4 -o %s %s",geral2,geral);
  934.      system(csort);
  935.   
  936.      if((fp_in=fopen(geral2,"r"))==NULL) {
  937. ***************
  938. *** 111,117 ****
  939.      if(strcmp(TopsitesSortType,"d") == 0)
  940.         strcpy(sortt,"-r");
  941.   
  942. !    sprintf(csort,"sort %s -k %s -o %s %s",sortt,sortf,sites,geral3);
  943.      system(csort);
  944.   
  945.      unlink(geral2);
  946. --- 111,117 ----
  947.      if(strcmp(TopsitesSortType,"d") == 0)
  948.         strcpy(sortt,"-r");
  949.   
  950. !    sprintf(csort, SORT" %s -k %s -o %s %s",sortt,sortf,sites,geral3);
  951.      system(csort);
  952.   
  953.      unlink(geral2);
  954. ***************
  955. *** 135,148 ****
  956.      fputs(html,fp_ou);
  957.      fputs("</head>\n",fp_ou);
  958.   
  959. !    if(strlen(FontFace) > 0) {
  960. !       sprintf(url,"<font face=%s>\n",FontFace);
  961.         fputs(url,fp_ou);
  962. -    }
  963. -    sprintf(url,"<body bgcolor=%s text=%s background='%s'>\n",BgColor,TxColor,BgImage);
  964. -    fputs(url,fp_ou);
  965.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  966.   
  967.      if(strlen(LogoImage) > 0) {
  968. --- 135,143 ----
  969.      fputs(html,fp_ou);
  970.      fputs("</head>\n",fp_ou);
  971.   
  972. !    // DAS: Using style=font-family more corresponds to standards. 
  973. !    sprintf(url,"<body bgcolor=%s text=%s background='%s' style='font-family:%s;'>\n",BgColor,TxColor,BgImage,FontFace);
  974.      fputs(url,fp_ou);
  975.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ou);
  976.   
  977.      if(strlen(LogoImage) > 0) {
  978. ***************
  979. *** 189,195 ****
  980.         sprintf(wwork1,"%s",fixnum(twork1));
  981.         sprintf(wwork2,"%s",fixnum(twork2));
  982.   
  983. !       sprintf(ourl,"<tr><td bgcolor=%s align=right><font size=%s>%d</font></td><td> </td><td align=right border=0 bgcolor=%s><font size=%s><a href=\"http://%s\">%s</font></td><td> </td><td bgcolor=%s align=right><font size=%s>%s</font></td><td> </td><td bgcolor=%s align=right><font size=%s>%s</font></td></tr>\n",TxBgColor,FontSize,regs,TxBgColor,FontSize,url,url,TxBgColor,FontSize,wwork1,TxBgColor,FontSize,wwork2);
  984.         fputs(ourl,fp_ou);
  985.         regs++;
  986.      }
  987. --- 184,190 ----
  988.         sprintf(wwork1,"%s",fixnum(twork1));
  989.         sprintf(wwork2,"%s",fixnum(twork2));
  990.   
  991. !       sprintf(ourl,"<tr><td bgcolor=%s align=right><font size=%s>%d</font></td><td> </td><td align=right border=0 bgcolor=%s><font size=%s><a href=\"http://%s\">%s</a></font></td><td> </td><td bgcolor=%s align=right><font size=%s>%s</font></td><td> </td><td bgcolor=%s align=right><font size=%s>%s</font></td></tr>\n",TxBgColor,FontSize,regs,TxBgColor,FontSize,url,url,TxBgColor,FontSize,wwork1,TxBgColor,FontSize,wwork2);
  992.         fputs(ourl,fp_ou);
  993.         regs++;
  994.      }
  995. diff -cbr sarg-1.2.2.1-org/topuser.c sarg-1.2.2.1/topuser.c
  996. *** sarg-1.2.2.1-org/topuser.c    Thu Jun 13 17:52:44 2002
  997. --- sarg-1.2.2.1/topuser.c    Fri Oct 11 14:10:32 2002
  998. ***************
  999. *** 20,26 ****
  1000.      char olduser[MAXLEN], csort[MAXLEN], periodo[MAXLEN], arqper[MAXLEN];
  1001.      char wger[MAXLEN], top1[MAXLEN], top2[MAXLEN], top3[MAXLEN];
  1002.      char user[MAXLEN], nacc[20], nbytes[20], url[1024], preg[8000], tusr[MAXLEN];
  1003. !    char ip[MAXLEN], hora[9], data[11], elap[15], incac[15], oucac[15], html[MAXLEN];
  1004.      char ipantes[MAXLEN], nameantes[MAXLEN];
  1005.      char sfield[10]="2,2";
  1006.      char order[3]="-r";
  1007. --- 20,26 ----
  1008.      char olduser[MAXLEN], csort[MAXLEN], periodo[MAXLEN], arqper[MAXLEN];
  1009.      char wger[MAXLEN], top1[MAXLEN], top2[MAXLEN], top3[MAXLEN];
  1010.      char user[MAXLEN], nacc[20], nbytes[20], url[1024], preg[8000], tusr[MAXLEN];
  1011. !    char ip[MAXLEN], hora[16], data[16], elap[16], incac[16], oucac[16], html[MAXLEN];
  1012.      char ipantes[MAXLEN], nameantes[MAXLEN];
  1013.      char sfield[10]="2,2";
  1014.      char order[3]="-r";
  1015. ***************
  1016. *** 143,148 ****
  1017. --- 143,149 ----
  1018.      sprintf(preg,"TOTAL %s %s %s %s %s\n",val1,val2,val3,val4,val5);
  1019.      fclose(fp_in);
  1020.      fclose(fp_top2);
  1021. +    fclose(fp_top1);
  1022.   
  1023.      strup(TopuserSortField);
  1024.      strlow(TopuserSortOrder);
  1025. ***************
  1026. *** 159,165 ****
  1027.      if(strcmp(TopuserSortOrder,"normal") == 0)
  1028.         order[0]='\0';
  1029.   
  1030. !    sprintf(csort,"sort -n -T %s %s -k %s -o %s %s", TempDir, order, sfield, top1, top2);
  1031.      system(csort);
  1032.   
  1033.      unlink(top2);
  1034. --- 160,166 ----
  1035.      if(strcmp(TopuserSortOrder,"normal") == 0)
  1036.         order[0]='\0';
  1037.   
  1038. !    sprintf(csort, SORT" -n -T %s %s -k %s -o %s %s", TempDir, order, sfield, top1, top2);
  1039.      system(csort);
  1040.   
  1041.      unlink(top2);
  1042. ***************
  1043. *** 202,215 ****
  1044.      fputs(html,fp_top3);
  1045.      fputs("</head>\n",fp_top3);
  1046.   
  1047. !    if(strlen(FontFace) > 0) {
  1048. !       sprintf(preg,"<font face=%s>\n",FontFace);
  1049.         fputs(preg,fp_top3);
  1050. -    }
  1051. -    sprintf(preg,"<body bgcolor=%s text=%s background='%s'>\n",BgColor,TxColor,BgImage);
  1052. -    fputs(preg,fp_top3);
  1053.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_top3);
  1054.   
  1055.      if(strlen(LogoImage) > 0) {
  1056. --- 203,211 ----
  1057.      fputs(html,fp_top3);
  1058.      fputs("</head>\n",fp_top3);
  1059.   
  1060. !    // DAS: Using style=font-family more corresponds to standards. 
  1061. !    sprintf(preg,"<body bgcolor=%s text=%s background='%s' style='font-family:%s;'>\n",BgColor,TxColor,BgImage,FontFace);
  1062.      fputs(preg,fp_top3);
  1063.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_top3);
  1064.   
  1065.      if(strlen(LogoImage) > 0) {
  1066. ***************
  1067. *** 351,357 ****
  1068.       
  1069.         if(strstr(ReportType,"date_time") != 0) {
  1070.            sprintf(ltext110,"%s",text[110]);
  1071. !          if(ltext110){
  1072.               for(s=ltext110; *s; ++s)
  1073.                  *s=tolower(*s);
  1074.            }
  1075. --- 347,353 ----
  1076.       
  1077.         if(strstr(ReportType,"date_time") != 0) {
  1078.            sprintf(ltext110,"%s",text[110]);
  1079. !          if(*ltext110){
  1080.               for(s=ltext110; *s; ++s)
  1081.                  *s=tolower(*s);
  1082.            }
  1083. ***************
  1084. *** 391,397 ****
  1085.         sprintf(wwork3,"%s",fixnum(tnelap));
  1086.   
  1087.         sprintf(val1,"%d",posicao);
  1088. !       sprintf(val2,"%s%s",href2,ltext110);
  1089.         sprintf(val3,"%3.2f%%",perc);
  1090.         sprintf(val4,"%3.2f%%",inperc);
  1091.         sprintf(val5,"%3.2f%%",ouperc);
  1092. --- 387,393 ----
  1093.         sprintf(wwork3,"%s",fixnum(tnelap));
  1094.   
  1095.         sprintf(val1,"%d",posicao);
  1096. !       sprintf(val2,"%s%s</a>",href2,ltext110);
  1097.         sprintf(val3,"%3.2f%%",perc);
  1098.         sprintf(val4,"%3.2f%%",inperc);
  1099.         sprintf(val5,"%3.2f%%",ouperc);
  1100. ***************
  1101. *** 484,489 ****
  1102. --- 480,486 ----
  1103.   
  1104.   final:
  1105.      fclose(fp_top1);
  1106. +    if(strcmp(RemoveTempFiles,"yes") == 0)
  1107.         unlink(top1);
  1108.   
  1109.      fclose(fp_top3);
  1110. diff -cbr sarg-1.2.2.1-org/totday.c sarg-1.2.2.1/totday.c
  1111. *** sarg-1.2.2.1-org/totday.c    Thu Jun 13 17:52:46 2002
  1112. --- sarg-1.2.2.1/totday.c    Tue Oct  8 16:14:00 2002
  1113. ***************
  1114. *** 34,40 ****
  1115.      sprintf(arqout,"%s/%s.day",dirname,user);
  1116.      sprintf(sortout,"%s/%s.sort",dirname,user);
  1117.   
  1118. !    sprintf(csort,"sort -k 1,1 -k 2,2 -o %s %s",sortout,wdirname);
  1119.      system(csort);
  1120.   
  1121.      unlink(wdirname);
  1122. --- 34,40 ----
  1123.      sprintf(arqout,"%s/%s.day",dirname,user);
  1124.      sprintf(sortout,"%s/%s.sort",dirname,user);
  1125.   
  1126. !    sprintf(csort, SORT" -k 1,1 -k 2,2 -o %s %s",sortout,wdirname);
  1127.      system(csort);
  1128.   
  1129.      unlink(wdirname);
  1130. diff -cbr sarg-1.2.2.1-org/useragent.c sarg-1.2.2.1/useragent.c
  1131. *** sarg-1.2.2.1-org/useragent.c    Thu Jun 13 17:52:46 2002
  1132. --- sarg-1.2.2.1/useragent.c    Fri Oct 11 14:10:36 2002
  1133. ***************
  1134. *** 99,105 ****
  1135.         debuga(msg);
  1136.      }
  1137.   
  1138. !    sprintf(csort,"sort -n -t '\\' -k 4,4 -k 3,3 -k 2,2 -k 1,1 -o %s %s",tmp2,tmp);
  1139.      system(csort);
  1140.   
  1141.      unlink(tmp);
  1142. --- 99,105 ----
  1143.         debuga(msg);
  1144.      }
  1145.   
  1146. !    sprintf(csort, SORT" -n -t '\\' -k 4,4 -k 3,3 -k 2,2 -k 1,1 -o %s %s",tmp2,tmp);
  1147.      system(csort);
  1148.   
  1149.      unlink(tmp);
  1150. ***************
  1151. *** 123,136 ****
  1152.      fputs(html,fp_ht);
  1153.      fputs("</head>\n",fp_ht);
  1154.   
  1155. !    if(strlen(FontFace) > 0) {
  1156. !       sprintf(html,"<font face=%s>\n",FontFace);
  1157.         fputs(html,fp_ht);
  1158. -    }
  1159. -    sprintf(html,"<body bgcolor=%s text=%s background='%s'>\n",BgColor,TxColor,BgImage);
  1160. -    fputs(html,fp_ht);
  1161.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ht);
  1162.   
  1163.      if(strlen(LogoImage) > 0) {
  1164. --- 123,131 ----
  1165.      fputs(html,fp_ht);
  1166.      fputs("</head>\n",fp_ht);
  1167.   
  1168. !    // DAS: Using style=font-family more corresponds to standards. 
  1169. !    sprintf(html,"<body bgcolor=%s text=%s background='%s' style='font-family:%s;'>\n",BgColor,TxColor,BgImage,FontFace);
  1170.      fputs(html,fp_ht);
  1171.      fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ht);
  1172.   
  1173.      if(strlen(LogoImage) > 0) {
  1174. ***************
  1175. *** 189,195 ****
  1176.      fclose(fp_in);
  1177.      fclose(fp_ou);
  1178.   
  1179. !    sprintf(csort,"sort -n -t '\\' -k 3,3 -o %s %s",tmp,tmp2);
  1180.      system(csort);
  1181.   
  1182.      unlink(tmp2);
  1183. --- 184,190 ----
  1184.      fclose(fp_in);
  1185.      fclose(fp_ou);
  1186.   
  1187. !    sprintf(csort, SORT" -n -t '\\' -k 3,3 -o %s %s",tmp,tmp2);
  1188.      system(csort);
  1189.   
  1190.      unlink(tmp2);
  1191. ***************
  1192. *** 237,243 ****
  1193.   
  1194.      unlink(tmp);
  1195.   
  1196. !    sprintf(csort,"sort -n -r -k 1,1 -o %s %s",tmp,tmp2);
  1197.      system(csort);
  1198.   
  1199.      unlink(tmp2);
  1200. --- 232,238 ----
  1201.   
  1202.      unlink(tmp);
  1203.   
  1204. !    sprintf(csort, SORT" -n -r -k 1,1 -o %s %s",tmp,tmp2);
  1205.      system(csort);
  1206.   
  1207.      unlink(tmp2);
  1208. diff -cbr sarg-1.2.2.1-org/util.c sarg-1.2.2.1/util.c
  1209. *** sarg-1.2.2.1-org/util.c    Thu Jun 13 17:54:36 2002
  1210. --- sarg-1.2.2.1/util.c    Mon Oct 14 11:01:00 2002
  1211. ***************
  1212. *** 3,8 ****
  1213. --- 3,26 ----
  1214.   static char mtab1[12][4]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};
  1215.   static char mtab2[12][3]={"01","02","03","04","05","06","07","08","09","10","11","12"};
  1216.   
  1217. + char* encode_filename( char* to, const char* from )
  1218. + {
  1219. +   int i;
  1220. +   #if defined(__OS2__)
  1221. +     strncpy( to, from, 128 );
  1222. +     to[128] = 0;
  1223. +   #else
  1224. +     strcpy ( to, from );
  1225. +   #endif
  1226. +   for( i=0; i<strlen(to); i++ )
  1227. +     if( strchr( "-.:/?*|><\"\\", to[i] ))
  1228. +        to[i]='_';
  1229. +   return to;
  1230. + }
  1231.   void getword(char *word, char *line, int stop)
  1232.   {
  1233.     int x = 0,y;
  1234. ***************
  1235. *** 130,141 ****
  1236.   
  1237.      char warea[50];
  1238.      char dia[3];
  1239. !    char mes[3];
  1240.      char ano[5];
  1241.      int  x;
  1242.   
  1243.      warea[0]='\0';
  1244.   
  1245.      strncpy(dia,duntil+6,2);
  1246.      dia[2]='\0';
  1247.      strncpy(mes,duntil+4,2);
  1248. --- 148,160 ----
  1249.   
  1250.      char warea[50];
  1251.      char dia[3];
  1252. !    char mes[4]; // DAS: 3 characters + '\0'
  1253.      char ano[5];
  1254.      int  x;
  1255.   
  1256.      warea[0]='\0';
  1257.   
  1258. +    // DAS: allways YYYYMMDD after date_from()
  1259.      strncpy(dia,duntil+6,2);
  1260.      dia[2]='\0';
  1261.      strncpy(mes,duntil+4,2);
  1262. ***************
  1263. *** 407,415 ****
  1264.      char wdir[MAXLEN];
  1265.      char per2[MAXLEN];
  1266.   
  1267.      if(strcmp(OverwriteReport,"no") == 0) {
  1268.         while(num) {
  1269. !          if(access(dirname,R_OK) == 0) {
  1270.               sprintf(dirname,"%s.%d",dir,num);
  1271.               sprintf(per2,"%s.%d",per1,num);
  1272.               num++;
  1273. --- 426,439 ----
  1274.      char wdir[MAXLEN];
  1275.      char per2[MAXLEN];
  1276.   
  1277. +    #if defined(__OS2__)
  1278. +      FILE* fh;
  1279. +      time_t local_time;
  1280. +    #endif
  1281.      if(strcmp(OverwriteReport,"no") == 0) {
  1282.         while(num) {
  1283. !          if(access(dirname,F_OK) == 0) {
  1284.               sprintf(dirname,"%s.%d",dir,num);
  1285.               sprintf(per2,"%s.%d",per1,num);
  1286.               num++;
  1287. ***************
  1288. *** 424,436 ****
  1289.            rename(dir,dirname);
  1290.         }
  1291.      } else {
  1292. !       if(access(dir,R_OK) == 0) {
  1293. !          sprintf(wdir,"rm -r %s",dir);
  1294.            system(wdir);
  1295.         }
  1296.      }
  1297.   
  1298. !    sprintf(wdir,"mkdir -p %s",dir);
  1299.      if(strlen(us) > 0) {
  1300.         strcat(wdir,"-");
  1301.         strcat(wdir,us);
  1302. --- 448,460 ----
  1303.            rename(dir,dirname);
  1304.         }
  1305.      } else {
  1306. !       if(access(dir,F_OK) == 0) {
  1307. !          sprintf(wdir, RM" -r %s",dir);
  1308.            system(wdir);
  1309.         }
  1310.      }
  1311.   
  1312. !    sprintf(wdir, MKDIR" -p %s",dir);
  1313.      if(strlen(us) > 0) {
  1314.         strcat(wdir,"-");
  1315.         strcat(wdir,us);
  1316. ***************
  1317. *** 446,455 ****
  1318.   
  1319.      system(wdir);
  1320.   
  1321. !    sprintf(dirname,"%s",wdir+9);
  1322.   
  1323.      sprintf(wdir,"date >%s/%s",dirname,"date");
  1324.      system(wdir);
  1325.   
  1326.      return;
  1327.   
  1328. --- 470,487 ----
  1329.   
  1330.      system(wdir);
  1331.   
  1332. !    sprintf(dirname,"%s",wdir+sizeof(MKDIR)+3);
  1333.   
  1334. +    #if defined(__OS2__)
  1335. +      sprintf( wdir,"%s/%s", dirname, "date" );
  1336. +      fh = fopen( wdir, "w" );
  1337. +      time( &local_time );
  1338. +      fprintf( fh, "%s\n", asctime( localtime( &local_time )));
  1339. +      fclose( fh );
  1340. +    #else
  1341.        sprintf(wdir,"date >%s/%s",dirname,"date");
  1342.        system(wdir);
  1343. +    #endif
  1344.   
  1345.      return;
  1346.   
  1347.