Vanilla Development Maling List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS update: Vanilla/tools



Date:	Wednesday May 5, 1999 @ 20:13
Author:	ahn

Update of /home/netrek/cvsroot/Vanilla/tools
In directory cvs.castle.real-time.com:/var/tmp/cvs-serv3433

Modified Files:
	ltd_dump.c 
Log Message:
Changes by Dave Ahn.

Instead of calculating the totals at runtime (expensive), just calculate
them when the stats are dumped out for now (cheap).



****************************************

Index: Vanilla/tools/ltd_dump.c
diff -u Vanilla/tools/ltd_dump.c:1.1 Vanilla/tools/ltd_dump.c:1.2
--- Vanilla/tools/ltd_dump.c:1.1	Fri Apr 30 18:31:39 1999
+++ Vanilla/tools/ltd_dump.c	Wed May  5 20:13:33 1999
@@ -1,4 +1,4 @@
-/* $Id: ltd_dump.c,v 1.1 1999/04/30 23:31:39 ahn Exp $
+/* $Id: ltd_dump.c,v 1.2 1999/05/06 01:13:33 ahn Exp $
  *
  * Dave Ahn
  *
@@ -28,7 +28,7 @@
 #define LEN_ABBR	4
 #define LEN_NAME	30
 
-static const char rcsid [] = "$Id: ltd_dump.c,v 1.1 1999/04/30 23:31:39 ahn Exp $";
+static const char rcsid [] = "$Id: ltd_dump.c,v 1.2 1999/05/06 01:13:33 ahn Exp $";
 
 static FILE *fp = stdout;
 
@@ -86,11 +86,15 @@
 
 #define dump_stat(STAT) { \
   int xxx; \
+  unsigned int ttt; \
+  ttt = 0; \
   for (xxx=1; xxx<8; xxx++) { \
     fprintf(fp, ":%4u", (unsigned int) ltd[xxx].STAT); \
+    ttt += ltd[xxx].STAT; \
   } \
-  fprintf(fp, ":%4u:\n", (unsigned int) ltd[0].STAT); \
+  fprintf(fp, ":%4u:\n", (unsigned int) ttt); \
 }
+/*  fprintf(fp, ":%4u:\n", (unsigned int) ltd[0].STAT); \*/
 
 static void dump_full(char *name, struct ltd_stats *ltd) {