poldek: poldek/misc.c - display summary line by line (cause of log...

mis mis at pld-linux.org
Sun Feb 24 14:20:24 CET 2008


Author: mis                          Date: Sun Feb 24 13:20:24 2008 GMT
Module: poldek                        Tag: HEAD
---- Log message:
- display summary line by line (cause of log message size limit)

---- Files affected:
poldek/poldek:
   misc.c (1.61 -> 1.62) 

---- Diffs:

================================================================
Index: poldek/poldek/misc.c
diff -u poldek/poldek/misc.c:1.61 poldek/poldek/misc.c:1.62
--- poldek/poldek/misc.c:1.61	Sat Feb  2 12:53:46 2008
+++ poldek/poldek/misc.c	Sun Feb 24 14:20:19 2008
@@ -367,7 +367,7 @@
     } else {
         int ncol = 2, term_width, prefix_printed = 0;
         const char *p, *colon = ", ";
-        tn_buf *nbuf = n_buf_new(2048);
+        tn_buf *nbuf = n_buf_new(512);
         
         term_width = poldek_term_get_width() - 5;
         ncol = strlen(prefix) + 1;
@@ -382,8 +382,11 @@
             	
             p = pkg_id(pkg);
             if (ncol + (int)strlen(p) >= term_width) {
+                msgn(verbose_l, "%s", (char*)n_buf_ptr(nbuf));
+                
+                n_buf_clean(nbuf);
                 ncol = 3;
-                n_buf_printf(nbuf, "\n%s ", prefix);
+                n_buf_printf(nbuf, "%s ", prefix);
             }
         
             if (--npkgs == 0)
@@ -394,8 +397,10 @@
 
         if (prefix_printed)
             n_buf_printf(nbuf, "\n");
+
+        if (n_buf_size(nbuf) > 0)
+            msg(verbose_l, "%s", (char*)n_buf_ptr(nbuf));
         
-        msg(verbose_l, "%s", (char*)n_buf_ptr(nbuf));
         n_buf_free(nbuf);
     }
 }
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/misc.c?r1=1.61&r2=1.62&f=u



More information about the pld-cvs-commit mailing list