| 1 |
This is grap, an implementation of Kernighan and Bentley's grap |
| 2 |
language for typesetting graphs. I got sick of groff not having a |
| 3 |
version of grap, so I built one. |
| 4 |
|
| 5 |
The code is distributed under the FreeBSD-style copyright: |
| 6 |
|
| 7 |
Copyright 1998-2009 |
| 8 |
Ted Faber |
| 9 |
All rights reserved. |
| 10 |
|
| 11 |
Redistribution and use in source and binary forms, with or without |
| 12 |
modification, are permitted provided that the following conditions are |
| 13 |
met: |
| 14 |
|
| 15 |
|
| 16 |
Redistributions of source code must retain the above |
| 17 |
copyright notice, this list of conditions and the |
| 18 |
following disclaimer. |
| 19 |
|
| 20 |
Redistributions in binary form must reproduce the |
| 21 |
above copyright notice, this list of conditions and the |
| 22 |
following disclaimer in the documentation and/or other |
| 23 |
materials provided with the distribution. |
| 24 |
|
| 25 |
THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY |
| 26 |
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 27 |
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 28 |
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS |
| 29 |
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 30 |
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 31 |
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 32 |
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 33 |
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 34 |
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 35 |
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 36 |
|
| 37 |
That text is reproduced in the COPYRIGHT file, too. Changes are in |
| 38 |
CHANGES. |
| 39 |
|
| 40 |
The code was all written by me, based on K&B's _Grap-A Language for |
| 41 |
Typesetting Graphs, Tutorial and User Manual_ by Jon L. Bentley and |
| 42 |
Brian W. Kernighan, revised May 1991. That paper is available from |
| 43 |
http://www.kohala.com/start/troff/troff.html as |
| 44 |
http://www.kohala.com/start/troff/cstr114.ps . You should check out |
| 45 |
the paper for a complete understanding of grap's power. grap is a pic |
| 46 |
preprocessor, so any typesetting language that can use pic can use |
| 47 |
grap. I believe that TeX can use pic, but I wouldn't be surprised if |
| 48 |
grap.defines needs to be fooled with. If you use TeX and find a set |
| 49 |
of grap.defines that work, please let me know. Some people have used |
| 50 |
the given grap.tex.defines. Modifications always welcome. |
| 51 |
|
| 52 |
If you want to generate a GNU makefile when the system make command is |
| 53 |
not GNU make, use the --enable-force-gnu-make option to configure. |
| 54 |
configure does it's best to tell if you have GNU make and create an |
| 55 |
appropriate make file, but can be confused. |
| 56 |
|
| 57 |
The man page uses the BSD macros. If your system doesn't, there's an |
| 58 |
ASCII version in grap.man, and a postscript version in grap.ps. |
| 59 |
|
| 60 |
Check out the examples in the examples directory. |
| 61 |
|
| 62 |
So far I've compiled the code on Sunos 4.1.3, Solaris 5.5.1, FreeBSD |
| 63 |
2.2.7-4.2, and an unknown RedHat Linux 6.1. It may run under other |
| 64 |
systems, and your c++ compiler and yacc/lex versions are probably more |
| 65 |
important than the type of Unix you run. Flex 2.5.4 and the yacc on |
| 66 |
FreeBSD 2.2.7 are known to work as well as later versions of bison. |
| 67 |
g++ 2.7.2.1, 2.8.1 2.95.1 and 2.95.2 have all worked. grap uses the |
| 68 |
standard template library, so that may also be a factor. The STL |
| 69 |
included with g++ works. grap has successfully compiled under UWIN |
| 70 |
(http://www.research.att.com/sw/tools/uwin/) under Windows NT with g++ |
| 71 |
2.95.1. (Yeah, it surprised me, too.) Grap has been reported to build |
| 72 |
and install correctly on OpenBSD as well. |
| 73 |
|
| 74 |
The distribution uses GNU configure. ./configure should create a |
| 75 |
viable set of makefiles. After running configure, you should be able |
| 76 |
to use make directly (specifically, make depend && make). The |
| 77 |
resulting makefile should run under most versions of make, including |
| 78 |
GNU make and FreeBSD's pmake. |
| 79 |
|
| 80 |
If you want to run the GNU autoconf tools yourself, well, $DIETY help |
| 81 |
you, but I found: |
| 82 |
|
| 83 |
$ aclocal && autoheader && automake --add-missing && autoconf |
| 84 |
|
| 85 |
is a good starting point. |
| 86 |
|
| 87 |
If you try to compile grap on a new system and have problems, let me |
| 88 |
know and I'll try to help. If you succeed, let me know. |
| 89 |
|
| 90 |
Bug reports or other correspondence to [email protected]. This |
| 91 |
program is a hobby, so understand that bug reports will be handled as |
| 92 |
I have time. The most recent stable version should always be |
| 93 |
available at http://www.lunabase.org/~faber/Vault/software/grap/ . If |
| 94 |
you're having a problem, don't hesitate to mail, because I often have |
| 95 |
a slightly pre-release version with in-progress bug fixes too. |
| 96 |
|