Steven K. Graham has worked for Hewlett-Packard, served on the Faculty at UMKC, and is currently a Senior Engineer with CSI.
TextView, CUG375 (one disk) is a free Dynamic Link Library (DLL) for simplified manipulation of text windows under Microsoft Windows, written by Alan Phillips (Lancaster, United Kingdom). Alan Phillips is a systems programmer at the Lancaster University Computer Centre, where he writes UNIX communications software. Alan can be contacted at a.phillips@lancaster.ac.uk.
Similar to WinDosIO, a previous CUG volume, TextView handles the details of window operations, permitting users to call functions for writing text (such as TVOutputText) in much the same way printf would be called in an MS-DOS application (with the exception of an extra parameter to identify the window where the text will be written). TextView can create multiple, independent windows that can be resized, minimized, maximized, and scrolled horizontally and vertically. A thoroughly-documented demonstration program illustrates the use of TextView windows to provide tracing and debugging information during application development. TextView requires the use of a compiler (such as Microsoft C) which can generate Windows code. The TextView volume includes a readable and carefully-organized 42-page manual. The TextView functions follow the same conventions as the Windows API, and the manual uses the same layout as the Microsoft Windows Programmer's Reference. TextView function names all begin with TV. The functions use Pascal calling conventions and must be declared FAR.
Function prototypes are contained in the file textview.h. Adding this file to your source selects the right calling mode and performs necessary casts to far pointers. The TextView import library textview.lib must be included in the list of libraries to be linked. The stack size required for your application may need to be increased. Some functions in the TextView import library must be statically linked.
Dual-Mode tools
Volume 376 (four disks) adds OS/2 tools to the CUG library. Martii Ylikoski, of Helsinki, Finland, has provided a large number of free, dual-mode tools that support both OS/2 and MS-DOS. The tools are remarkably well packaged. Each tool includes accompanying source, makefile, documentation, and demo files, along with files (.bat or .cmd) to install and uninstall the tools. For OS/2 there is also a tools2.inf file, in the standard format for OS/2 help files. Full source code is included, generally with a single file per utility. The makefiles (<toolname>.mak) indicate the required dependencies. A library was used in building the tools, and is included in two forms mtoolsp.lib for protected mode and mtoolsr.lib for real mode. No documentation for the libraries exists, other than the examples of function use provided in the source code for the tools. The collection of 54 utilities provides a variety of functions such as: find file (ff), disk usage (du), head, tail, set priority (setprty), touch, cat, and scan (a find-like utility that searches for files and executes commands once the files are found).
Hard-To-Find Information on Floppy Disks
Diskette manipulations are the core of CUG 377 (one disk), provided by Ian Ashdown, P. Eng., of West Vancouver. This volume provides a wealth of information about diskette device-service routine (DSR) functions. The documentation addresses a variety of quirks in diskette access, and provides considerable hard-to-find information on floppy diskettes, diskette controllers, and the diskette DSR functions. The volume also provides extensive example and test routines, with source code (in both C and C++ versions), for reading, writing, formatting, and verifying almost any IBM System 34 format diskette on a PC compatible. The code includes support and interface functions that increase the diskette DSR's reliability and provide a consistent programming interface across PC platforms. The information was largely determined through extensive use of an in-circuit emulator and other debugging tools, along with careful study of various machines and various DOS and BIOS versions. Given the variety of ROM BIOSes available, and the necessity to derive the information by experimentation, the material in this volume cannot cover every case, but certainly provides a thorough and careful treatment.
C++ Matrix Operations
From Robert Davies, a consultant and researcher in mathematics and computing from New Zealand, formerly with the New Zealand Department of Scientific and Industrial Research (DSIR), we get NEWMAT (CUG 378, one disk), a C++ matrix package. This volume was written for scientists and engineers who need to manipulate a variety of matrices using standard matrix operations. It was developed by a scientist (Robert Davies has a Ph.D. from the University of California at Berkeley) to support real work. NEWMAT emphasizes operations supporting statistical calculations. Functions include least squares, linear-equation solve, and eigenvalues.Matrix types supported include: Matrix (rectangular matrix), UpperTriangularMatrix, LowerTriangularMatrix, DiagonalMatrix, SymmetricMatrix, BandMatrix, UpperBandMatrix, LowerBandMatrix, SymmetricBandMatrix, and RowVector and ColumnVector (derived from Matrix). Only one element type (float or double) is supported. Supported matrix operations include: *, +, --, inverse, transpose, conversion between types, submatrix, determinant, Cholesky decompositions, Householder triangularization, singular value decomposition, eigenvalues of a symmetric matrix, sorting, fast Fourier transform, printing, and an interface compatible with Numerical Recipes in C. NEWMAT supports matrices in the range of 4x4 to the machine-dependent, maximum array size 90x90 double elements or 125x125 float elements for machines whose limit for contiguous arrays is 64K. NEWMAT works for very small matrices, but is rather inefficient.
NEWMAT works with Borland and Glockenspiel C++. The version current at this writing (NEWMAT03) doesn't work with GNU C++, but a new version (NEWMAT06) is expected (by November 1992) that will work with GNU C++. Robert Davies suggests the following as criteria for interest in NEWMAT: first, a desire for matrix operations expressed as operators; second, a need for various matrix types; third, a need for only a single element type; fourth, use of matrix sizes between 4x4 and 90x90; and fifth, tolerance for a large and complex package. There is a fairly large file documenting the package, which broadly addresses issues from particulars of functions and interactions with various compilers, through design issues in building a matrix package. If you fit the profile described, then NEWMAT may be the matrix tool you need.
Archiving and Compression Program
The final CUG volume for this month (CUG 379, one disk) is ZOO (version 2.1), a file archiving and compression program (standard extension .zoo), written by Rahul Dhesi, with assistance from J. Brian Walters, Paul Homchick, Bill Davidsen, Mark Alexander, Haruhiko Okumura, Randal L. Barnes, Raymond D. Gardner, Greg Yachuk, and Andre Van Dalen. This volume includes C source, executable, and documentation. Zoo is used to create and maintain collections of files in compressed form. It uses the Lempel-Ziv compression algorithm which yields space savings from 20% to 80% depending on the file data. Zoo can manage multiple generations of the same file and has numerous options accompanied by lengthy descriptions in the manuals. Zoo supports a range of hardware and operating systems, and includes makefiles with various options. Zoo is part of the GNUish MS-DOS project, an attempt to provide a GNU-like environment for MS-DOS, with GNU ports and MS-DOS replacements for non-ported GNU software.