[cvslog] Module eggdrop1.6: Change committed

cvslog cvs at tsss.iavalley.cc.ia.us
Mon Dec 18 14:20:02 CST 2000


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2000-12-18 20:19:01 UTC

Modified files:
     src/misc.c

Log message:

quickly fixed src/misc.c -- I broke daysago and the other functions that convert from seconds to a duration in core_cleanup.diff, sorry I didn't send a patch to patches, its a small revert.

---------------------- diff included ----------------------
Index: eggdrop1.6/src/misc.c
diff -u eggdrop1.6/src/misc.c:1.32 eggdrop1.6/src/misc.c:1.33
--- eggdrop1.6/src/misc.c:1.32	Sun Dec 10 09:10:27 2000
+++ eggdrop1.6/src/misc.c	Mon Dec 18 14:18:51 2000
@@ -7,7 +7,7 @@
  *   help system
  *   motd display and %var substitution
  * 
- * $Id: misc.c,v 1.32 2000/12/10 15:10:27 guppy Exp $
+ * $Id: misc.c,v 1.33 2000/12/18 20:18:51 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -427,7 +427,7 @@
   if (now - then > 86400) {
     int days = (now - then) / 86400;
 
-    egg_snprintf(out, sizeof out, "%d day%s ago", days, (days == 1) ? "" : "s");
+    sprintf(out, "%d day%s ago", days, (days == 1) ? "" : "s");    
     return;
   }
   egg_strftime(out, 6, "%H:%M", localtime(&then));
@@ -441,7 +441,7 @@
   if (now - then > 86400) {
     int days = (now - then) / 86400;
 
-    egg_snprintf(out, sizeof out, "in %d day%s", days, (days == 1) ? "" : "s");
+    sprintf(out, "in %d day%s", days, (days == 1) ? "" : "s");
     return;
   }
   egg_strftime(out, 9, "at %H:%M", localtime(&now));
@@ -452,18 +452,20 @@
  */
 void daysdur(time_t now, time_t then, char *out)
 {
+  char s[81];
   int hrs, mins;
 
   if (now - then > 86400) {
     int days = (now - then) / 86400;
 
-    egg_snprintf(out, sizeof out, "for %d day%s", days, (days == 1) ? "" : "s");
+    sprintf(out, "for %d day%s", days, (days == 1) ? "" : "s");
     return;
   }
   now -= then;
   hrs = (int) (now / 3600);
   mins = (int) ((now - (hrs * 3600)) / 60);
-  egg_snprintf(out, sizeof out, "for %02d:%02d", hrs, mins);
+  sprintf(s, "for %02d:%02d", hrs, mins);
+  strcat(out, s);
 }
 
 
----------------------- End of diff -----------------------



More information about the Changes mailing list