Columns


CUG New Releases

Portable TAR, ED, LPC, and Two Updates

Victor R. Volkman


Victor R. Volkman received a BS in Computer Science from Michigan Technological University. He has been a frequent contributor to C/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.

Update to CUG #391: C/C++ Exploration Tools

C/C++ Exploration Tools, by Juergen Mueller (Kornwestheim, Germany), includes both his C Function Tree Generator (CFT) and the C Structure Tree Generator (CST). CFT and CST analyze C/C++ source code, from applications of any size, contained in multiple files. CFT and CST are useful for exploring new, unknown software and for supporting reuse, maintenance, and re-engineering. By preprocessing, scanning, and analysing the program source code, these programs generate the function call hierarchy (CFT) and the data structure/class (CST) relations. Both programs can handle C and C++ code; CFT can additionally analyze assembler code. The C Exploration Tools v2.20, as MS-DOS executables (released 03/20/94), are immediately available as CUG volume #391.

Version 2.20 of C Exploration Tools features significant enhancements over the previously released version 2.12. Here are just a few of the changes that Mueller reports:

Update to CUG #363: MC68020 Cross-Assembler

Andrew E. Romer (Worthing, West Sussex, England) updates his Motorola MC68020 Cross-Assembler. This update completely replaces the earlier version of his work cataloged as CUG #363. Romer's MC68020 assembler was originally based on Paul McKee's MC68000 assembler (North Carolina State University). The latest version of Romer's assembler fixes a bug causing incorrect generation of S2 records. Thanks to Eric M. Scharf (University of London, EE Dept.) for reporting it.

A cross-assembler is an assembly language translator that runs on a different platform than the one it is assembling for. In this case, the MC68020 cross-assembler runs on an MS-DOS machine (80x86 CPU) but reads assembly language for the MC68020 microprocessor and writes MC68020 object files. Typically, the developer then downloads these object files to the target machine (presumably a Macintosh, Atari, Amiga, or other MC68020 architecture machine).

The cross-assembler supports constants in hexadecimal, binary, octal, and decimal. Constant expressions can use many C-style operators including bitwise operators. The following assembler directives are supported: END, ORG, EQU, SET, REG, DC (define constant), DCB (define constant block), and DS (define storage). The cross-assembler lacks support for native math coprocessor instructions, string constants, and macros. Documentation consists of a 12-page ASCII reference manual.

The MC68020 cross-assembler for MS-DOS will compile under either Microsoft C or Zortech C. Version 1.01 (as released 03/04/94) is immediately available as CUG volume #363.

New Acquisitions

CUG 424: ED Editor

Charles Sandmann (Houston, TX) submits the ED editor with a user interface based on the DEC VMS EDT editor. ED is a true multiplatform editor and can be compiled and run on virtually any platform. It includes target-specific code for keyboard, screen, and TCP/IP handling. This design allows ED to run in UNIX (IBM RS/6000, Sun Sparc, HP, NeXT, or Alpha AXP machines), MS-DOS, Windows NT, and OS/2 environments with ease. ED can edit any kind of file in text, binary, or hexadecimal modes.

Some of ED's more interesting features include the following:

The ED documentation consists primarily of a 45-page ASCII help file. You can make this help file from within ED or using any standard text utilities you might have. The documentation assumes that you've had some exposure to the EDT editor that ED emulates or that you are willing to learn the basics.

The CUG Library distribution of ED includes binaries built with the DJGPP edition of GNU C/C++ (MS-DOS with GO32 DOS extender). Also, this two-diskette set provides the full C source. Distribution and use of the ED source code is covered by the GNU General Public License (Version 2). ED version 1.5.7 (as released on 04/05/94) is immediately available as CUG #424.

CUG #425A: Portable TAR

Timor V. Shaporev (Moscow, Russia) contributes an extremely versatile version of the classic UNIX TAR archiver and an innovative method of delivering LZW compressed data over pipes. Portable TAR works with both MS-DOS and UNIX-compatible machines. Since more than half the source code available from the Internet appears in TAR format, you'll quickly find this a valuable utility. portable TAR reads and writes archives in ordinary files, raw floppies, and QIC-02 streamer tapes. It understands regular TAR formats, PKZIP, gzip, and UNIX compress.

Portable TAR has several other advantages over most public domain TAR programs and those included with UNIX-compatible operating systems:

As mentioned earlier, Shaporev claims source compatibility with most UNIX systems and MS-DOS. Specifically, he provides two makefiles that cover most UNIX implementations and another makefile for Borland Turbo C in MS-DOS. As you might expect, a small amount of assembly language code is provided for supporting functionality not normally found in MS-DOS.

The CUG Library distribution of Portable TAR includes binaries built for MS-DOS. Portable TAR version 3.15 (as released on 04/05/94) is immediately available on CUG #425.

CUG #425B: LZPIPE

Shaporev's other contribution is the LZPIPE library, which implements the two most popular compression methods, LZW and deflate. Both of these methods are defacto lossless compression standards. LZW is used in the well-known compress utility and deflate is used by a number of others, starting from PKZIP by PKWare Inc. up to GNU GZIP.

LZPIPE provides to systems like MS-DOS a programming capability analogous to UNIX pipes. It also allows access to compressed files, and provides a far simpler API than most compression utilities. Specifically, this library processes compressed data in the familiar file handle style of open, read, write, and close calls.

LZIPE implements only pure compression — no attempt is made to emulate ZIP directory services. Thus, you would either use LZPIPE to compress one file at a time or else add the extra functionality for multi-file archiving yourself.

Source codes for LZW compression and decompression are derived from sources of the compress utility initially written by Joe Orost. Source codes for deflate compression and inflate decompression are derived from Info-Zip zip/unzip utilities sources. Inflate was initially written by Mark Adler and deflate originated with Jean-loup Gailly.

The CUG Library distribution of LZIPE includes only C source code. As this is strictly a library, no MS-DOS binaries are included. LZPIPE version 1.01 (as released 04/05/94) is immediately available as part of CUG #425.

CUG #426: LPC-Parcor-Cepstrum Code Generator

Patrick Ko Shu Pui (Hong Kong) submits his LPC-Parcor-Cepstrum code generator for C. The LPC-Parcor-Cepstrum code generator (hereafter, LPC) will compile on most UNIX platforms as well as under Microsoft C/C++ 7.0 and Borland Turbo C v2.0. This archive's primary use is the manipulation and normalization of audio data files. Specifically, LPC supports eight-bit ulaw (SUN Sparc), eight-bit and 16-bit PCM data. LPC then generates LPC autocorrelation or covariance coefficients, Parcor (partial correlation) coefficients, or LPC cepstrum coefficients.

LPC's implementation draws from algorithms and methods described by Shuzo Saito and Kazuo Nakata in Fundamentals of Speech Signal Processing (1985) and others.

Astute CUJ readers will recall that Patrick Ko also contributed the Small Matrix Toolbox (CUG #403) earlier this year. In fact, the LPC application includes several key components from the Small Matrix Toolbox.

The C source package included in LPC is free for academic purposes only. For commercial usage, you must send a US $30 money order addressed to the author (Patrick Ko). The CUG Library distribution includes full C source and binaries for MS-DOS. LPC version 0.52 (as released 04/16/94) is immediately available as CUG #426.