summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dbe71bc)
raw | patch | inline | side by side (parent: dbe71bc)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 22 Jan 2007 10:28:39 +0000 (10:28 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 22 Jan 2007 10:28:39 +0000 (10:28 +0000) |
the documentation not talking about this ... so now it is official and I bet
there will soon be people asking why this was only working at the end of a
line. -- tobi
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@967 a5681a0c-68f1-0310-ab6d-d61299d08faa
there will soon be people asking why this was only working at the end of a
line. -- tobi
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@967 a5681a0c-68f1-0310-ab6d-d61299d08faa
doc/rrdgraph_graph.pod | patch | blob | history | |
src/rrd_graph.c | patch | blob | history |
diff --git a/doc/rrdgraph_graph.pod b/doc/rrdgraph_graph.pod
index 4543d7453e44e08102745faa61d45212517afc0d..0e4f255694f867cfe265cfc1c1e7b4f93b91512c 100644 (file)
--- a/doc/rrdgraph_graph.pod
+++ b/doc/rrdgraph_graph.pod
right aligned, and B<\c> for centered. In the next section there is an
example showing how to use centered formatting.
+B<\n> is a valid alias for B<\l> since incomplete parsing in earlier
+versions of rrdtool lead to this behaviour and a number of people has been using it.
+
Normally there are two space characters inserted between every two items
printed into the graph. The space following a string can be suppressed by
putting a B<\g> at the end of the string. The B<\g> also ignores any space
diff --git a/src/rrd_graph.c b/src/rrd_graph.c
index d785331f21df4c0115c1a725802f041b4a6b71e8..08071884d67599cec8aea254576273ace120e6f5 100644 (file)
--- a/src/rrd_graph.c
+++ b/src/rrd_graph.c
}
/* only valid control codes */
if (prt_fctn != 'l' &&
+ prt_fctn != 'n' && /* a synonym for l */
prt_fctn != 'r' &&
prt_fctn != 'j' &&
prt_fctn != 'c' &&
return -1;
}
+
/* remove exess space */
+ if ( prt_fcnt == 'n' ){
+ prt_fcnt='l';
+ }
+
while (prt_fctn=='g' &&
leg_cc > 0 &&
im->gdes[i].legend[leg_cc-1]==' '){