[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Minor bug in graph from plotutils-2.4.1
From: |
Emile Talbot |
Subject: |
Minor bug in graph from plotutils-2.4.1 |
Date: |
Tue, 1 Jun 2004 22:09:46 -0400 |
Hi,
I have managed to compile plotutils-2.4.1 on DJGPP using the GCC 3.3.3
compiler and binutils 2.15. However, I had trouble getting "graph" to
work even though the compilation process had not detected any errors.
For testing purposes, I used an example from the plotutils documentation
with different output formats. I did notice that "graph" did work for
me once or twice but, more often than not, it would fail to give a valid
output file. I tried compiling it under C++ to catch type-mismatches
and again with the compile option -Wuninitialized, all without success.
>From an observation of the portable metafile output, I guessed that a
parameter relating to the y-scaling was not being initialized correctly.
After a bit more detective work, I noticed that the variable
"multigrapher->y_trans.output_min" was not being initialized to zero in
plotter.c where it definitely looked like it should be
("multigrapher->x_trans.output_min" was being initialized to zero twice
instead). That is, in the plotter.c file I have, line 1049 should be
multigrapher->y_trans.output_min = 0.0;
not
multigrapher->x_trans.output_min = 0.0;
With that modification, graph.exe seems to be working as expected.
On a different note, the DJGPP port of GCC defines the type of the first
argument of the iostream.write method to be (const char*) instead of
(const unsigned char*). Furthermore, the DJGPP port of GCC defines the
type of the fsync function (defined in <unistd.h>) to be int. Source
files
c_defplot.cc
g_flushpl.cc
g_write.cc
i_rle.cc
n_write.cc
p_defplot.cc
z_write.cc
all had to be modified slightly to cast these arguments into the type
expected by the GCC C/C++ libraries to compile correctly under C++ (for
libplotter.a).
Thanks for these utilities. I'll have to examine them more closely to
see if these plotting utilities will truly be useful to me. Certainly,
I have made good use of the GNU Compiler Collection. Again, thanks.
I do have a question, though. How, if in any way, are these GNU
plotutils related to the earlier GNUplot?
Emile Talbot
(address@hidden)
(address@hidden)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Minor bug in graph from plotutils-2.4.1,
Emile Talbot <=