Sydney S. Weinstein, CDP, CCP is a consultant, columnist, author and president of Datacomp Systems, Inc., a consulting and contract programming firm specializing in databases, data presentation and windowing, transaction processing, networking, testing and test suites and device management for UNIX and MS-DOS. He can be contacted care of Datacomp Systems, Inc., 3837 Byron Road, Huntingdon Valley, PA 19006-2320 or via electronic mail on the Internet/Usenet mailbox syd@DSI.COM (dsinc!syd for those that cannot do Internet addressing).
As is often stated, one of the nice things about standards is that there are so many of them. This holds especially true for graphics formats. Every software and hardware manufacturer has come up with their own ideas about what makes a good graphics format. However, you sit there with their computer and fancy bit-mapped display, but with no way to look at all those wonderful pictures. It seems that the software for each machine, or even different software for the same machine, can handle only a few of the formats.
To make matters worse, the graphics file often contains things your machine cannot handle, and you need a way to restructure the file. This is where the portable bitmap utilities come into play. One of the major recent distributions in comp.sources.unix is the Extended Portable Bitmap Toolkit by Jef Poskanzer (jef@well.sf.ca.us).
Unfortunately, this tool set invents another format, called a portable format. However, the tool set converts many other formats to each other via the portable format. The tool set comes in four parts: PBM, for bitmaps (one bit per pixel); PGM, for greyscale images; PPM for full-color images; and PNM, for content-independent manipulations on any of the three formats.
PBM is able to convert the following formats to the portable format: Xerox doodle brushes, CMU window manager, Group 3 Fax, Sun Icon, GEM .img, MacPaint, Bellcore MGR, PC Paintbrush, PICT, Sun Raster, X10 or X11 bitmap and X10 or X11 window dump. In the other direction it can convert from the portable format to ASCII graphics, BBN BitGraph graphics, CMU window manager, Group 3 Fax, Graphon graphics, Sun Icon, HP LaserJet, MacPaint, Bellcore MGR, Printronix, Sun Raster, X11 bitmap, X10 bitmap, X11 window dump. PBM also comes with a tool set that includes:
pbmlife apply Conway's rules of Life (a cell growth simulation) to a portable bitmap; pbmmake create a blank bitmap of a specified size; pbmmask create a mask bitmap from a regular bitmap; pbmpaste paste a rectangle into a portable bitmap; pbmreduce reduce a portable bitmap N times using Floyd-Steinberg algorithm; pbmupc create a Universal Product Code bitmap.
PGM is able to convert the following formats to the portable graymap: FITS, Usenix FaseSaver, HIPS, PostScript "image" data, raw grayscale bytes, TIFF. In the other direction it can convert from the portable format to: FITS, portable bitmap, Encapsulated PostScript. PGM utilities include:
pgmenhance edge-enhance a portable graymap; phmhist print a histogram of the values in a portable graymap; pgmnorm normalize contrast in a portable graymap.
PPM can convert from GIF, Amiga IFF ILBM, Igm-whatnot, MTV ray-tracer, QRT ray-tracer, Sun Raster, TrueVision Targa and X10 or X11 window dump formats to portable pixmap format. From portable pixmap it can convert to GIF, Amiga IFF ILBM, portable graymap, color Encapsulated PostScript, Sun raster, and color X11 window dump formats. PPM utilities include:
ppmarith perform arithmetic on two portable pixmaps; ppmconvol general MxN convolution on a portable pixmap, includes a script to use this utility for smoothing enlarged images to reduce the block pixel effect; ppmcscale scale the colors in a portable pixmap; ppmpat create a pretty pixmap; ppmquant quantize colors down to a specified number; ppmrotate rotate a portable pixmap; ppmscale scale a portable pixmap; ppmshear shear a portable pixmap; and ppmhist print a histogram of a portable pixmap.
PNM includes:
pnmcat concatenate portable anymaps; pnmcrop crop all like colored borders off a portable anymap; pnmcut select rectangular region from a portable anymap; pnmenlarge enlarge a portable anymap N times; pnmflip perform one or more flip operations on a portable anymap; pnminvert invert a portable anymap; pnmpaste paste a rectangle into a portable anymap; and pnmtile replicate a portable anymap into a specified size.
That's a lot of details, but what can you do with it, especially if your format is not one listed? An advantage of a portable format is that you only have to write a program to convert your format to and from the portable format. Then using the portable format as a base, access to all the utilities and all the other formats is possible. The package has grown by this method, and I am sure Jef wouldn't mind hearing about more formats if you also have the conversions ready.
A tool like this one makes it easier to combine those several very useful graphics tools you have that don't talk the same file format. Plus it includes some very useful tools of its own, including smoothing. Also included is a list of other image processing software that is available on the networks. PBMplus was distributed in December as comp.sources.unix Volume 9 Issues 17 thru 34.
More Life In Games
Not only does PBMplus come with a life utility, comp.sources.games also had two postings of the Conway population simulation. For those without the bitmap graphics abilities and only standard terminals or screens, Volume 8 Issue 85 contained a life games that works using curses or termcap on standard terminals. It was adapted from a version written by Leor Zolman, and was contributed by John Rupley (rupley!local@cs.arizona.edu). Leor's version from the 1970's is also included, designed for 8080 computers. Some interesting predefined patterns are also included along with Makefiles for both BSD and Sys5 versions of UNIX.An alternate version based on skewed 2x2 squares was also posted as Volume 8 Issue 87 of comp.sources.games. However, not much documentation was included, so I also don't know what skewed 2x2 squares are. I include it here only for completeness. It was contributed by Paul F. Dietz (dietz@cs.rochester.edu).
Another recent games posting is Shuffle, a game of logic. In Shuffle a randomly swapped row of the numbers one through nine is presented on the screen along with a set of four possible ways of swapping them. Using combinations of those four ways, you must sort the numbers in ascending order. If you perform the sort in less switches than the computer used to mix them up, you advance to the next level of difficulty. If not, the game is over and you can try again. It's not as easy as it sounds. The four switches each rotate four numbers. The first reverses the order of the first four numbers such that 1 2 3 4 becomes 4 3 2 1. The second switch positions two through five in the same rotation. The third positions five through eight and the last positions six through nine. Shuffle is Volume 8 Issue 74.
Even Tic-Tac-Toe was in for an upgrade recently. In this new version of the old standby, Eric Lechner (lechner@ucscb.ucsc.edu) has provided a four-by-four playing board with wrap-around edges. Once again, the goal is to get four pieces in a row, either horizontally, vertically, or diagonally. Note that with wrap-around edges, the diagonals can be off center. Thus, there are no corners on the board. This version of the game was developed to prove the logic before committing it to hardware. tttt is Volume 9 Issue 33.
If you notice a lot of holes in the Issue numbers reported versus those posted, the past two months saw a lot of patch (corrections and enhancements) postings to existing games. Also, some of the games had severe copyright restrictions. I will try to report on Freely Distributable Software only.
Anyone Seen
comp.sources.unix?
Rich Salz's comp.sources.unix is still sporadic, but did have a set of postings in early February. First was a new version of squeeze, a file compression program using Miller-Wegman encoding, a variant on Ziv-Lempel encoding that can produce about 10 to 40 percent smaller output on text files than compress, the standard Ziv-Lempel program on UNIX. Dan Bernstein (brnstnd@stealth.acf.nyu.edu) submitted squeeze1.711 as Volume 21, Issue 1.Ted Campbell (dukeac!tcamp) submitted the ro text formatter with many of the capabilities of nroff. Based on a long line of CP/M and MS-DOS formatters, it traces its roots to the ROFF formatter described in Kernigan and Plauger's Software Tools. Both MS-DOS and UNIX makefiles are provided. ro includes many of the features of AT&T's nroff as well as adding some of its own. A complete manual, in ro format is included. (Volume 21, Issues 3-5).
Find is the UNIX utility to walk (search) a directory tree, looking for files matching a set of criteria. Its syntax is difficult to use for more than the simplest set of matching criteria. Kenneth Stauffer (stauffer@cpsc.UCalgary.CA) has written Rh, a directory-walker that uses C expressions, allowing for much more complicated matching criteria. Rh is Volume 21, Issues 6 and 7.
The largest posting of this set was rayshade. Craig Kolb (craig@weed - eater.math.yale.edu) provided this new version of a raytracing program. Rayshade reads an ASCII file that describes the scene to be rendered and produces a Utah Raster RLE format file of the ray-traced image. It includes box, cone, cylinder, height field, polygon, sphere, superquadratic, flat and Phong-shaded triangle primitives as well as composite objects. It supports point, directional and extended (area) light sources and can do texturing and bump mapping of objects. Anti-aliasing and linear transformations are also provided. It even includes options for rendering stereo pair images. A large posting, it is Volume 21 Issues 8-18.
comp.sources.misc Activity
Though comp.sources.unix has been quiet, the same cannot be said for comp.sources.misc. Brandon Allbery, the moderator of the group, has been chugging out the postings on a regular basis. A perl program to analyze the massive log files created by running Netnews was submitted by Johan Vromans (jv@mh.nl). Scanlog.pl reports on the number of news articles on a per-host basis that are received, posted, transmitted, control-type articles, cancels, junked, and duplicates. It also reports on non-local groups referenced and new groups created. However, this version is only for 'B' news log files. (B News is a version of news, not the language in which it was written.) Scanlog.pl is Volume 9, Issue 59.For those running 'C' news (again version, not language) cn_pexpire, Volume 9, Issue 97, is a rewrite of Dave Taylors pexpire. Jim Pickering (rducky!jrp) has update pexpire to work with this different family of Netnews sources. Cn_pexpire, like pexpire, allows for intelligent expiring of news (deleting old news articles) based on which group the current readers of Netnews subscribe. Each group in which no readers subscribe is expired immediately, saving the space for the other groups.
Browse_pds in Volume 9, Issue 66 from Peter Da Silva (ficc!peter) is a screen-oriented directory browser based on the metaphor of using the VI editor to edit an ls -l listing. It does not use VI or ls, but is based on similar commands and output formats. It allows looking at directory contents screenfull by screenfull, deleting files (both with and without verification), renaming files, and short and long format directory listings.
Continuing the administration utilities, dtree was submitted as Volume 9, Issue 85 by David MacKenzie (djm@abyss.eng.umd.edu). It produces a printout of the structure of a directory tree. Also Issue 87 is a version of chown that supports recursive tree support and the optional group argument similar to the BSD versions. It was submitted by Arnold Robbins (arnold@mathcs.emory.edu).
Those trying to save paper, and using postscript, can use mpage, which prints postscript files in an "n-up" format. Choices are one, two, four, eight and sixteen pages of output per sheet of paper, with two and four being the most useful and readable. Mpage is Volume 9, Issues 88 and 89.
Pep, named after "an excellent Norwegian detergent," is a general purpose filter and file cleaning program. It can expand/compress tabs, convert to and from several character sets, interpret ANSI escape sequences and remove unwanted line noise. It supports the ASCII, IBM-PC, Roman8, CP850 and ISO8859/1 character sets, plus a table mode for defining local character sets. Included are MS-DOS, UNIX and VMS makefiles. Submitted by Gisle Hannemyr (gisle@ifi.uio.no) is Volume 9, Issues 92-96.
With all the splits in area codes coming up, John Mundt (john@chinet.chi.il.us) submitted Volume 9, Issue 99 which takes a table of exchanges and area codes (the data for the recent Chicago split is included) and update files changing the phone numbers. It finds phone numbers in the text and attempts to add area codes where needed or to correct incorrect area codes.
For those looking for a sophisticated pop-up calculator for their systems, the old Sun standby calctool has been upgraded to a level of graphics abstraction to allow it to not only be used under SunView, but XView, X11, NeWS, MGR and for dumb tty terminals. It's a major release by Rich Burridge (richb@Aus.Sun.Com) and is Volume 10, Issues 6-11. Several patches have also appeared for it recently.
A complete b+tree library for variable-length key and variable page sizes including test programs, "semi-usable" record manager, and a dbm-lookalike was submitted by Marcus Ranum (mjr@umiacs.umd.edu) as Volume 10, Issues 27-31. The patches required to make it work under SCO Xenix were posted by Jonathan Bayer (ispi!jbayer) as Volume 10, Issue 32.
A new version of pcmail was submitted by Wietse Venema (wswietse@lso.win.tue. ln) as Volume 10, Issues 33-43. It provides a single user with facilities for creating, sending and receiving electronic mail messages. PC mail supports various transport mechanisms, including UUCP (GNUUUCP or with the driver included) and PC/NFS. You can compose messages with any word processing package or editor that produces clean ASCII text files. It supports RFC 822 (standard UNIX/Internet mail) headers, customized headers and signatures and a reply command with or without including the text of the original message in the reply. The mail database can reside on the PC or on a UNIX host.
Ian Stewartson submitted sh_dos, a Bourne Shell workalike for MS-DOS. It implements the shell as defined in sh(1) of UNIX System V.3 except: background processes are not supported, certain internal commands with no equivalent in MS-DOS are not provided (ulimit, time), command hashing and accounting are not supported, and 8-bit character sets are not supported. sh_dos is Volume 10, Issues 53-58.
Brandon Allbery submitted one himself, Volume 10, Issue 85. Uformat is a picture formatter for numeric data either as a stand-alone program (for shell use) or as a subroutine from within other programs.
Another large distribution was xlisp2.1, an implementation of a lisp environment. Lisp is a list processing language often used for AI. Gary Murphy (cognos!gary) submitted this as Volume 10, Issues 88-96.
Lastly for comp.sources.misc, which did have a lot of activity, is version 1.4 of PCcurses, a PC version of the standard UNIX screen and window library called curses. This version by Bjorn Larsson (bl@infovox.se) was based on a version called ncurses written by Pavel Curtis at Cornell University. Both the Turbo C and Microsoft C compilers are supported. PCcurses14 is Volume 10, Issues 15-21.
Previews From alt.sources
Tile forth, a Forth-83 implementation written in C, was submitted by Mikael Patel (mip@ida.liu.se). The kernel supports the standard Forth-83 Word Set except for blocks and is extended for argument binding and local variables, queue management, null-terminated string functions, exceptions and multitasking. It is complete with a programming environment. alt.sources is not moderated, so there are no volume and issue numbers.Steve Summit (scs@avarice.pika.mit.edu) previewed his stdio, a complete C/UNIX standard I/O package. It is intended to be compatible with the ANSI C standard, although it does contain some new functions not in the standard.
A preview of a TCL release to support System V (the original TCL only supports BSD) was posted by Peter da Silva (ficc!peter). TCL is an embedded tool command language described in the paper "Tcl: An Embeddable Command Language" by John Ousterhout of the University of California at Berkeley in the proceedings of the 1990 Winter USENIX Conferenee. A copy of the paper in postscript form is in the distribution. It is hoped that the System V changes will be incorporated into a future TCL release.
Lastly, Elm
Tooting my own horn, Elm, a user-friendly Mail User Agent, has undergone its next release (now version 2.3). Although there is not a lot new in this release, many past problems have been fixed, and several new portability features have been added. Elm 2.3 will be distributed via FTP and a future posting to comp.sources.unix.