| 1 |
Change log |
| 2 |
|
| 3 |
1.49 |
| 4 |
|
| 5 |
Fix a bug where I was handling a string::find return value in a bad way. |
| 6 |
You should probably upgrade to this. |
| 7 |
|
| 8 |
1.48 |
| 9 |
|
| 10 |
Change output pic to be more amenable to dpic implementation of pic. |
| 11 |
See https://github.com/snorerot13/grap/pull/4 . |
| 12 |
|
| 13 |
1.47 |
| 14 |
|
| 15 |
Simplify autoconf for portability and (I hope) modernity. The grap.spec is |
| 16 |
also updated and may even be easier to use. |
| 17 |
|
| 18 |
1.46 |
| 19 |
|
| 20 |
Handle multiple label lines correctly (thanks to Bruce Lilly for pointing that |
| 21 |
out). |
| 22 |
|
| 23 |
Be more careful about scaling rand() returns. |
| 24 |
|
| 25 |
1.45 |
| 26 |
|
| 27 |
Eric Raymond caught a typo in the grap man page. |
| 28 |
|
| 29 |
Various small code changes to remove clang and recent g++ warnings. |
| 30 |
|
| 31 |
1.44 |
| 32 |
|
| 33 |
Modern g++ seems to dislike *printf without a constant format string if there |
| 34 |
are no other arguments and was causing compiles to fail. Fixed warning |
| 35 |
and patch from Tobias Quathamer. |
| 36 |
|
| 37 |
Manpage spelling fix from Tobias Quathamer. |
| 38 |
|
| 39 |
John Heidemann pointed out that plot doesn't accept modifiers to strings |
| 40 |
(though he didn't phrase it that way). The short form is that |
| 41 |
|
| 42 |
plot bullet at x,y |
| 43 |
|
| 44 |
wasn't working. I've adjusted plot to make the string modifiers into |
| 45 |
active keywords, which fixes the problem. |
| 46 |
|
| 47 |
Someone named Y T pointed out that there was no mod operator (%). There |
| 48 |
is now. |
| 49 |
|
| 50 |
This marks the transition from my home brewed Makefiles to automake-generated |
| 51 |
makefiles. A couple largely unused options went away, but with any luck |
| 52 |
we still build everywhere. |
| 53 |
|
| 54 |
Robert Daasch submitted a patch to include floor and ceil functions. |
| 55 |
That's been incorporated. (His patch also included adding a mod |
| 56 |
operator, but I'd already done that.) |
| 57 |
|
| 58 |
Added minimal support for dates, by adding versions of strftime and |
| 59 |
strptime that return and accept seconds since the unix epoch. |
| 60 |
|
| 61 |
1.43 |
| 62 |
|
| 63 |
Bruce Lilly pointed out that g++ 4.3.1 was emitting all sorts of dire |
| 64 |
warnings about the hash_map data structure and associated support being |
| 65 |
pulled from g++ in the future. SuSe seems to ship with this and there's |
| 66 |
no point scaring people (or letting a time bomb tick). Grap now detects |
| 67 |
and uses unordered_map if it's present on your system, which stops the |
| 68 |
wailing and gnashing of teeth from g++ 4.3.1 . That g++ version also |
| 69 |
requires a compiler option to support that include file, which we also |
| 70 |
autodetect and use. (This is essentially autodetecting the flags described in |
| 71 |
the changes to grap 1.41 below, along with some code changes to make that |
| 72 |
actually function correctly.) |
| 73 |
|
| 74 |
A fellow named Fergus had a Cygwin compilation problem as well. His |
| 75 |
system apparently had rand but not random (a very rare configuration |
| 76 |
these days). This led me to find a corner of the autoconf code that I |
| 77 |
apparently hadn't checked sufficiently. If rand was found and a |
| 78 |
declaration made in the system files, the grap config stuff failed to |
| 79 |
note the declaration and made its own incompatible one. This should be |
| 80 |
gone now. |
| 81 |
|
| 82 |
Fergus's system also seemed to be lacking snprintf - which again is very |
| 83 |
odd. I hadn't reflected the change to grap sprintf in version 1.23 into |
| 84 |
the code that emulates snprintf on systems without it. That code has |
| 85 |
been added. |
| 86 |
|
| 87 |
Changed the examples to include a brief tutorial on string matching in |
| 88 |
grap. Suggested by John Heidemann. |
| 89 |
|
| 90 |
1.42 |
| 91 |
|
| 92 |
There's been a long standing bug with how different versions of pic |
| 93 |
interpret the "line from (x,y) then down 5" construct. There was once a |
| 94 |
bug report at |
| 95 |
http://lists.gnu.org/archive/html/groff/2008-03/msg00003.html |
| 96 |
about this. As of version 1.42 grap no longer outputs this pic construct. |
| 97 |
|
| 98 |
Dan Lasley pointed out that the key was incomplete for the bar graph example. |
| 99 |
His fix to restore the key is included. |
| 100 |
|
| 101 |
John Heidemann points out that bars in coordinate systems other than the |
| 102 |
default just didn't work. This was a bug in my yacc grammar - for |
| 103 |
heaven's sake. It's corrected to match the manual page. |
| 104 |
|
| 105 |
For loops were strange in that |
| 106 |
|
| 107 |
.G1 |
| 108 |
for xx from 15 to 13 do { print "YYY" } |
| 109 |
print "ZZZZ" |
| 110 |
.G2 |
| 111 |
|
| 112 |
would loop infinitely. xx never passes 13. Added a test to make that a |
| 113 |
null loop as well as making |
| 114 |
|
| 115 |
.G1 |
| 116 |
for xx from 13 to 13 do { print "YYY" } |
| 117 |
print "ZZZZ" |
| 118 |
.G2 |
| 119 |
|
| 120 |
print one "YYY". You can still confuse loops, using strange by clauses |
| 121 |
- for example "by 0" or "by * -1" but common cases should be covered. |
| 122 |
|
| 123 |
Spotted by a fellow named Yuval. |
| 124 |
|
| 125 |
Found a lurking initializer bug while fixing the for loop thing. |
| 126 |
|
| 127 |
I added references to standard plot strings in a couple places to make |
| 128 |
them somewhat easier to find. |
| 129 |
|
| 130 |
1.41 |
| 131 |
|
| 132 |
Small changes to compile without warnings under g++ 4.2.0 and to find and |
| 133 |
use ext/hash_map under g++ versions that include it. |
| 134 |
|
| 135 |
Incorporated Tobias Toedter's patch to the grap.spec. I'd found another |
| 136 |
place to misspell "Kernighan" and Tobias fixed it. |
| 137 |
|
| 138 |
Got rid of an ambiguous else construct in grap_pic.cc |
| 139 |
|
| 140 |
Support g++4.3.0 by either compiling under compatibility headers (with a |
| 141 |
warning) or using the c++0x standard header <unordered_map> if you set |
| 142 |
CXXFLAGS=-std=c++0x CPPFLAGS=-std=c++0x in the environment (during configure |
| 143 |
and compile). Using unordered_set avoids the warnings, but is experimental. |
| 144 |
|
| 145 |
1.40 |
| 146 |
|
| 147 |
Man, here's a weird one, care of Bruce Lilly: in previous versions doing |
| 148 |
something like this: |
| 149 |
|
| 150 |
coord temp x -2,2 y 3,4 |
| 151 |
ticks left out from temp -1 to 1 |
| 152 |
|
| 153 |
would interpret the ticks as starting from the value of the |
| 154 |
uninitialized variable temp with one subtracted from it to 1 in the |
| 155 |
default coordinate space rather than (correctly) interpreting that as |
| 156 |
ticks from -1 to 1 in the temp coordinate space. This is a two |
| 157 |
character fix to a regular expression, but a weird bug. I believe it's |
| 158 |
fixed. |
| 159 |
|
| 160 |
Bruce also discovered that the changes I put into version 1.38 to |
| 161 |
address issues raised by Hartmut Henkel affected large number |
| 162 |
comparisons in unpleasantly non-intuitive ways. Specifically doing |
| 163 |
this: |
| 164 |
|
| 165 |
coord pressure x -2.400000, 27.000000 y 1035.124000, 1039.000000 |
| 166 |
ticks right in left 0.6 from pressure 1035.200 to 1039.000000 by 0.200 |
| 167 |
|
| 168 |
Results in the top tick - the one at 1039 - being clipped because the 19 |
| 169 |
additions in the tick loop introduce enough floating point error that |
| 170 |
the limit (1039) and the index (1039+epsilon) differ by a large enough |
| 171 |
value that the loop terminates one iteration early. Essentially the <= |
| 172 |
at the top of the tick loop fails because the error induced by the 19 |
| 173 |
additions accumulates to be detectable. |
| 174 |
|
| 175 |
I've reverted the default comparison thresholds back to their pre-1.38 |
| 176 |
levels; numbers must differ by more than 1e-6 to be considered different |
| 177 |
by grap. For people who explicitly want to work with very small |
| 178 |
quantities directly - a decision I still disagree with - the -r flag has |
| 179 |
been added to make grap use the system's idea of what the smallest |
| 180 |
comparable numbers are (the 1.38 and 1.39 behavior). The output of -v |
| 181 |
or -h lists these two values and the manual page documents the flags. |
| 182 |
|
| 183 |
I've updated the grap.spec to one donated by John Heidemann. Linux guys |
| 184 |
should have it easier. |
| 185 |
|
| 186 |
1.39 |
| 187 |
|
| 188 |
Martin Michlmayr noticed a typo that upsets gcc 4.1, though earlier |
| 189 |
versions don't even generate a warning (Grrrr). (Original report at |
| 190 |
<http://bugs.debian.org/357184>.) This is fixed. I didn't issue a new |
| 191 |
FreeBSD port, because it doesn't change anything functionally. I also |
| 192 |
cleaned up the man page a bit, and Tobias Toedter fixed a couple typos in the |
| 193 |
man page and the README file. Always troubling to misspell the inventor's |
| 194 |
name. |
| 195 |
|
| 196 |
1.38 |
| 197 |
|
| 198 |
Michail Vidiassov suggests that a DESTDIR variable be added to the |
| 199 |
Makefile to allow staged installs or temporary installs or other stuff. |
| 200 |
Setting DESTDIR when making install or deinstall will create a tree |
| 201 |
under DESTDIR that contains the full grap install. E.g., |
| 202 |
|
| 203 |
make DESTDIR=/usr/tmp install |
| 204 |
|
| 205 |
Does something like: |
| 206 |
|
| 207 |
/usr/bin/install -c -d /usr/tmp/usr/local/share/doc/grap || true |
| 208 |
/usr/bin/install -c -m 644 README CHANGES COPYRIGHT grap.man |
| 209 |
/usr/tmp/usr/local/share/doc/grap |
| 210 |
strip grap || true |
| 211 |
/usr/bin/install -c -d /usr/tmp/usr/local/bin || true |
| 212 |
/usr/bin/install -c -d /usr/tmp/usr/local/man/man1 || true |
| 213 |
/usr/bin/install -c -d /usr/tmp/usr/local/share/grap || true |
| 214 |
/usr/bin/install -c -d /usr/tmp/usr/local/share/examples/grap || true |
| 215 |
/usr/bin/install -c grap /usr/tmp/usr/local/bin |
| 216 |
/usr/bin/install -c -m 644 grap.1 /usr/tmp/usr/local/man/man1 |
| 217 |
/usr/bin/install -c -m 644 grap*.defines /usr/tmp/usr/local/share/grap |
| 218 |
/usr/bin/install -c -m 644 examples/*.d examples/example.ms \ |
| 219 |
examples/*.result examples/Makefile \ |
| 220 |
/usr/tmp/usr/local/share/examples/grap |
| 221 |
|
| 222 |
There is a possibility of munging the manpage by doing this, but that's |
| 223 |
actually pretty difficult, and the modifications below to print install |
| 224 |
locations will still print the original (that is DESTDIR-free) install |
| 225 |
locations. |
| 226 |
|
| 227 |
Warner Lemberg found a bunch of bad typesetting in the examples, and I |
| 228 |
hope much of that is fixed. He also pointed out that configure should |
| 229 |
allow installers to place documentation and examples where their system |
| 230 |
likes them. I've altered the configuration script to accept these |
| 231 |
locations as --with arguments (--help lists them). grap -v or grap -h |
| 232 |
(or the long versions: grap --version/grap --help) prints out the |
| 233 |
examples/documentation locations and that new behavior is documented in |
| 234 |
the manual page. (The locations aren't directly given in the man page, |
| 235 |
because the ASCII and postscript versions of the manual are created |
| 236 |
before the source tar file is so that grap man pages can be installed |
| 237 |
places that don't have doc manual pages). |
| 238 |
|
| 239 |
Fixed a bug where lines acquired the lindescription of the last drawn line. |
| 240 |
This was a typo level error that just never got exercised. Thanks to Steve |
| 241 |
Blinkhorn for finding it. Steve also points out that thickness |
| 242 |
attributes on frames were being ignored. They're not anymore, but |
| 243 |
they're of limited usefulness and they don't thicken the ticks. The |
| 244 |
easiest way to draw a thick frame with thick ticks is: |
| 245 |
|
| 246 |
.G1 |
| 247 |
pic linethick=5 |
| 248 |
frame |
| 249 |
.\" ticks statement here |
| 250 |
pic linethick=1 |
| 251 |
draw solid bullet |
| 252 |
next at 1,2 |
| 253 |
next at 3,4 |
| 254 |
.G2 |
| 255 |
|
| 256 |
That draws a thick frame and thin line. |
| 257 |
|
| 258 |
I integrated some changes suggested by Hartmut Henkel to better handle graphing |
| 259 |
small numbers. I didn't include his patch exactly, but I think that most of |
| 260 |
the functionality has been added. His test cases look the same. If you're |
| 261 |
graphing things in the 1e-30 range, you should see autoscaling and not have |
| 262 |
your graph stop at 1e-6, assuming that your compiler has <limits>. I really |
| 263 |
think it's a bad idea to graph in that domain, as the math with numbers that |
| 264 |
small can be really hairy, and grap isn't exactly tuned for numerical analysis. |
| 265 |
But I think we do better now. |
| 266 |
|
| 267 |
1.37 |
| 268 |
|
| 269 |
Fixed an error handling bug where an error at end of file/line could cause a |
| 270 |
core dump. Yuk. |
| 271 |
|
| 272 |
1.36 |
| 273 |
|
| 274 |
Joel M. Cook pointed out that |
| 275 |
|
| 276 |
plot "\(bu" at 0, -306 |
| 277 |
|
| 278 |
didn't work. grap was requiring a numeric expression before the format |
| 279 |
string. I think I've had that discussion before, but I decided to |
| 280 |
support the behavior this time. Now both the expression and the format |
| 281 |
string are optional. plot at x,y will plot a 0 at x,y. plot "x" at x,y |
| 282 |
is exactly equivalent to "x" at x,y in output, but slightly slower. |
| 283 |
plot 3 at x,y works as before as does plot 2 "%g of clubs" at x,y |
| 284 |
|
| 285 |
I also modified the grammar to accept the base and wid parameters to bar |
| 286 |
in any order. |
| 287 |
|
| 288 |
1.35 |
| 289 |
|
| 290 |
Changes to lex code to compiler under newer versions of lex and |
| 291 |
configure code to activate them. Several people pointed out the problem |
| 292 |
and I like Bruce Lilly's solution best. Configure bugs are all mine. |
| 293 |
|
| 294 |
Bruce Lilly also noticed that copy statements with a macro and neither an |
| 295 |
until nor a filename didn't work as they should. He provided the fix |
| 296 |
for that. |
| 297 |
|
| 298 |
Bill Ward pointed out that grap should support gpic's "thickness" just |
| 299 |
like the color attributes. So now it does. |
| 300 |
|
| 301 |
And an apology to R. Clayton who sent patches for this very thing that I |
| 302 |
lost until after I'd implemented. |
| 303 |
|
| 304 |
1.32: Whoops. Color modifiers were mis parsed in implicit plot statements. |
| 305 |
Now things like : |
| 306 |
|
| 307 |
bullet color "blue" at 1, 3 |
| 308 |
|
| 309 |
work. |
| 310 |
|
| 311 |
Minor code tweaks to make grap compile under g++ 3.4.2 |
| 312 |
|
| 313 |
1.31: In compatibility mode grap will no longer add whitespace around graphs. |
| 314 |
I like it, but Yuval Tamir rightly complained. |
| 315 |
|
| 316 |
1.30: Made the undocumented color commands support GNU pic color commands. In |
| 317 |
other words added color to grap. Probably the easiest place to see the syntax |
| 318 |
is the new example added to the examples file. The changes are on the manual |
| 319 |
page, too, but the example sets basically everything that can be set, so it's a |
| 320 |
good example. |
| 321 |
|
| 322 |
1.27: A couple compilation bugs reported under later g++ versions by a couple |
| 323 |
people have been fixed. Brian Mays caught a clipping bug, and Bruce Lilly also |
| 324 |
caught a couple compiler dependencies. |
| 325 |
|
| 326 |
1.26: .lf was appearing outside the PS/PE pairs, so I disabled generation of |
| 327 |
those lines. |
| 328 |
|
| 329 |
1.25: Fixed a bug parsing draw/new with no line descriptions. Thanks to |
| 330 |
Robert W. Numrich for spotting it. |
| 331 |
|
| 332 |
Cygwin seems to need errno.h to declare errno in grap_lex.l. I added the |
| 333 |
machinery to look for it and use it if it's there. I also added a couple |
| 334 |
missing semi-colons to grap.y to shut bison up. |
| 335 |
|
| 336 |
Added the clipped and unclipped attributes to allow plot statements to place |
| 337 |
strings outside the frame. |
| 338 |
|
| 339 |
Tuned the makefile so you can use pmake in parallel. |
| 340 |
|
| 341 |
1.23: made it possible to disable sprintf and other calls to sprintf(3) |
| 342 |
with a user given format string, which is a potential security hole. |
| 343 |
|
| 344 |
Fixed a plot bug I found while disabling that. |
| 345 |
|
| 346 |
1.22: John Heidemann caught a bug with respect to large sizes and size |
| 347 |
changes in titles. Those large size changes are now supported. Generally |
| 348 |
the groff [] syntax is now used for the embedded \s commands that size |
| 349 |
generates. This can be turned off by using -C. |
| 350 |
|
| 351 |
John also wanted to be able to specify string modifiers like size, etc. |
| 352 |
on ticks. Now ticks, grids, and plot strings (e.g. in a new or draw |
| 353 |
statement) all take string modifiers. grap.defines has been changed to |
| 354 |
support and encourage this usage. |
| 355 |
|
| 356 |
A bug where a null graph was output when only a draw statement was given |
| 357 |
has been corrected. |
| 358 |
|
| 359 |
sprintf processing has been revamped to more directly follow sprintf |
| 360 |
syntax. As a result, a limitation on the number of parameters (10) has |
| 361 |
been introduced. |
| 362 |
|
| 363 |
As a result of using string attributes on plotting strings, the name of |
| 364 |
the default line has become user-visible. Changing |
| 365 |
grap_internal_default via new will change the default lines for the rest |
| 366 |
of the graph. It's not encouraged. |
| 367 |
|
| 368 |
1.21: Allow redefinition of keywords as macros. In the process, I |
| 369 |
added an undefine keyword to do the obvious: remove a macro. |
| 370 |
|
| 371 |
Added xy_gg macros, too. |
| 372 |
|
| 373 |
Fixed a bug where giving a coordinate name before a parenthesized point |
| 374 |
caused a syntax error. Thanks to Kees Zeelenberg for spotting this. |
| 375 |
|
| 376 |
Added an srand function to seed the random number generator, though |
| 377 |
there's none documented in Kernighan and Bentley's grap, and a getpid |
| 378 |
function to get a (sort of) random number. Don't use this for key |
| 379 |
generation. W. Robert Daasc caught this omission. |
| 380 |
|
| 381 |
While I was in there, I discovered that rand was not returning its |
| 382 |
full range from [0,1). It does now. |
| 383 |
|
| 384 |
Some keywords that accept strings weren't accepting sprintf, some of |
| 385 |
them have been fixed. |
| 386 |
|
| 387 |
Lee Ji Hwan found a bug with large files being read thru macros |
| 388 |
causing a core dump. That has been fixed. It was a really |
| 389 |
embarrassing coding style error, too... |
| 390 |
|
| 391 |
John Aycock discovered a bug where a line style was ignored on the first |
| 392 |
line command executed. It's not ignored anymore. |
| 393 |
|
| 394 |
I also found a bug in the execution order of copy through macros, |
| 395 |
although I'm uncertain if a version was ever released with the bug |
| 396 |
intact. I think this may have been related to Lee Ji Hwan's bug, |
| 397 |
which means it probably hasn't seen the light of day. |
| 398 |
|
| 399 |
-h prints a usage summary. --help is a synonym for -h and --version is a |
| 400 |
synonym for -v. |
| 401 |
|
| 402 |
1.20: The big jump reflects both internal changes and visible feature |
| 403 |
changes. The class structure in the code has been substantially |
| 404 |
revamped, and the code brought into better conformance with the |
| 405 |
current state of the C++ world. As of version 1.20, grap no longer |
| 406 |
attempts to compile under g++ 2.7.2. grap 1.11 source will remain |
| 407 |
available from http://www.lunabase.org/~faber/Vault/software/grap for |
| 408 |
those who need it. |
| 409 |
|
| 410 |
One feature change is that troff and pic commands are now placed |
| 411 |
correctly in their relative order rather than being collected before |
| 412 |
and after the graph. This required specifying more carefully where |
| 413 |
the frame generation is placed. Frames are output either immediately |
| 414 |
before the first plotted object or after the frame statement, if any. |
| 415 |
This change motivated much of the class changes and actually cleaned |
| 416 |
them up somewhat. |
| 417 |
|
| 418 |
grap is now *much* more tolerant of variables with the keyword names. |
| 419 |
Things like |
| 420 |
|
| 421 |
from=1; to = 10 |
| 422 |
for i from from to to do { ... } |
| 423 |
|
| 424 |
now work. This is due to a sizable rewrite of the tokenizer. In |
| 425 |
fact, variables and coordinate spaces can share names. Things like: |
| 426 |
|
| 427 |
for next = 0 to 10 do { |
| 428 |
next at next next, next |
| 429 |
} |
| 430 |
|
| 431 |
now work (you have to add a couple ticks statements to really see that |
| 432 |
example). I'd say we're to the point where obfuscated grap programs |
| 433 |
are a possibility. |
| 434 |
|
| 435 |
The only change this necessitated was that if you specify a coordinate |
| 436 |
system in an automatic ticks statement, you have to use the on or auto |
| 437 |
keyword. See the examples document for an example. |
| 438 |
|
| 439 |
I recoded macros to remove an antiquated construct that was confusing |
| 440 |
some non-g++ compilers. A static array was recoded as an STL vector, |
| 441 |
with the result that an artificial constraint on the number of |
| 442 |
arguments in a macro went away. |
| 443 |
|
| 444 |
Part of the recoding of the tokenizer encoded a large data structure |
| 445 |
in a file called grap_tokenizer.cc. The code is striaght-ahead |
| 446 |
initialization, but it drives the g++ optimizer stone crazy. |
| 447 |
(Optimizing this function is very memory intensive.) By default, |
| 448 |
optimization is specifically disabled under g++. You can override |
| 449 |
that behavior by specifying --enable-optimize-grap_tokenizer to |
| 450 |
./configure. On the machines I use, optimizing this module has |
| 451 |
absolutely no effect on performance, and I suggest you don't bother |
| 452 |
spending the time optimizing it. |
| 453 |
|
| 454 |
The autoconf and make stuff has been revamped to use GNU make's |
| 455 |
automatic makefile generation or BSD pmake's automatic .depend |
| 456 |
inclusion, as well as simplifying the distribution creation and |
| 457 |
caching all configuration values. |
| 458 |
|
| 459 |
Added some GNU standard Makefile targets to the Makefile. |
| 460 |
|
| 461 |
Fixed some bugs in the manual page. |
| 462 |
|
| 463 |
Ran spell again on the examples. Misspelling Brian Kernighan's name |
| 464 |
is bad. |
| 465 |
|
| 466 |
Many additional compatibility changes suggested by Bruce Lilly. |
| 467 |
|
| 468 |
1.11: Strings are now clipped, thanks to John Heidemann for finding the error. |
| 469 |
|
| 470 |
1.10: Cleaned up the automatic tick generation and fixed a bug in |
| 471 |
there, too. |
| 472 |
|
| 473 |
Allow reassignment of coordinate system parameters, e.g., |
| 474 |
.G1 |
| 475 |
coord test |
| 476 |
copy "examples/cy_fatal.d" |
| 477 |
coord test x 1980,2000 |
| 478 |
.G2 |
| 479 |
|
| 480 |
Default line format now uses the bullet macro if it's defined. The |
| 481 |
coord statement now will accept multiple log scale modifiers. The |
| 482 |
statement |
| 483 |
|
| 484 |
coord x 1,1000 log x log y |
| 485 |
|
| 486 |
is now legal. x and y are now legal variable names. They used to be |
| 487 |
language tokens, and in fact still are, although their scope as tokens |
| 488 |
is now limited to coord statements. |
| 489 |
|
| 490 |
Tried to streamline the use of for_each and functors by removing |
| 491 |
trivial calls to for_each. Still trying to move code out of grap.y to |
| 492 |
make it shorter to compile. |
| 493 |
|
| 494 |
Simplified expression grammar by disallowing logical expressions |
| 495 |
outside if statements. I also caught another memory leak here. |
| 496 |
|
| 497 |
Signifying a line break by using new (or draw) now works. So code like |
| 498 |
.G1 |
| 499 |
draw solid |
| 500 |
next at 2,4 |
| 501 |
next at 3,5 |
| 502 |
new |
| 503 |
next at 4,6 |
| 504 |
next at 5,7 |
| 505 |
.G2 |
| 506 |
produces 2 solid line segments. This forced a little rethinking of |
| 507 |
the syntax for changing the properties of a line using new/draw. The |
| 508 |
implementation is on the man page. If it breaks existing grap |
| 509 |
scripts, I'd love to hear about it. |
| 510 |
|
| 511 |
Grids support similar syntax to that of ticks for explicitly |
| 512 |
requesting automatic grid generation. |
| 513 |
|
| 514 |
Automatic tock or grid generation can now be requested relative to a |
| 515 |
named coordinate system, formerly automatic ticks/grid lines were only |
| 516 |
generated for the default coordinate system. |
| 517 |
|
| 518 |
Added the ln function. Why did that take me so long? |
| 519 |
|
| 520 |
Revised and (finally) spell-checked the man page. I also stopped |
| 521 |
including the auto-generated manual page in an macros. A text version |
| 522 |
of the man page is now installed, but the manual uses the doc macros |
| 523 |
exclusively. |
| 524 |
|
| 525 |
Line clipping was added in here, too. |
| 526 |
|
| 527 |
1.06: Added an anonymous donor's TeX defines. Also added the -C |
| 528 |
compatibility option for groff and fixed some manpage formatting bugs. |
| 529 |
|
| 530 |
1.05: [email protected] noticed that numbers like 1. weren't |
| 531 |
accepted. They are now. While I was fixing that I noticed that copy |
| 532 |
until commands without a macro weren't supported. They are now. Made |
| 533 |
a minor change to the examples to test the fixes. |
| 534 |
|
| 535 |
1.03: Added the -M path option to make groff handle grap better. I |
| 536 |
also added the GRAP_DEFINES environment variable to change the defines |
| 537 |
file. I also added a new source file, grap_parse.cc in an attempt to |
| 538 |
break up the monolithic and gigantic grap.y. I had some small |
| 539 |
success. In the course of creating grap_parse.cc I think I caught |
| 540 |
some memory leaks, too. |
| 541 |
|
| 542 |
1.02: Bruce's error handling code produced a few inconsistencies |
| 543 |
(eating the last newline of a file, and adding one before the file. I |
| 544 |
think it no longer does that. In addition I took care of a error |
| 545 |
placement bug when the error was in a line containing a macro |
| 546 |
expansion, and changed the error handling from using char * to using |
| 547 |
Strings, like the rest of grap. |
| 548 |
|
| 549 |
Got rid of an error on SunOS (and presumably other architectures) |
| 550 |
where -0 labels were printed on auto-generated labels. |
| 551 |
|
| 552 |
Fixed bugs in sprintf when compiled using standard strings. |
| 553 |
|
| 554 |
Fixed a memory leak and general bug with the undocumented color |
| 555 |
commands. (There, that'll tell me if anyone reads this!) |
| 556 |
|
| 557 |
1.01: Fixed a compilation bug under RedHat 6.1. Cleaned up autoconf |
| 558 |
and tweaked the makefile. |
| 559 |
|
| 560 |
1.0: Incorporated Bruce Lilly's error reporting code. Cleaned up the |
| 561 |
documents (including a mention for Bruce in the man page) for v1.0 |
| 562 |
release. Cleared up a file reading bug. |
| 563 |
|
| 564 |
0.98b: Bruce Lilly reported some bugs and DWP incompatibilities, |
| 565 |
mainly with negative numbers in number lists and comma separations in |
| 566 |
them. He also compiles in UWIN under NT, which broke autoconf in some |
| 567 |
weird ways. The most important of these necessitated adding a check |
| 568 |
to ensure that install supports -d. |
| 569 |
|
| 570 |
His test case is in the example file now. He also found some spelling |
| 571 |
errors. |
| 572 |
|
| 573 |
The README file now reflects the real state of the world, too. More |
| 574 |
kudos to Bruce. |
| 575 |
|
| 576 |
While tinkering with those autoconf changes I found that grap didn't |
| 577 |
compile under g++ 2.7.2.1 any more. Good thing that 0.97b wasn't |
| 578 |
really released. All is well again. |
| 579 |
|
| 580 |
More fun from Bruce: he's given me patches to make cascading |
| 581 |
assignments work and to remove a bug with comments not acting as |
| 582 |
separators. |
| 583 |
|
| 584 |
I've also make the order of copy commands more flexible (the until can |
| 585 |
go before or after an inline macro, for example) and fixed a bug in |
| 586 |
the grammar that made it difficult to put general expressions in |
| 587 |
places like the frame size. Expressions can go anywhere now, at the |
| 588 |
expense that string comparisons can only appear in if statements. |
| 589 |
Those bugs were also spotted by Bruce. |
| 590 |
|
| 591 |
0.97b: Finally have a copy of egcs, so grap will now compile under it |
| 592 |
using both the stl and the standard string class. What do you know, |
| 593 |
compiling under egcs halves the run time. This is roughly half due to |
| 594 |
better egcs compilation and half due to the better performance of the |
| 595 |
standard string class. |
| 596 |
|
| 597 |
Moved to a config.h-style grap.h. Smoothed out the header files to |
| 598 |
confine as much conditional compilation as possible to grap.h. |
| 599 |
|
| 600 |
The code now uses hash_maps if they're available. |
| 601 |
|
| 602 |
0.95b: bug fix: deleting grap_buffer_state contents twice on error, allow |
| 603 |
more than one shift description on ticks, grids, and labels. Thanks to |
| 604 |
Anindo Banerjea at ISI for spotting my misimplementation. |
| 605 |
|
| 606 |
Another couple of Bannerjea catches: through is now recognized as a |
| 607 |
synonym for thru. "For," "then" and "else" clauses were previously |
| 608 |
treated as macros but now have a terminating separator added to them. |
| 609 |
The result is that things like |
| 610 |
|
| 611 |
if (x == 3) { y = y + 1 } |
| 612 |
x = x + 1 |
| 613 |
|
| 614 |
work now. (If the { } is treated as a macro defined and expanded on |
| 615 |
the spot, the grap parser sees y = y + 1x = x + 1 and cannot parse the |
| 616 |
expression y+1x). The new behavior is both more intuitive and more in |
| 617 |
line with previous grap implementations. |
| 618 |
|
| 619 |
More from Anindo: expansion of macro arguments assumed that the only |
| 620 |
possible character following a dollar sign was a single digit. This |
| 621 |
caused problems both when a non-digit followed and the $ was literal, |
| 622 |
and when the intent was to access an argument with an index greater |
| 623 |
than 9. Argument expansion now only expands when a $ is followed by 1 |
| 624 |
or more digits, and includes all the digits in the index. |
| 625 |
|
| 626 |
The frame statement will now accept the default line style before or |
| 627 |
after the frame size. I still don't accept things like frame ht 3 |
| 628 |
solid wid 3 - the specifications of the size must be contiguous. |
| 629 |
|
| 630 |
0.92a: bug fix - string equality check. Small change to Makefile.in |
| 631 |
to support default Solaris behavior. Added -v for version info. Some |
| 632 |
general internals fiddling (I'd like to call it cleanup, but I think |
| 633 |
that's generous). |
| 634 |
|
| 635 |
0.91a: small changes for the RPM |
| 636 |
|
| 637 |
0.9a: Added commands for making bars. |
| 638 |
|
| 639 |
Error reporting is much closer to the correct line now. |
| 640 |
|
| 641 |
Generalized line descriptions for fillable objects. |
| 642 |
|
| 643 |
Circles now take a line description. Added new examples of fillable |
| 644 |
objects. |
| 645 |
|
| 646 |
Now using the BSD copyright notice instead of my own half-baked one. |
| 647 |
|
| 648 |
0.8a: alpha release |