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 who cannot do Internet addressing).
Last column, I mentioned that Brandon Allbery has gotten too busy to moderate comp.sources.misc. He asked for volunteers to do the job. The new moderator is now in place, and comp.sources.misc. is getting back to normal. Before I announce the new one, let me thank Brandon for his time as moderator. Being a moderator is at times a thankless job. Everyone complains when things go wrong, but few are there to thank the moderator when the network is flowing smoothly. It takes several hours per week to be a moderator of a group such as comp.sources.misc.
The new moderator is Kent Landfield of Sterling Software, IMD. He can be reached at any of:
kent@sparky.imd.sterling.com kent@uunet.uu.net sources-misc-request@uunet.uu.netSubmissions for publication in comp.sources.misc should be sent to sources-misc@uunet.uu.net. Most of the major moderators maintain a mail clearinghouse at UUNET.
New Sources In comp.sources.misc
If you run a PC-compatible machine and keep different operating systems in different partitions, then you need bootmenu.bootmenu is a replacement for the primary boot sector of MS-DOS-compatible computers. This boot program lets you select the partition to be booted from a menu. Those with both UNIX and DOS on their disk can select which to boot. Two versions are provided. The first is a very small bootmenu that is compatible with SpeedStor-formatted disks but does not time out and automatically boot the active partition. The second is bootauto, which has a timeout to automatically boot the active partition if no entry is made. bootmenu also includes pfdisk v1.3 for installing the new boot sector without clobbering the current partition table. bootmenu was contributed for Volume 15, Issues 84 and 85 by Gordon Ross of the Mitre Corporation. He can be reached at <gwr@linus.mitre.org>.A start on a set of utilities to encode and decode Group III and Group IV fax images was contributed by Michael Marking <ipel!marking> for Volume 15, Issues 86-88. If you are playing with fax boards and fax images, these might be a base for your own software. Michael expects to extend these utilities to support these images imbedded in TIFF files. He also notes that these routes differ slightly from the ones in the CUJ article (CUJ July 1990, CUG volume 317).
An interesting program was posted by Gene Olson, at <gene@zeno.mn.org>. Compact_sv is a System V program to compress large data streams. It demonstrates using shared memory as a buffer and having multiple tasks process the data in this buffer to speed throughput. The program is faster and produces smaller output than when compressing very large files (larger than 1Mb), but it requires more than 1Mb of memory to run. It implements data compression using a system very similar to V.42bis, entitled modified Lempel-Ziv-Welsh. The problem with this posting is its legal warning: "This program may be used only for research into data compression, as a study in program optimization, or as an example of System V interprocess communication. The author originally intended the program for practical day-to-day usage. However, in final preparation for program release, it was learned the program probably infringes one or more widely licensed patents in data compression. There is no choice but to release the program for research purposes only." I have never seen a program released with such a restriction before, but this one is worth looking at, if only to revive the concept of multiple tasks processing a buffer to increase throughput. Compact_sv is Volume 15 Issue 89.
Enquire has been upgraded to v4.3 by Steven Pemberton <steven@cwi.nl> for Volume 15, Issue 95. Enquire determines many properties of a C compiler and its execution environment. These include minimum and maximum signed and unsigned char, int, long, float, and double, as well as other properties of floating point numbers. It can also produce ANSI C float.h and limits.h files based upon its tests. Other tests check for allocatable memory, bit order, casts, promotions, pointer properties, and accuracy of the math routines.
Volume 15, Issue 98 was a patch to an item of interest to many. PCMAIL2, an MS-DOS PC program to exchange UUCP messages and electronic mail with UNIX hosts, has been patched to patchlevel 3. The full version was posted in January 1990. This patch fixes some problems with UUCP control messages and timing. They were submitted by Wietse Venema <wswietse@svbs01.bs.win.tue.nl>.
If you are running a System V UNIX from a terminal that supports a status line, Charles Spell <cs00chs@unccvax.uncc.edu> has submitted a program written by John Ribera to monitor the system via that status line. Watch notifies the arrival of mail, the current time, and logons and logoffs from the system. The terminfo parameter tsl, to go to the status lin,e and fsl, to return from the status line and restore the cursor, must be in the terminal's terminfo descriptor. It also helps if ws#, the number of characters in the status line, is in the terminfo descriptor. Watch is Volume 15, Issue 99.
I mentioned last column that, dmake, an enhanced make utility was updated to v3.6, and patch 1 was posted to comp.sources.bugs. Patch 1 has now appeared in comp.sources.misc as Volume 15, Issue 90. Because the bugs group is rarely archived, it is important that patches do eventually appear in the source group. Dennis Vadura <dvadura@watdragon.waterloo.edu> has also submitted a patch 2 to the bugs group, which should soon appear in the sources group.
In last column's alt.sources preview section, I mentioned a CP/M emulator. This month another contributor has submitted a CP/M emulator in C complete with CP/M BIOS to comp.sources.misc. Nick Sayer <mrapple@quack.sac.ca.us> submitted upm, a UNIX CP/M as Volume 15, Issues 101 and 102. It emulates the Z-80 CPU and the CP/M emulator.
Our new moderator took over with Volume 16. He started it out, with Issue 1 being a simple utility. Submitted by Mark Allsop <mallsop@stimage.mqcc.mq.oz.au>, dosdu is a MS-DOS work-alike for the UNIX du (disk usage) command. It supports the major options of the UNIX version plus some for displaying sizes in Kb or Mb.
A rather large contribution was Metalbase from Richard Jernigan <rpj@pygmy.rice.edu>. I normally don't mention shareware in this column, but there is no suggested contribution in this one, so I'll make an exception. Metalbase, submitted at v3.1, is a relational database system. It adds commands to C for adding, updating, deleting, and retrieving records from relations built with the utilities included in the package. The schemas are written in a pseudo-English. Originally written for Amigas, its been ported to UNIX System V. It was released as mbase in Volume 16, Issues 2-4.
Jonas Yngvesson <jonas-y@isy.liu.se> and Inge Wallin <ingwa@isy.liu.se> have contributed a beta-test release of v2.0 of their SIPP, the simple polygon processor. SIPP is a library for creating three-dimensional scenes and rendering them using a scan-line z-buffer algorithm. The scene is built of objects that can be transformed with rotation, translation, and scaling. Objects form hierarchies, and hierarchies can have arbitrarily many subobjects and subsurfaces. The library has an internal database for the objects that are to be rendered. The library also provides three-dimensional texture mapping with automatic interpolation of texture coordinates. Simple anti-aliasing is performed via sampling, and multiple light sources and shading are supported. Images are produced in the portable pixmap format (ppm) which has been described in several prior columns. SIPP is Volume 16, Issues 5-10.
A rather large patch appearing this time was patch 2 to gnuplot 2.0. The major additions are support for X11 Motif, new bit-mapped graphics routines, and new terminal drivers for vttek (VT like Tektronix emulators), HP LaserJet II, Kyocera Laser Printer, and SCO CGI graphics. This patch is applied to Volume 11, Issues 65-79 (gnuplot 2.0) and is Volume 16, Issues 11-17.
For those sites wishing to run USENET Network News without installing the entire new package, bootstrap news contributed by Ronald Florence <ron@mlfarm.com> is for you. It allows a leaf node (you don't send news on to anyone else) to receive a limited news feed by spooling the articles to mail messages. It was released as Volume 16, Issue 18.
If you're having problems debugging programs that use malloc/free for memory leaks, you need Marcus Ranum's <mjr@decuac.dec.com> mnemosyne from Volume 16, Issue 19. mnemosyne is a set of tools to find memory leaks and hog functions. It is a wrapper library for malloc/free and a #include file that intercepts those calls and sends the calls to the wrapper routines. This provides memory profiling and leak detection with no code changes save a single #include line.
James Plank <jsp@princeton.edu> has contributed a graphing program that takes the description of the graph as input and outputs PostScript code. This PostScript code can be directly printed or imported into a text processor that allows for included PostScript images. Jgraph was released as Volume 16, Issue 20. Note, this was a very large issue (over 9,000 lines and 200,000 characters). Usual issues are limited to less than 60,000 characters. Patch 1 was issued as Volume 16, Issue 77.
The largest posting this time was ECU, v3.00.00 and some patches to ECU. ECU, an extended cu, is an asynchronous communications program for SCO UNIX V/386 and SCO Xenix V/386 or V/286. It incorporates a typical interactive communications capability with a rich procedure language and an extended set of interactive commands. It also supports several file transfer protocols. It requires SCO Xenix 2.3.1 or later or SCO UNIX 3.2.0. Submitted by Warren Tucker <n4hgf!wht>, ECU is Volume 16, Issues 25-59; patch 1 is Volume 16 Issue 60; and patch 2 is Volume 16, Issues 70 and 71. The manual for ECU was posted as Volume 16, Issues 22-24. An additional tool to take the log output from ECU 3 and convert it to Microsoft Excel spreadsheet format was posted as Volume 16, Issues 72 and 73.
Ron Gallant has submitted a C++ implementation of the statistical methods used in his Non-linear Statistical Models book. Nlmdl can estimate univariate non-linear regression models by least squares, multivariate regression models by generalized least squares, simultaneous equations models by three-stage least squares, and dynamic simultaneous equations models by generalized method of moments. Errors can be heteroskedastic or serially correlated in any of these models. It was posted as Volume 16, Issues 63-68 with a patch in Issue 74.
Patch 1 to the MS-DOS Shell written by Ian Stewartson <istewart@datlog.co.uk> (Volume 12, Issues 19-26) was released as Volume 16, Issue 78. This patch fixes some bugs and adds some features from the Korn and POSIX shells. In addition, support of use under OS/2 has been added.
Comments Continue...
Comments about the volume of postings in comp.sources.unix continue to appear, but the moderator, Rich Salz, keeps ignoring the flack and plodding along posting at his usual pace. I hope Rich keeps ignoring them, but I do wish he would post patches sooner. There are several new releases this time:If you're having difficulty making sense from the output of UNIX's ps command (process status), and if you are running a BSD derived UNIX (sorry, System V folks), Show Process Status (SPS) from J. Robert Ward of Olsen & Associates <robert@olsen.uu.ch> fits your needs. SPS displays the information sorted into parent/child order, with the fields displayed in English instead of hex where useful. In addition, it's faster than ps. Makefiles are provided for many BSD derived systems. SPS appeared as Volume 23, Issues 47-50.
A line-oriented macro processor called LOME (Line Oriented Macro Expandor) was contributed by Darren New <new.ee.udel.edu> for Volume 23, Issues 51-59. LOME processes its input file one line at a time applying the macros until no more matches can be performed. The macros can also reference other files allowing input and output to multiple source or output files.
Those long-time subscribers to CUJ may remember my article on source-code librarians. One of the librarians I described was RCS. In Volume 23, Issue 75 Jason Winters <grinch!jason> submitted a front-end to RCS's ci/co (check in and check out) entitled cio. The wrapper allows for recursively checking in or out of directory structures and limiting the command to ASCII files only, thus enabling the program to be run on directories with both source and binaries.
Running multiple printers from the same queue has been easy in the System V line printer spooler for a long time using printer classes. However, the BSD spooler has not supported this same feature. Matt Robinson <yakker@ucrmath.ucr.edu> submitted mlpd for Volume 23, Issue 76. mlpd supports using a single printer queue for a set of multiple printers. The idea is similar to that of a common line at a bank. The next job gets the first available printer from the set. It's simple, but not optimal. More optimal would be to place short jobs on one printer with a higher priority. Longer jobs and the overflow of short jobs get distributed among the rest of the set (if optimizing throughput).
Also for sites running BSD derived UNIX systems is xmodem3.9. This version of XMODEM supports the BSD flavor of terminals and terminal programs. It adds running through tip, delayed startup, status messages, turning off EOT verification, aborted transfers, and YMODEM-G support. Older xmodem3 versions for BSD already supported XMODEM/CRC, XMODEM Block, and YMODEM batch. This version was contributed by Steve Grandi <grandi@noao.edu> for Volume 23, Issues 77-79. This does cause a slight conflict in version identification. For the System V derived systems, a similar program called UMODEM is available, currently in the 4.x version range.
Another news reader variant was posted recently. One of the older news readers is Larry Wall's rn. New from Wayne Davison <davison@sri.com> is Threaded RN (trn). It uses the References line to order the discussions in a natural, reply-ordered sequence called threads. Having the replies associated with their parent articles makes the following discussion easier. trn also has a visual representation of the current thread in the upper right corner of the header. A thread browser/selector has been added to make long threads easier to handle. trn uses a thread database, created by a separately run database manager (included). The space taken up by the database is an additional 5 percent of the space already used in the news spool area. trn requires rn patchlevel 47 or greater. The additions are all marked for conditional compilation. The same source can then be used to compile trn or rn. trn was posted twice, the first posting had problems with the packaging so it was reposted again with patch 1 applied. The revised patch was Volume 23, Issues 60-73. Also posted as part of trn was unipatch format. Unipatch makes patches that are smaller than context differences but contain the same information for the patching program. It does this by merging the add and deletes into one list instead of showing the before and after lines as two lists.
The last large posting in comp.sources.unix this time is an implementation of ABC, a new interactive programming language. The source provides versions for UNIX, the Atari ST, the Macintosh, and MS-DOS. ABC is an imperative language originally designed as a replacement for BASIC. In addition to being interactive and easy to learn, ABC is structured and high-level. It is suitable for general everyday programming, the same as you would use BASIC, Pascal, or AWK. It is not a systems programming language but it is an excellent teaching language. It is interactive and supports prototyping. It is a compact language with the source for most programs being about a quarter to a fifth the size of the equivalent Pascal program. Submitted by Steven Pemberton <steven@cwi.nl>, ABC is Volume 23, Issues 80-106, with Issue 105 being a correction for two files that some systems truncated due to line length restrictions, and Issue 106 being patch 1. Patch 2 was issued as a second Issue 106. (Seems Rich got a bit confused with all the problems that occurred in the posting of ABC.) Patch 3 was Issue 108. Since there was no 107, patch 2 should have been Issue 107.
reve Continues To Evolve
Last column I mentioned an Othello-like game, reve, which was upgraded to v1.1. It was submitted by Rich Burridge <rburridge@sun.com> and Yves Gallot <galloty@cernvax.cern.ch> for Volume 11, Issues 52-58 with patch 1 in Volume 11, Issues 61-64. This time patch 2 was released as Volume 11, Issues 97-99. Patch 3 was released as Volume 12, Issues 1-9. Patch 4 followed immediately as Volume 12, Issues 10-13 and a small follow-up patch 5 as Issue 14. There are too many additions and changes to mention here. Most changes are due to making reve run on many types of computers and variants of display and operating systems.Other patches released this period include patch 1 to bt, the Broken Throne multiplayer real-time conquest game from Tom Boutell <boutell@freezer.it.udel.edu>. Patch 1 was issued as Volume 11, Issue 77. A Sunview clear-the-bricks game, blockbuster (Volume 11, Issues 18-20) had patch 1 issued by Eric Van Gestel <ericvg%BLEKUL60.BITNET@cunyvm.cuny.edu> as Volume 11, Issue 95. Lastly on the patch front, sdi, a Sunview missile-command game, had patch 1 issued. sdi is Volume 1, Issues 54-59 and the patch from Bill Randle <billr@saab.cna.tek.com> came from a bug fix submitted from Brian Nakata. The patch was released as Volume 11, Issue 96.
A port of the X11 game Boulder Dash to MS-DOS PCs using VGA display adapters was posted as Volume 11, Issues 81-83. It was submitted by Herve Soulard <soulard@fantasio.inria.fr>. The original version for X11 windowing systems was written by Jeroen Houttuin <houttuin@ks.id.ethz.ch>. Included are three programs, XBD, the game itself, XBDE, a level editor for XBD, and BITMAP, a bitmap editor for XBD.
The largest posting in the games group was larn, a dungeon type adventure game for UNIX, VMS, MS-DOS, or any termcap supporting system. larn, now at v12.2, is an enhancement of the original larn (written by Noah Morgan) by Kevin Routley <routley@tle.enet.dec.com>. This version differs from ularn in Volume 7 of the game's archives and is closer to the original in look and feel than that version. larn is similar in concept to hack, rogue, or moria, but with a different feel and winning criteria. larn was posted in 11 parts as Volume 11, Issues 84-94 with patch 1 as Volume 12, Issue 16.
Previews From alt.sources
There was an explosion of postings in alt.sources. So many, that I can only touch on some of them. I hope the better ones will be checked out and posted to the mainstream source groups in the future.remind, v2.2 was posted in five parts on Nov. 16, 1990 by David Skoll <dfs@doe.carleton.ca>. remind is a program to prompt about upcoming events. It can mail reminders, prompt them on the screen, and now produce an annotated calendar for printout. New in 2.2 is the ability to read and handle standard UNIX calendar files. remind 2.2, patch 3 was posted on Nov. 28, 1990, patch 4 on Nov. 29, 1990 and patch 5 on December 3, 1990. I did not see patches 1 or 2 go by, but they may have already been applied to the original posting. Since postings in alt.sources are uncontrolled, it's hard to tell if something is missing.
A set of routines to extend printf were posted by D. Richard Hipp <drh@duke.cs.duke.edu> on Nov. 29, 1990. The new variations include mprintf that uses malloc to acquire space to place its output, snprintf, a version that limits its length to a set number of characters a la strncpy, xprintf that calls a function to dispose of its output, and nprintf, which only returns the number of characters that would have been output. The other enhancement is that new conversion format letters can be added at runtime. An additional enhancement for centered output was posted on Nov. 30, 1990.
Need a cross-assembler? Mark Zenier <ssc!markz> posted his frankenstein cross-assembler. It supports 13 flavors of assemblers (1804, 2650, 6301, 6502, 6805, 6809, 6811, tms7000, 8048, 8051, 8096, z8 and z80). No macros, relocatable linkers, fancy print controls, or structured control statements, but as he states, "It's a start." It was posted on Dec. 4-7, 1990 in many parts, about 1.2Mb in all.
The vi editor clone, Elvis, was upgraded to 1.4 on Dec. 5, 1990. A nine-part posting by Steve Kirkendall <kirkendall@eecs.cs.pdx.edu>, Elvis now runs under UNIX, MS-DOS, OS-9, and Coherent. New in 1.4 is an alias program to allow for smaller disk usage on systems that do not support links. This allows a small wrapper for the view, ex, and vi varients of the Elvis executable. Also new are line number support for the :e command, appending to a named cut buffer, limited macro facility, addition of the :abbr command, adding a delta to vi mode searches, and several new :set options including showmatch, autoprint, and edcompatible. Also added are a new set of commands to scan the error messages issued by the compiler. These are :make and :cc. Work is in progress for v1.5.
A seven-part posting of a work-alike of the Korn shell by Eric Gisin was posted by netcom!netnews on Dec. 12, 1990. I only mention it because a large number of messages have recently been asking about a public domain version of the Korn shell. Apparently the author is no longer reachable, so this makes a starting point. It supports most of the older Korn shell, but only has EMACS line editing. The other line-editing modes were not present.
Tom Horsley <tom@ssd.csd.harris.com> posted mkid, an identifier cross reference tool on Dec. 12, 1990 in an eleven-part posting. He is looking for comments and corrections. This is a variation on the mkid package from 1987 written by Greg McGary. He has made several additions and corrections, and is asking others to send him their patches to the original program. He will attempt to merge all of them and issue a new version to comp.sources.unix.
Among the shell variants, the Z shell (zsh) was posted in eight parts by Paul John Falstad <pfalstad@phoenix.princeton.edu> on Dec. 14, 1990. The Z shell is similar to ksh and tcsh. It is designed to be an interactive shell as well as a batch command language. Concepts were borrowed heavily from ksh, bash, tcsh, sh, and csh.zsh is a work in progress, but it has a manual page and make files.
If you wanted to try one of the programs I described that required BSD type sockets, but you were on a machine that does not support networking, pgd@bbt.se (I never did find his name on the posting.) posted a socket emulation library for System V on Dec. 19, 1990. It uses named pipes and file locks. Of course, without networking you are limited to the local machine, but it works well enough to put up X-windows on a Xenix machine without networking or streams.
On Dec. 20, 1990 James R. Purdon, III <purdon@athena.mit.edu> posted slugnet in six parts. slugnet is a multi-user interactive conferencing facility. It does require sockets and runs in a client/server configuration. It allows multiple site conferences as well as multiple conferences.
For those sites that need an ndbm, Ozan Yigit <oz@nexus.yorku.ca> has provided sdbm. The Substitute DBM library was posted on Dec. 15, 1990. It provides a complete, portable replacement for the ndbm system. ndbm uses a different algorithm so the data files are not compatible.
Another menuing system was posted by Paul Condie <pcbox!pjc> on Dec. 26, 1990 in 14 parts. A simple utility that allows for adding menus to UNIX. Menus supports sub-menus and processes. Nesting does not increase startup time or memory usage. Menus can also be data entry screens allowing for choices and responses to be controlled.
The moderator of comp.sources.unix even made a posting to alt.sources. Rich Salz <rsalz@bbn.com> submitted his pattern matching subroutines wildmat.c on Jan. 3, 1991. It can match arbitrary patterns using wild cards. It is 8-bit clean. An additional correction and comment was made on Jan. 4, 1991 by Lars Henrik Mathiesen <thorinn@diku.dk> in regard to the abort code speedup.
William E. Davidsen, Jr. <davidsen@crdos1.crd.ge.com> posted a version of LHARC that he modified to run cleanly on a large number of UNIX systems. His two-part posting on Dec. 6, 1990 is version 0.03 beta.
Those longing for X-11 Rel 4 and still running SCO Xenix 386 need only see the 12-part posting on Jan. 7, 1991 by Chain Lee <chain@paul.rutgers.edu>. He posted a large set of patches to adapt the source to Xenix. Of course you still need the X11R4 source and its 18 patches first. That alone takes four magnetic tapes.
All UNIX system administrators need to acquire COPS. The latest version, 1.02, was posted in nine parts on Jan. 8, 1991 by Dan Farmer <df@sei.cmu.edu>. Dan is part of the Computer Emergency Response Team (CERT). This package, which he started before working for CERT, is based on his suspicion that most security problems are caused by trivial misconfigurations. COPS checks out your UNIX system for security holes and reports its findings. It is up to the system administrator to correct those holes. COPS is a tool to assist in checking for potential security problems, not a crutch. Reliance on it to find all problems is asking for trouble. But it is easy to install and run, and it should be run regularly.
A cron work-alike including the at facility (batch jobs) was posted on Jan. 13, 1991 by Donald Lashomb <uncle!donlash> in four parts. It supports cron, crontab, at, and batch commands. It permits names as well as numbers for the date fields in the cron tables, enforces the real uid for security, and includes a new cronjob. The last is like the batch at command, but works repetitively like a crontab. It is mostly compatible with the standard System V versions.