TIP: Click on subject to list as thread! ANSI
echo: fidosoft.husky
to: All
from: andrew clarke
date: 2015-04-01 13:42:22
subject: Two trivial htick patches

Self-explanatory.

=== Cut ===
-+- report.c.orig       2003-02-05 06:00:00.000000000 +1100
+++ report.c    2015-03-30 12:03:27.536737029 +1100
{at}{at} -467,15 +467,15 {at}{at}
                 ReportOneFile(msg, RepDef, &(Report[ii]));
             }
             xscatprintf(&(msg->text), " %s\r", print_ch(77, '-'));
-            xscatprintf(&(msg->text), " %u bytes in %u
file(s)\r", aList[j].fSize, aList[j].fCount);
+            xscatprintf(&(msg->text), " %u bytes in %u
file%s\r", aList[j].fSize, aList[j].fCount, aList[j].fCount == 1 ?
"" : "s");
             fileCountTotal += aList[j].fCount;
             fileSizeTotal  += aList[j].fSize;
         }
         if(!msg) continue;

         xscatprintf(&(msg->text), "\r %s\r", print_ch(77, '='));
-        xscatprintf(&(msg->text), ">Total %u bytes in %u
file(s)\r\r",
-            fileSizeTotal, fileCountTotal);
+        xscatprintf(&(msg->text), ">Total %u bytes in %u
file%s\r\r",
+           fileSizeTotal, fileCountTotal, fileCountTotal == 1 ?
"" : "s");

         if(msg->netMail > 1)
         {
=== Cut ===


=== Cut ===
-+- report.c.orig       2015-03-30 12:03:27.536737000 +1100
+++ report.c    2015-04-01 06:22:15.833237241 +1100
{at}{at} -472,10 +472,13 {at}{at}
             fileSizeTotal  += aList[j].fSize;
         }
         if(!msg) continue;
-
-        xscatprintf(&(msg->text), "\r %s\r", print_ch(77, '='));
-        xscatprintf(&(msg->text), ">Total %u bytes in %u
file%s\r\r",
-           fileSizeTotal, fileCountTotal, fileCountTotal == 1 ?
"" : "s");
+
+        if (fileCountTotal > 1)
+        {
+            xscatprintf(&(msg->text), "\r %s\r",
print_ch(77, '='));
+            xscatprintf(&(msg->text), ">Total %u bytes in
%u file%s\r\r",
+              fileSizeTotal, fileCountTotal, fileCountTotal == 1 ?
"" : "s");
+        }

         if(msg->netMail > 1)
         {
=== Cut ===

--- GoldED+/BSD 1.1.5-b20130910
* Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
SEEN-BY: 633/267 712/848
@PATH: 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.