Download

Piglet is quite small, source and documentation fitting nicely on about 1/4 of a floppy. It is known to compile cleanly on Linux (Redhat Fedora series) and Solaris operating systems.

VersionRelease Datefile size status notes
--- 09/10/08 use git repository --- --- Piglet's complete source tree is now cloneable with the git(1) revision control system. Follow the link on the left to the git repository. There are options to clone the entire database (about a megabyte), or to download a tar or zip of the latest version.
0.95e 08/15/08 piglet2008-08-14.tar.gz 259190 alpha The SET command is implemented. Piglet now inheirits environment variables from its parent process. SET with no arguments will print all ENV variables. SET with one argument will print the value of the named variable. SET with two arguments will set the value of the named variable. Piglet now uses the PATH variable when parsing commands. If the command is not an internal Piglet command, then it will be searched for in the PATH definition. If a UNIX executable is found in the PATH will be run with the standard output sent to the Piglet text window. Any variables that you SET inside piglet will be accessible inside the subshell with $VARNAME. Replaced getline() with fgets() function to make the code run on Solaris.
0.95d 02/11/07 piglet2007-02-11.tar.gz 256000 alpha Commas are now optional between coords. You can type "ADD R1 0 0 1 1;". Rebuilt all command parsers to use new getnum() routine in token.c, reducing code size by about 1000 lines. WIN :Z redraws the previous window. Fixed bug that caused double-wrapped instances to be deleted. Recursive EDI only asks if you want to reread a copy if the current copy in memory is modified. IDE prints out a line that can be cut/pasted. SMA now has a recursive option :R and a point option :P. :P is the default, but :R lets you smash many things at once by region. This is a developer's release. Write me if you want a copy.
0.95a 01/19/07 piglet2007-01-19.tar.gz 256000 alpha Fixed UNDO problem caused by bug in OPT checksumming code. Added question when re-EDIting an unSAVed cell: "Cell already in memory, read in a new copy?: (y/n)?"
0.95 01/13/07 piglet2007-01-13.tar.gz 256000 alpha Unlimited UNDO/REDO command. Works with all commands that change the drawing. A bit-for-bit copy of the cell database structure is pushed on a stack after every change. Each cell has it's own set of UNDo/REDo stacks. Changes to cells are automatically detected with a simple hash function.
0.94d 12/31/06 piglet2006-12-31.tar.gz 256000 alpha Last release of the year! Fixed a double-free memory problem that cause a repeatable core dump. Added a new zooming mechanism for people without wheel-mice. Click on a point with the middle button, move right with the button down to zoom in and left to zoom out. Some further improvements to stipples and line types. Better default process file. Thanks to Mark Mathews for the zoom suggestion!
0.94c 11/21/06 piglet2006-11-21.tar.gz 256000 alpha Mostly a bug-fix release, however better stipple fill patterns are available. EQU command has new :F option for specifying fill patterns. :F0 is unfilled, :F1 is solid fill, :F2 is 45 degree lines, etc. Better line,arc drawing. Each shape is a complete polygonal outline without the construction lines present in previous versions. Lines, Arcs now fill properly. Please let me know if you are using Piglet. It is the only thing that motivates me to keep posting updated code.
0.94 10/19/06 piglet.2006.10.19.tar.gz 256000 alpha Mouse wheel zooms and pans even while adding a line or polygon. Fixed subtle clipping problem with Sutherland/Hodgman algorithm. Text is now filled properly with "WIN :O". Added RAW mode for tokenizer as a step towards on-screen text editing. Added GPL "COPYING" file and initial start-up screen license notice. Makefile now builds dependencies automatically. SAVE code behaves more nicely when there is a permissions problem in the cells directory. Removed redundant manpage installation code in ./man/makemans script.
0.93 09/19/06 piglet.2006.09.19.tar.gz 225280 alpha STRetch command works with regions, CHA applied to TEXT, NOTES puts the selected text into the command line history buffer. DEL by region (:R) works. Better HELp messages (gives syntax synopsis). Spent some time with valgrind program closing several memory leaks. Valgrind is great! ADD NOTE and ADD TEXT have :J options to add text anchored to the N,S,E,W,NE,NW,SE,SW sides/corners or "C" for centered.
0.92 08/25/06 piglet.2006.08.25.tar.gz 235520 alpha STRetch command can change vertices of arcs, lines, polys, rects and adjust circle diameters. It defaults to MOV behavior for text, notes and instances. STRetch by region will be in next release.

Both MOVe and COPy have :R and :P options to allow move and copy by region. Default is by point.

WIN :O toggles polygon filling. All postscript output goes through the Cohen-Sutherland clipper routine so that zoomed drawings are efficiently represented in the postscript file.

WRAP is working. SMAsh is working. If wrapped region is not named, a "NONAME_nnn" instance is automatically created. Wrapped instances can be rotated, scaled and mirrored. When a cell is saved, the anonymous NONAME instances are automatically SMAshed to disk.

TIME/DATE TSLANT and FSIZE commands working.

BACKground command allows adding an overlay instance for comparison or to make a form.

DIStance command now prints out angle in degrees between two points.

QUICKSTART: type "make" to build binary, type "make install" (as root) to install man pages and library. run "pig" to start the editor. Inside piglet retrieve an example house floorplan drawing from it's archive file with "ret PLAN;" Type "edi PLAN;" to edit the floor plan drawing. Do a window fit command to see the whole drawing "win :F;". To play around with making changes, first unlock the drawing for modification with "SHO #E;" (make Everything readable/writable (#)). Now you can add lines with "ADD L<layer> x1,y1 x2,y2...;", or other components. Remember that all commands must end in either right mouse click, a ";" character, or the name of another command. There are a few other archives inside the cells directory. The archive files have "_I" as a suffix, the unpacked devices have ".d" as a suffix. You can unpack them in the same way as PLAN. For instance, retrieve "smorgasboard" by typing "ret smorgasboard;". You can then edit the cell with "edi smorgasboard;". Have fun!

0.9 01/03/06 pig.09.tar.gz 215040 alpha EQUate command is working, allowing process layers to be defined with specific fill colors, line types, names and properties. Process definitions are now stored in the file PROCDATA.P. All configure files, including fonts, menus and process definitions are searched for and loaded using a defined PATH. Default PATH is .:./.pigrc:~/.pigrc:/usr/local/lib/piglet:/usr/lib/piglet. Piglet is now usable as a general editing tool from any directory.
0.8 05/28/05 pig.08.tar.gz 184320 alpha Polygon filling and clipping using Sutherland-Hodgman algorithm. Initial ARC support. Many bug fixes. Now compiles clean with "gcc -Wall". Archive file format now includes "$FILES:" command, purging all defined files prior to archive retrieval. Version 0.7 had unusable example archives. Release 0.8 has several current, working archives in the ./cells directory. After saving the .gz file, run "tar zxvf pig.08.tar.gz". You can then run "pig" and retrieve any of the "<file>_I" archive files in ./cells by typing "RET <file>". The files will be read in and you can take a look by typing "EDI <file>". You may want to fit the design to the current window with "WIN :F;" and then unlock all layers for editing with "SHO #E;". Have fun! I removed the RCS files and the generated documentation files from the release to reduce the size. Please contact "walker AT omnisterra DOT com" if you need them.
0.7 12/08/04 pig.07.tar.Z 1176827 alpha Nested edits work. DUMp automatically tops the graphic window. CHAnge can modify all options of any component. GRId now can be any multiple of the resolution (hardwired at the moment to 0.01). Menu is user customizable and working. AREa command is working. LOCk angle is enforced when adding lines.
0.6 11/12/04 pig.06.tar.Z 1284865 alpha Implemented interactive mouse picking of components. Implements DELete, COPy, MOVe and UNDo. Released with manual pages for all working commands. (Tar file is large because it contains RCS files and screenshots).
0.5 10/10/04 pig.05.tar.gz 134135 bytes alpha Readline history, good mouse/keyboard interaction, fully displays complex archive files, ADD command fairly complete, SHOW command working, Nesting working, but conspicuously missing MOVe, COPy, and DELete.
0.4 12/13/03 pig.04.tar.gz 133696 bytes alpha first version that plots directly to X11. No mouse interaction yet
0.3 10/04/99 pig.03.tar.gz 110098 bytes alpha reads archive data from stdin and plots to stdout. Uses lex parser.
0.2 05/09/98 pig.02.tar.gz 34836 bytes alpha Very rudimentary lex/yacc based parser

Requirements

Piglet is written in standard C and uses the GNU readline library for command line history and editing. It is handy to have the netpbm tools for creating compact gif images from piglet's PNM output. Piglet does Xwindow manipulation with Xlib. All of these facilities should be available in most Linux distributions.

The ./man/makemans script calls awk(1) to build the Piglet man/html pages. Awk(1) is a very useful scripting language that is basically interpreted C with lots of nice features like built in regular expressions and associative arrays. You can use either Gnu awk or traditional AT&T awk, or the mawk(1) variant. Whichever you decide to use, make a sym-link to the name awk or change the name of the executable in the "makemans" script. Most modern linux distros will have awk available.

Building

  • Save the tar file.
  • Extract it with "tar zxvf pig.05.tar.gz".
  • Type "make".

  • Rick Walker (rick_walker AT omnisterra DOT com)