Kenji Hino is a member of The C Users' Group technical staff. He holds a B.S.C.S. from McPherson College and an undergraduate degree in metalurgy from a Japanese university. He is currently working toward an M.S.C.S. at the University of Kansas.
New Releases
CUG299 MEL and BP
This volume contains two programs, MEL Universal Metalanguage Data Processor submitted by George Crews (TN), and BP Back Propagation for neural networks by Ronald Michaels (TN).MEL provides an I/O interface between a program and the user. It can take input data written in "pseudo-English" and translate it into program variables. It can also translate a program's variables into pseudo-English. (See the article on page 33 in this issue.) MEL was originally designed for use with engineering analysis programs. It was written in ANSI C and was developed using Microsoft C v5.1. The disk includes MEL source code, a test example program, sample input and output files, documentation, and the article and listings from this issue. Since MEL provides only a processor engine, you need to define your own input and output data format rule (called a dictionary) for your application program in mel.h.
BP is a simple implementation of the back propagation algorithm as an example of a neural network. The implementation is based upon the article in Nature, "Learning representations by back propagating errors" by Rummelhart, Hinton and Williams. BP employs an adaptive algorithm that converges as result of learning. BP was developed on an AT clone with a math coprocessor using Zortech C v1.07. The disk also includes the Hercules graphics version of BP.
CUG300 MAT_LIB
Our first volume in the 300's is a shareware package, MAT_LIB Matrix Library submitted by John J. Hughes III (TN).MAT_LIB includes approximately 50 C language functions and macros which input and output tabular data maintained in ASCII text files. While the tabular data is in RAM, it is stored in dynamically-allocated token or floating-point arrays on the heap.
Functions are provided to examine an ASCII text file to determine the number of rows, columns, and token size of the tabular data in the file. Other C macros dimension either a floating-point or string token array large enough to hold the ASCII data. Once in memory, floating-point array matrix operations can be performed on the data. Token array data can be converted to and from float or integer values. Floating-point arrays which have been modified by calculation can be merged into token arrays for output or they can be output to a text file directly. The output text files can in turn be used as the input for later application programs found in MAT_LIB text file formats.
The disk includes a users manual, test programs, example programs, and small and medium model libraries for Turbo C. The library source can be obtained for $20 from the author (John Hughes III, 928 Brantley Dr., Knoxville, TN 37923).
CUG301 BGI Applications
This volume contains graphics applications that use Borland Graphics Interfaces (BGI) submitted by three authors, Mark A. Johnson (CO), Henry M. Pollock (MA), and John Muczynski (MI). All programs were compiled with Turbo C and use BGI files. The disk includes C source code, executable code and BGI files.Mark A. Johnson has created DCUWCU a simple application environment that provides a mouse-driven cursor, stacked pop-up menus, and forms that contain editable fields and a variety of selectable buttons. The sample program DRAW allows you to draw lines, circles, and text on the screen using a mouse. A stacked pop-up menu can be invoked anywhere on the screen (Figure 1) . DRAW uses public domain Microsoft mouse routines written by Andrew Markley (CUJ Sept/Oct 1988). An article describing DCUWCU appeared in the Jan '89 issue of CUJ (p. 67).
Henry M. Pollock has submitted a demonstration program combining trig functions and graphics functions in Turbo C. By selecting an option from the menu, the program displays circleoids, asteroids, spirals, cycloids (Figure 2) , etc.
My review of the JJB library in the October 1989 issue prompted John Muczynski to create a graphics pull-down menu system with deeply nested menus. The separate include code allows you to change key assignments and create macros. The new configuration may be saved and restored. He also has submitted an example program, "Conway's game of life," using the pull-down menu.
Updates
CUG295 blkio Library
The blkio library released in the November issue has been updated. Version 1.1 includes minor bug fixes and modifications.
Retrospective
CUG started collecting and maintaining public domain source code (originally just BDS C source code) nine years ago. The library started with just ten standard CP/M 8-inch disks. Currently, the total number of volumes (one volume includes one to three 360K MS-DOS disks) has surpassed 300.The past nine years have brought remarkable changes in C compiler technology and in the microcomputer marketplace. Figure 3 shows the change in formats requested by our members. Over the past three years, CP/M has become virtually extinct and MS-DOS has come to dominate. More interesting, however, is the diversity of operating systems used in recent years. Macintosh, UNIX/Xenix, Atari and Amiga have appeared more than ever indicating that more and more programmers who use non-MS-DOS operating systems are interested in C and are seeking portable C source code. I think this trend is strong evidence that C is a portable language.
Table 1 shows the 20 most popular disks in the last three years.
The most-ordered CUG disk is MicroEmacs v3.9 (CUG#197 and CUG#198). MicroEmacs faithfully implements most of the features of Richard Stallman's Emacs editor. Daniel Lawrence claims copyright privileges for this version which has also been updated and enhanced many times by our staff and members. The secret of MicroEmacs' popularity seems to be its portablity (it runs on more than ten different operating systems), rich set of features, and its configurability a built-in macro language lets MicroEmacs be tailored to virtually any task.
The next two most popular disks are UNIX tools used in compiler development. CUG#172, #173 and #290 are LEX, a lexical analyzer that extracts tokens from an input character stream. CUG#285 is a YACC compatible parser and code generator.
As you'll notice from the Top 20 list, our library contains a wide variety of application programs and development tools, including cross-assemblers, windows, graphics, an AI application, communications, and a math package, among others.
One of the more recent trends in the library is the emergence of shareware. Even though you must pay some minimal fee for the source code of a shareware program, the quality of some volumes is very competitive with more expensive commercial products. Another trend is the submission of more serious and specialized applications. For example, the 3-D medical imaging software on CUG#293-294.
Wish List
Even with all this diversity, there are many frequently requested packages.
A Simple Text Editor
Many people have asked for a simple text editor that can be embedded in their application. The editor needn't be fancy and powerflike MicroEmacs, but should offer these features:
- Be callable (as a function) from the application program
- Function in both full-screen and windowed applications
- Can retrieve and save a file
- Can browse a file (page up/down)
- Be modeless
- Support block manupilations (block copy, move, or delete)
- Can be compiled with small model under MS-DOS
- Can read up to 30K ASCII text
- Search or replacement is optional
- Go to the specified line number is optional
An ANSI C Compiler
This is a real challenge. We hope to address this need by distributing the GNU C compiler (and C+ + compiler) from The Free Software Foundation.
.PDX Or .DBF File Function Libraries
A .PDX file is an image file produced by ZSoft's PC Paintbrush. It is a common graphics file format for the PC and is also used by most scanners, fax programs, and desktop publishing programs. A .DBF file is a data file used by Ashton-Tate's dBase programs. We need function libraries that manipulate these standard format files.
Spread Sheet
As with the editor, we need a simple spread sheet that can be embedded in larger applications.
Pascal To C Translator
This would be useful for Pascal programmers trying to port their programs. Michael Yokoyama (HI) has forwarded such a program to us, but we have been unable to contact the author, Per Bergsten of Sweden, to get permission to release the program. Please let us know if you can contact Per Bergsten or know of an independent version of this code.
C To Pascal
Useful for Pascal programmers who want to port an application program written in C.
Cross C Compiler
Thanks to Will Colley, we have a variety of cross assemblers. However, our only cross C compiler is CUG204, 68000 C compiler by Matthew Brandt, which runs under MS-DOS and generates 68000 object code. We need more variety in this area (like a cross C compiler that runs under MAC and generates 8086 code).
Download Fonts In A Laser Printer
All sorts of applications could make better use of laser printer capabilities if they could download special fonts. We'd like a library of functions that can read Bitstream, Ventura Bitmap and other popular font files and download them to an HP compatible.
Sideways Text
Not a configuration utility that uses a printer's landscape mode, but a utility that exploits a printer's graphic mode to print 90° rotated text. Why not?
Database Management
We would like a simple and useful relational database manager in C.If you've seen C source code such as those listed here or can implement them, please let us know. In addition, we are interested in obtaining C++ and C source code for Macintosh. Moreover, I believe you have your own wish list. Please let me know about it for a future column.
P.S. Henri de Feraudy of France, the author of Small Prolog in CUG#297, is sending us a PC version of Little Small Talk. It will be a new release in a future issue.