[rrd-developers] Re: printf format patch
Tobias Oetiker
oetiker at ee.ethz.ch
Sun Apr 28 21:12:34 MEST 2002
Today Richard A Steenbergen wrote:
> On Sun, Apr 28, 2002 at 04:15:12PM +0200, Tobias Oetiker wrote:
> >
> > Yesterday Richard A Steenbergen wrote:
> >
> > >
> > > 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; }
> > >
> >
> > checked it in .. should be in tomorrows snap
>
> Woops some bitrot occured between then and now, those else's should be
> moved up a couple lines under the *ptr == '%' not the == 'l'.
>
ok, we got
}
if (*ptr == '\0') return 1;
else if (*ptr == ' ') ptr++;
else if (*ptr == '-') ptr++;
else if (*ptr == '+') ptr++;
if (*ptr == 'l') {
ptr++;
n++;
if (*ptr == '\0') return 1;
now>
--
______ __ _
/_ __/_ / / (_) Oetiker, ETZ J97, ETH, 8092 Zurich, Switzerland
/ // _ \/ _ \/ / phoneto:+41(0)1-632-5286 faxto:+41(0)1-632-1517
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://google.com/search?q=tobi
--
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