[rrd-developers] printf format patch

Richard A Steenbergen ras at e-gerbil.net
Sun Apr 28 05:33:10 MEST 2002


I sent this in a while back but it seems to have been overlooked as of the 
the current cvs snapshot.

It's nice and simple, the error checker for the PRINT stuff which is 
passed to printf() is not allowing certain valid printf() style operations 
which make text alignment much more fun.

*** rrd_graph.c Mon Dec 10 00:07:04 2001
--- rrd_graph.c.new     Mon Dec 10 00:13:16 2001
***************
*** 3059,3064 ****
--- 3059,3067 ----
                        if (*ptr == 'l') {
                                ptr++;
                                if (*ptr == '\0') return 1;
+                               else if (*ptr == ' ') ptr++;
+                               else if (*ptr == '-') ptr++;
+                               else if (*ptr == '+') ptr++;
                                if (*ptr == 'e' || *ptr == 'f') {
                                        ptr++;
                                        } else { return 1; }

-- 
Richard A Steenbergen <ras at e-gerbil.net>       http://www.e-gerbil.net/ras
PGP Key ID: 0x138EA177  (67 29 D7 BC E8 18 3E DA  B2 46 B3 D8 14 36 FE B6)

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list