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.
New Acquisitions
- PSUtils (CUG #407): a potpourri of PostScript manipulations
- SNews (CUG #408): threaded Usenet newsreader for UUPC/extended
- SuperVGA test kit and Universal VESA VBE (CUG #409): essential tools for device-independent SuperVGA graphics in MS-DOS
- PART (CUG #410A): Partition table and hard-disk examination utility for MS-DOS
- WLIST (CUG #410B): C++ class library for doubly-linked lists
PSUtils: CUG 407
PSUtils, by Angus Duggan (Edinburgh, Scotland), is an assortment of utilities for manipulating PostScript documents. It supports age selection and rearrangement, including arrangement into signatures for booklet printing, and page merging for n-up printing. The complete collection of PSUtils Release 1-PLll (June 1993) is now available as CUG library volume #407.PSUtils has been compiled and tested on Sun-3 and Sun-4 machines in every version of SunOS from 4.0.1 to 5.1 (Solaris 2.1). This version of PSUtils also supports other UNIX configurations, including HP 9000/375 machines under HPUX 7.0 and HPUX 8.0, Sequent Symmetry machines under Dynix 3.1.4 and PTX 3.2.0, and Decstation 3100 machines under Ultrix 4.0.
PSUtils is not a monolithic system, rather it is a collection of C programs, C shell scripts, and PERL scripts. Each utility includes its own command-line interface and corresponding manual page. The utilities are shown in Table 1.
The PSUtils licensing scheme allows you to incorporate any parts of it into your own products. Your only obligations are to attribute them to the original author and provide information on how their original sources may be obtained.
SNews: CUG 408
Daniel Fandrich (Clearbrook, B.C., Canada) offers his SNews threaded Usenet newsreader add-on for PCs running UUPC/extended. UUPC/extended is shareware package which provides dial-up e-mail access to public networks such as the UUCP network and/or the Internet. SNews can be built using Borland Turbo C for either MS-DOS or OS/2. The CUG Library distribution includes MS-DOS executable and full source on a single diskette. SNews version 1.91 (released 08/25/93) is immediately available as CUG volume #408.SNews is a news add-on for UUPC/ Extended v1.11n or later. It is designed to handle Usenet news as a leaf node, and offers the following features:
- Threaded news reading. This allows you to be much more selective about what you read, enabling you to cover many more newsgroups.
- When a cross-posted article is read, the news reader marks all the other instances of the article as read as well.
- SNews keeps separate rc files for each user which record the individual articles that have been read. This feature contrasts with some readers; which simply record the highest article number read.
- The usual range of response facilities are provided: follow-up news, reply by mail, forward by mail, and save article/thread to disk.
- The extract function (key "w") saves articles to a user-specified file in the UUPC mailbox format (with a header of 20 hex 01's). Thus, users can read extracted news articles later with the mail program, at their convenience.
- SNews provides built-in support for ISO 8859/1/2/3/4/9 character sets (RFC 1341 and RFC 1342) and a single key interface to the metamail MIME decoder (or other user-specified program).
- Articles are stored in two files per newsgroup, rather than in one file per article. This feature results in an enormous saving (up to 3:1) in disk space on disks with a default cluster size of 4 KB per cluster.
- SNews processes batched compressed or uncompressed news. It does not process control messages.
- Duplicate cross-posted articles are killed during the unbatch stage.
- Posted articles are unbatched and uncompressed. You can only post to your "mailserv" you cannot feed another site. You can only post from within the news reader SNews.
- SNews implements a received-date-oriented expire to maintain the news database.
SuperVGA VESA VBE Test Kit and Universal VESA VBE: CUG 4O9
Kendall Bennett of SciTech Software (Melbourne, Australia) submits his SuperVGA VESA VBE test kit and Universal VESA VBE. The SuperVGA VBE VESA test kit thoroughly tests and demonstrates the VBE BIOS calls. The Universal VESA VBE is a shareware drop-in replacement for an existing VBE driver you might or might not already have. As you may recall, the Video Electronics Standards Association (VESA) has established criteria allowing interoperability of SuperVGA hardware and software. The VESA BIOS Extensions (VBE) provide the ability to address video modes beyond regular VGA (640x480x16) in a hardware-independent fashion. Although the test kit includes full source code, the shareware VBE replacement driver only offers source code for an additional licensing fee from SciTech Software. Both are immediately available on a single diskette as CUG volume #409.
The Test Library
The SuperVGA Test Library is a set of routines for working with SuperVGA video cards that have a VESA VBE-compliant Video BIOS. This library was an offshoot from the development of the Universal VESA VBE, which is an installable TSR to provide VESA VBE video BIOS extensions for most SuperVGA cards. The Test Library is intended to show how to program the SuperVGA cards through the VESA VBE and uses some of the more powerful features that the latest standard includes. The Test Library was not designed with speed in mind, but more as an explanatory and exploratory tool.This library supports many of the extended features of today's SuperVGA adapters, such as separate setting of the read and write banks and support for extended page flipping. The library implements all of these features via the standard VESA VBE programming interface.
The SuperVGA test programs all call upon a single C library to access the SuperVGA using the VESA VBE programming interface. You can use this same library to provide SuperVGA support in your own applications, or you can take the source code for the library as a starting point and expand on it from there.
The TSR
You may already have a VESA VBE TSR for your video card, or your video card may have a VESA VBE compatible BIOS already, so why would you want to use this replacement TSR? Most TSRs, and especially those for older SuperVGAs, implement only v1.0 or 1.1 of the VESA VBE programming interface (if any at all). Accordingly, programs expecting to use advanced features of the new VESA VBE v1.2 standard will not work them.So what advanced features does this TSR provide that other's don't? The Universal VESA VBE implements the VESA VBE 1.2 programming interface, which supports the following features:
- SuperVGA page flipping. High performance animation programs can use your card to full potential using the VESA BIOS to implement extended page flipping (for example, 1024x768x16 double-buffered animation, or even 800x600x256 and 640x400x32k/64k on a 1Mb video card).
- SuperVGA virtual screens. Programs may set up a virtual display resolution of, say, 1024x1024 pixels, and smoothly scroll a window with less physical resolution around within this buffer.
- Support for the 32k-, 64k-, and 16-million-color video modes. VBE 1.2 also supports the industry standard 16- and 256-color video modes.
- Speed. The bank switching code in this package runs faster than the routines embedded in the video BIOS of video cards.
- Programs that know about the Universal VESA VBE protected mode extensions can use the high performance protected mode programming interface provided by this TSR.
- Extremely small size. When the TSR is resident in your computer it only requires about 3k of memory, which is smaller than the size of most commerical VESA VBE TSRs. You can also load this TSR high to save even more memory.
Terms of Use
The SuperVGA VBE test library carries few restrictions on source code use. The Universal VESA VBE is shareware and requires a $15 registration after a 21-day evaluation period. Source code for the Universal VESA VBE can purchased separately for $50.For more information about VESA VBE, see some of my tutorials in these other R&D Publications journals:
"The VESA BIOS Extensions for SuperVGAs," Tech Specialist, December 1990, p. 12 (covers VBE v1.1)
"VESA's VGA BIOS Extension (VBE) Standard," Windows/DOS Developer's Journal, October 1992, p. 13 (covers VBE v1.2)
Partition Table and Hard Disk Analysis Program: CUG 410A
Gary A. Allen, Jr., (Prentice Center, Queensland, Australia) submits his PART utility for examining the partition table and hard disk parameters under MS-DOS. PART works with all MS-DOS compatible hard disks and provides additional low-level information on Integrated Drive Electronics (IDE) disk controllers. Allen notes that although there are powerful partition editors available, all of them run the risk of accidently changing these critical disk parameters. Since PART is a read-only display, it keeps the partition tables secure at all times. PART includes full source in C and claims compatability with the Borland C/C++ compiler. PART version 1.5, as released on 10/27/93, now appears on CUG #410.Although PART is intended for use only with MS-DOS, you can still run the BIOS reporting functions under OS/2. However, you may not use the IDE controller interrogation functions in an OS/2 window. A typical PART display reports number of cylinders, heads, and sectors/cylinder, as well as partition type, beginning and ending cylinder, side, and sector for each partition. If you have an IDE controller, you can also obtain several other vital statistics including model number, serial number, controller revision, 32-bit transfer compatibility flag, controller type, controller buffer size, number of Error Correction Code (ECC) bytes transferred, and number of sectors processed on each interrupt.
WLIST C++ Doubly Link Lists: CUG 410B
William E. Hatch of Coleman Research Corporation (Greenbelt, MD) submits his C++ class library implementation of doubly-linked lists. The wlist class is a doubly-linked list that stores a generic pointer, void *, at each node. You can set pointers to functions which print and compare the objects pointed to at a node within a wlist class instance. Subsequent use of the print or compare functions assumes that all of the nodes, within a wlist instance, point to the same type of object. The wlist class includes a self-testing program to verify functionality on your platform.The pulic interface for the wlist class includes several useful operations, as shown in Table 2.
The wlist class as released on 02/15/94 is now available on CUG # 410.