Victor R. Volkman received a BS in Computer Science from Michigan Technological University. He has been a frequent contributor to The C Users Journal since 1987. He is currently employed as Senior Analyst at H. C.I.A. of Ann Arbor, Michigan. He can be reached by dial-in at the HAL 9000 BBS (313) 663-4173 or by Usenet mail to sysop@hal9k.com.
CUG Library Volume IV
CUG Library proudly announces volume IV of its directory of user-supported C source code. This latest effort thoroughly catalogs CUG Library volume numbers #300 through #349. Volume IV includes both exhaustive reviews of selected volumes plus capsule summaries of all volumes. In all, this amounts to more than 250 cross-referenced and indexed pages of information. Volume IV can be yours for $10 or order the set of volumes I through IV for just $28 total. As always, see the order blank in the center portion of this issue.
Bug Fix for GNUPlot, CUG #334
Arild Olsen <d_olsen_o@kari.uio.no> writes:"I just received the disk, and the HPLJII-driver does not function, as stated by R.T. Stevens in his review (CUJ, June 93). Maybe this is due to an incompatibility between HP LaserJet II and III; I have a LJ III. When sending a bitmap to the printer, the program specifies TIFF-format. This is not correct since the bitmap is plain.
To solve this, edit the HPLJIItext function in the HPLJII driver. The string "\033*b2m%dW" should be changed to "\033*b0m%dW".
New Acquisitions and Updates
This month we present three additions to the CUG Library, as well as an update to a recently featured volume.
- International Obfuscated C Code Contest (CUG #397)
- ASxxxx Cross Assembler - Part 3 (CUG #398): MC 68HC08 CPU support
- MINED Editor: (CUG #399)
- Thomson-Davis Editor (CUG #386 update): multi-window text/binary file editor new version 3.2A
International Obfuscated C Code Contest 1984-1993: CUG #397
Landon Noll (Sunnyvale, CA) submits a decade of source code from the International Obfuscated C Code Contest (IOCCC). This contest has long been a favorite of many CUJ readers. The entire IOCCC archive from 1984-1993 is now available as a two-diskette set from the CUG Library. Obfuscation implies purposefully obscuring and confusing a situation. Why obfuscate C code? The official IOCCC states its objectives as follows:
Recently, Bob van der Poel reviewed Don Libes' book entitled Obfuscated C and Other Mysteries (see CUJ, October 1993, pp. 131-132). The diskette for this book includes IOCCC entries from 1984-1991. Libes has produced special reports about the IOCCC several times in CUJ. Please see the following back issues for more detail:
- To show the importance of programming style, in an ironic way.
- To stress C compilers by feeding them unusual code.
- To illustrate some of the subtleties of the C language.
- To provide a safe forum for poor C code.
Libes, Don. "Don't Put This on Your Resume," CUJ, May 1991, p. 89.
Libes, Don. "The Far Side of C," CUJ, May 1990, p. 125.
Libes, Don. "The International Obfuscated C Code Contest," CUJ, July 1989, p. 93.
The CUG Library volume #397 contains the full IOCCC archive including two additional years not included in the Libes' book.
In addition to dozens and dozens of obfuscated C programs, the archive includes complete rules and guidelines so you can submit your own entries into next year's contest. Some of the obfuscated programs are quite useful, including scaled-down versions of make, grep, and various editors.
ASxxxx Cross Assembler - Part 3: CUG 398
Cross assemblers continue to play an important role in the CUG Library. A cross assembler reads assembly language source code for a non-native CPU and writes object code that can be linked and downloaded to the target machine for execution. Embedded systems developers are the most frequent users of cross assemblers. This month, Alan R. Baldwin (Kent State University, Ohio), adds his third cross assembler to the CUG Library's repetoire. ASxxxx Part 3 provides a complete Motorola 68HC08 development system. ASxxxx Part 3 version 1.50 (released 8/9/93) is immediately available as CUG volume #398.The CUG distribution of ASxxx Part 3 includes MS-DOS executables for the ASxxxx Cross Assembler and Linker. However, if you want to recompile the Cross Assembler or Linker, you'll also need ASxxxx Part 1 (CUG #292). ASxxx Part 2 contains cross assembler source files for the 6816 CPU. The ASxxxx family of cross assemblers can be built on DEC machines running DECUS C in the TSX+ environment or PDOS C v5.4b under RT-11. ASxxxx has been built with Borland C++ v3.1 under MS-DOS and includes a project (.PRJ) file. Although only these implementations have been specifically tested, Baldwin claims many other K&R C compilers may work as well.
ASxxxx Part 3 includes a comprehensive 80-page manual covering functionality provided by all three existing ASxxxx cross assemblers and linkers. The documentation lays out the exact specifications of syntax for symbols, labels, assembler directives, and expressions in detail. The manual includes appendices with instruction set highlights and supported syntax for Motorola 6800, 6801, 6804, 6805, 68HC08, 6809, 6811 6816, Intel 8080 and 8085, and Zilog Z80 and HD64180 CPUs.
The ASxxxx assembler falls short of full macro implementation, but does include a host of important features such as: if/then/else, #include files, radix support from binary to hexadecimal, and a full complement of C-language operators for expressions. The ASxxxx linker goes beyond conventional loaders by resolving intermodule symbols, combining code into segments, relocating absolute symbols and base addresses, and producing either Intel HEX or Motorola S19 output files.
MINED Editor: CUG #399
MINED, by Thomas Wolff (Freie Universitt Berlin, Institut fr Informatik, Germany), is a modeless full-screen text editor. MINED was originally written for MINIX and now works with most UNIX platforms as well as MS-DOS, and DEC VAX-11/VMS. MINED works best at editing small files (50K or less) and can edit many files simultaneously. Unlike other editors which have separate command modes and input modes, MINED uses a modeless design for ease of use. It also includes powerful regular expression operations for both searching and replacing text. MINED Version 3 (released 08/04/93) is immediately available as CUG volume #399.
Thompson-Davis Editor Update: CUG #386
The Thomson-Davis Editor, as provided by Frank Davis (Tifton, GA), is a multi-file/multi-window binary and text file editor written for IBM PCs and close compatibles. Thomson-Davis Editor (TDE) works well with batch files, binary files, text files, and various computer language source code files. TDE can handle any size of file and any number of windows that fit in conventional DOS memory.Davis reports the following enhancements since TDE was last released to the CUG Library:
- Pop-up pull-down command menu = <CTRL>+\
- More Language support, thanks to Byrial Jensen, <byrial@daimi.aau.dk>
- TDE ported to Linux (POSIX, SVR4, BSD4.3+?, FIPS 151-1, etc.)
- A bug (a blunder, actually) got fixed in the 3.1 config utility.
- Linux FAQs and HOWTOs
- New regular expression meta characters: < = Empty string at beginning of word; > = Empty string at end of word
Non-English Language Support
Byrial Jensen contributed several functions to TDE that are useful with non-English languages. Using these functions, DOS filenames can contain extended ASCII characters. As a result, the dirlist function in TDE (which sorts filenames according to the sort order array) can be customized to your favorite alphabet. Byrial also contributed two new macro functions that look at the Caps Lock key: IfCapsLock and IfNotCapLock. Other changes supporting non-English usage are as follows: predefined regular expression macros may be redefined; all editor prompts have been gathered into prompts.h; response letters have been gathered into letters.h; and the window letters can be changed to follow a non-English alphabet.
Improved Regular Expression Handling
Davis writes: "I use the regular expression search much more often than I first anticipated. A couple of features missing in the original implementation are the beginning-of-word and end-of-word metacharacters. These metacharacters really come in handy for culling prefixes and suffixes from the search. Here's our new regular expression table: [Please refer to Table 1] "TDE version 3.2a (Released 11/15/93) immediately replaces version 3.0 and is available as CUG Library volume #386.