r296 - trunk

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun May 20 05:12:53 EDT 2007


Author: icculus
Date: 2007-05-20 05:12:53 -0400 (Sun, 20 May 2007)
New Revision: 296

Modified:
   trunk/gui_stdio.c
Log:
Print install component and type every time either changes in stdio UI's
 progress output.


Modified: trunk/gui_stdio.c
===================================================================
--- trunk/gui_stdio.c	2007-05-20 09:01:30 UTC (rev 295)
+++ trunk/gui_stdio.c	2007-05-20 09:12:53 UTC (rev 296)
@@ -21,6 +21,7 @@
 
 #include <ctype.h>
 
+static char *lastProgressType = NULL;
 static char *lastComponent = NULL;
 static uint32 percentTicks = 0;
 
@@ -88,7 +89,9 @@
 
 static void MojoGui_stdio_deinit(void)
 {
+    free(lastProgressType);
     free(lastComponent);
+    lastProgressType = NULL;
     lastComponent = NULL;
 } // MojoGui_stdio_deinit
 
@@ -399,9 +402,15 @@
                                       int percent, const char *item)
 {
     const uint32 now = entry->ticks();
-    if ((lastComponent == NULL) || (strcmp(lastComponent, component) != 0))
+
+    if ( (lastComponent == NULL) ||
+         (strcmp(lastComponent, component) != 0) ||
+         (lastProgressType == NULL) ||
+         (strcmp(lastProgressType, type) != 0) )
     {
+        free(lastProgressType);
         free(lastComponent);
+        lastProgressType = entry->xstrdup(type);
         lastComponent = entry->xstrdup(component);
         printf("%s\n%s\n", type, component);
     } // if




More information about the mojosetup-commits mailing list