[rrd-developers] Re: RRDGraph - formatting marker 'g' in [G]PRINF

Tarmo Ainsaar Tarmo.Ainsaar at eenet.ee
Mon Nov 18 21:20:54 MET 2002


Patch itself:

diff -ru rrdtool-1.0.40.orig/CHANGES rrdtool-1.0.40/CHANGES
--- rrdtool-1.0.40.orig/CHANGES	Fri Oct 11 21:38:54 2002
+++ rrdtool-1.0.40/CHANGES	Mon Nov 18 20:07:08 2002
@@ -2,6 +2,9 @@
 ---------------------------
 - bugfix, + enhancement, * contrib, = RELEASE
 ---------------------------------------------
++ 2002/11/18 Tarmo Ainsaar <Tarmo.Ainsaar at eenet.ee>
+  new formatting marker '%lg' for [G]PRINT
+
 = 1.0.40 2002/10/11 -- Tobi

 - 2002/10/11 Jeffrey Wheat <jeff at nt.cetlink.net>
diff -ru rrdtool-1.0.40.orig/doc/rrdgraph.pod rrdtool-1.0.40/doc/rrdgraph.pod
--- rrdtool-1.0.40.orig/doc/rrdgraph.pod	Thu Jun 20 09:16:56 2002
+++ rrdtool-1.0.40/doc/rrdgraph.pod	Mon Nov 18 18:32:40 2002
@@ -435,7 +435,7 @@

 Calculate the chosen consolidation function I<CF> over the data-source
 variable I<vname> and C<printf> the result to stdout using I<format>.
-In the I<format> string there should be a '%lf' or '%le' marker in the
+In the I<format> string there should be a '%lf', '%le' or '%lg' marker in the
 place where the number should be printed.

 If an additional '%s' is found AFTER the marker, the value will be scaled
diff -ru rrdtool-1.0.40.orig/src/rrd_graph.c rrdtool-1.0.40/src/rrd_graph.c
--- rrdtool-1.0.40.orig/src/rrd_graph.c	Fri Oct 11 21:39:47 2002
+++ rrdtool-1.0.40/src/rrd_graph.c	Mon Nov 18 18:29:50 2002
@@ -3358,9 +3358,9 @@
                  if (*ptr == '.') ptr++;
                  while (*ptr >= '0' && *ptr <= '9') ptr++;

-                 /* Either 'le' or 'lf' must follow here */
+                 /* Either 'le', 'lf' or 'lg' must follow here */
                  if (*ptr++ != 'l') return 1;
-                 if (*ptr == 'e' || *ptr == 'f') ptr++;
+                 if (*ptr == 'e' || *ptr == 'f' || *ptr == 'g') ptr++;
                  else return 1;
                  n++;
              }

--
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