分类:
2008-10-13 16:56:47
George Vanous (Delta, BC) submits his library of essential and efficient C-callable functions. Although oriented towards MS-DOS, many of the algorithms are relevant on other platforms such as Windows and Unix. BESTLibrary consists of 282 functions coded in assembler and 68 functions written in C. All calls require far pointers (e.g. Large memory model). The library functions are roughly categorized as:
BESTLibrary is freeware, but the author would like to hear all comments from users of the library (email or postcards). The CUG Library distribution includes code for the 68 functions with C source. For the source to the assembly language portion, you must register with the author for a nominal fee of $10. BESTLibrary v2.32 (released 09/12/94) is immediately available as CUG #440.
George Vanous' also submits his VGA Editor for editing and animating graphics images with full mouse support. The VGA Editor creates graphics files that are fully portable into C and Pascal programs in conjunction with BESTLibrary (CUG #440). The editor is ideal for drawing small pictures and animations for use with 16-color VGA modes. VGA Editor will also read in Windows .ICO files for editing (but does not yet support writing them). The editor can accomodate multiple-frame animations in a single editing session. Fig. 1 shows the zoom style of editing on a single frame.
VGA Editor is distributed as shareware and you must register the product if you find it worthy of continued use. Registration is only $5 and includes complete documentation on the operation of VGA Editor and integrating graphics into your programs. Addtionally, the complete C source code for VGA Edtor is also available for $10.
Ted Jensen (Redwood City, CA) has contributed his manuscript "A Tutorial on Pointers and Arrays in C" to help novice C programmers learn proper usage of these critical language elements. Looking back to my own apprenticeship in C more than 10 years ago, I still have vivid memories of my trials with pointers. Jensen's work is based on a tutorial originally found in Bob Stout's popular "SNIPPETS" C code collection.
Jensen provides ten chapters of tutorial information which is profusely illustrated with detailed source code, as shown below:
Version 0.2 of the tutorial (released 12/19/95) is immediately available as CUG #442.
Martin Steppler (Aachen University of Technology, Germany) submits the Communication Networks Class Library (CNCL), a C++ library created by the Communication Networks department of Aachen. CNCL is both a class library featuring generic C++ classes as well as a simulation library with strong points in random number generation, statistics, and event-driven simulation.
CNCL is distributed under the , and thus includes source code. Although the graphics require DEC Ultrix, the remaining classes should work fine with any GNU compatible C++ compiler. PC users MUST obtain or similar utility to unpack the files which are Tarred and Zipped (.TZ). CNCL v1.4 (released 01/05/96) is immediately available as CUG #442.
Mendel Cooper (Grantsville, MD) contributes a volume of MS-DOS games: Wordy, ChessClock, and Chaos Game. Wordy is an educational word-game study system that builds pattern and word recognition skills used in Scrabble (tm) and Boggle (tm). The Wordy practice game checks words you unscramble against a 100,000 word dictionary. Wordy also includes standalone Search, Anagram, UnScramble, and word-pattern find utilities. A BINGO utility looks up all valid permutations of letters of a word. The 1DIF utility finds all legal words constructed by substituting a single letter. WORDY received a five-star (highest possible) rating in (December 1995, p. 365).
ChessClock includes a digital display, move counter, pause function, and more. It requires VGA and 386 or better to run. Its also useful for timing Scrabble (tm) games because the clocks may be paused.
One of the discoveries of the new science of Chaos is that there seems to be an underlying order in randomness. The Chaos Game uses the , a figure with a fractal dimension of less than two (see Fig. 2). Requires VGA and 386 or better to run.
The CUG Library edition includes full Borland C/C++ source code for each program. Each of Mendel's programs is shareware with an extremely low registration fee (less than $5) for each program. Mendel's Games (released 12/22/95) is immediately available as CUG #445.
Mendel's second volume includes an eclectic mixture of ten different text and graphics utility and algorithm demonstrations. Here's a list of what you'll find:
The CUG Library edition includes full Borland C/C++ source code for each program. Each of Mendel's programs is shareware with an extremely low registration fee (less than $5) for each program. Mendel's Utilities (released 12/22/95) is immediately available as CUG #445.
The Are Magnus Bruasat of the SINTEF group at the University of Oslo (Norway) submits Diffpack: a fully object-oriented framework in C++ for solution of Partial Differential Equations (PDEs). PDEs often arise in the mathematical modeling of physical processes involving for example fluid mechanics or waves. Some typical uses of Diffpack include standard model PDEs, 3D linear wave equation, incompressible Navier-Stokes, and stochastic ODEs. Diffpack can interface with and plotmtv. You can even construct MPEG movies from multiple visualization frames.
Diffpack has been certified to run on any of the following environments: Hewlett Packard HP-UX 9.05 and C++ 3.50, Silicon Graphics IRIX 5.2 and C++ 3.2.1, Sun Sparc Solaris 2.3/SunOS 5.3 and C++ 4.0. More information can be found on .
Diffpack v1.4 is immediately available as CUG #446.
Michael F. Watson and Dean Lance Smith contribute RELAY: an interactive overload protection design tool for electrical engineers. Relay plots the time-current characteristics of overcurrent protection devices and coordinates the overcurrent protection devices at an electric distribution substation. The source code is entirely in C and includes makefiles for the Microsoft C compiler.. The RELAY.EXE executable requires MS-DOS and VGA display.
The traditional approach to staging overcurrent protection devices has been to plot the time-current curves for various relay settings using paper and pencil, compare the curves of the various relays and fuses, and then adjust the settings of the relays until a solution is reached. RELAY reduces the time required to complete the task and provides greater accuracy. Relay v1.0 is now available on CUG CD-ROM as volume #447.
Surojit Chatterjee and Dean Lance Smith submit a tool for detecting digital circuit problems via signature analysis. Signature analysis is a technique used in servicing microprocessor-based systems. With this technique, an instrument called a signature analyzer is used to check a digital circuit by detecting the bit streams at various nodes of the circuit. The bit streams are displayed as hexadecimal signatures. The actual signature of a node is compared with its predetermined correct signature. The result of the comparison is used to trace faults in the system down to the component level. This distribution includes complete source in C and MS-DOS executables. The source supports Borland Turbo C but could possibly be ported to other environments. Signature analysis v1.0 is now available on CUG CD-ROM as volume #448
Nullsock, by Jean-Michel Mercier (Paris, France), is a Winsock simulator which allows you to run Winsock applications offline. This is most useful for forcing a web browser to work on offline copies of HTML files that you have downloaded. You might want to do this because you're "on the road" with a portable computer but without a immediate Internet connection or perhaps to avoid paying online charges to view material you've already downloaded several times. Nullsock works by loading a dummy WINSOCK.DLL with its entry points replaced by stubs. You can either run Nullsock directly or use Nullsock to spawn the desired application. Nullsock was designed to work with Windows 3.11 and has been tested with Netscape and AIR Mosaic. It will work with Windows 95, but only when running 16-bit Winsock applications. Nullsock includes complete C source and compiles with Borland C. Nullsock version 1.0 is available on CUG CD-ROM as volume #449.
Klamer Schutte of the TNO Physics and Electronics Laboratory (The Hague, Netherlands) contributes the CpppIma image processing class library. CppIma library provides an interface to common operations on images for C++ applications. The operations include file I/O, image creation, iterators for traversing images, and histogram creation. The library's is enabling easy construction of image processing programs. Secondarily, Schutte hopes to achieve reasonable performance and create an image library independent API. CppIma achieves the latter by its support for three popular base libraries:
CppIma works with the GNU C++ compiler (g++) and most Cfront based compilers. It requires 32 bit integer, and 64 bit doubles. CppIma is distributed under terms of the . It is available on the CUG CD-ROM as volume #450
Schutte has also contributed ClipPoly, an extended C++ polygon clipping library with set operators. Classical clipping algorithms will tell you whether a point "x" is withing a given polygon "A". ClipPoly handles the more general case of two polygons "A" and "B" where you want to know the areas of intersection of "A" and "B", "A" minus B", and "B" minus "A". Although the Weiler-Atherton algorithm already solves this case, Schutte presents a simpler but just as effective algorithm. The ClipPoly algorithm requires only that all polygons are non-self-intersecting (i.e. there are no "holes").
ClipPoly requires a C++ compiler with template support, such as GNU C++ 2.6.3 or later. The algorithm is primarily supported on SUN and SGI Unix platforms, though other platforms may also work. ClipPoly is distributed under terms of the . It is available on the CUG CD-ROM as volume #451.
Sean Gordon (Fife, Scotland) submits Freedock, a Windows "dock" program that includes the full source code in C. A dock is kind of a miniature version of Program Manager that holds icons for the small number of applications that you use most often. Freedock also remembers your preferred window geometry for each application that you register with it. This saves you from the burden of re-arranging your windows each time you startup an application. A "previewer" allows you to check or change the window geometry without actually launching the applications. The entire dock can be scaled in a way similar to the MS Office Manager dock.
Freedock includes compiled versions of a Win16 executable for Windows 3.1 (FREEDK16.EXE) and a Win32 executable for Windows 95 and NT (FREEDK32.EXE). The Freedock archive includes source code written in C for use with Borland C/C++ or Microsoft Visual C/C++ v1.5 (16-bit) and v2.0 (32-bit). In the Win32 version, you can choose to start applications in separate memory. Freedock is freeware and any programs derived from its source must remain freeware. Freedock version 2.5 is immediately available on the CUG CD-ROM as volume #452.
Jean-Claude Wippler (Houten, Netherlands) contributes his MetaKit, a compact class library for data storage and easy manipulation of structured objects and collections in C++. MetaKit works with any C++ compiler that supports Microsoft Foundation Classes including VC++, Borland C++, and Symantec C++. MetaKit allows your data to be loaded on demand, which allows you access to any size files. It uses traditional database metaphors of begin work/commit work/ rollback work with automatic file storage allocation and reclamation. MetaKit allows data to be "flattened" for efficient streaming over sockets and pipes. It encapsulates data in terms of view, row, and property classes. Data can be conveniently accessed via "[]" and "()" by operator overloading. Applications can statically link MetaKit or load it as a DLL.
MetaKit is distributed as shareware. If you use it beyond the 30-day evaluation period then you must register it. Personal-use registration is $25 and commercial-use registration is $65 (includes full source code). The evaluation copy of MetaKit v1.2 is available on the CUG CD-ROM as volume #453.
Beat Rigazzi (Oberonz, Switzerland) submits the Sound Wizards Module Player (SWMP), a driver for playing .MOD sound files through any digital audio card (SoundBlaster compatible). The .MOD audio file format The .MOD file is a multichannel sampled audio file which supports 4, 6, or 8 simultaneous channels. The .MOD file has fewer limitations than the .WAV file and for that reason has become widely used by electronic music and game producers. SWMP includes several example .MOD tracks for you to experiment with and a standalone MS-DOS player program (SWMP.EXE). SWMP provides an API and calling interfaces for Borland C/C++, Assembler, and Pascal. You can integrate the library simply by including the header file and linking in MOD_DRV.OBJ (source not provided).
The driver has a small API but you can start your first MOD file playing with as few as three function calls. A powerful hardware detection which identifies configurations of SoundBlaster, SoundBlaster Pro, and Gravis UltraSound digital audio adapters. This lets users avoid having to remember obscure DMA and I/O port settings. SWMP is freeware and can be incorporated into other freeware programs. If you want to use SWMP in a commercial product, you must contact the author first. SWMP version 1.41 is available on the CUG CD-ROM as volume #454.
Oleg Kiselyov (Denton, TX) offers his Advanced I/O C++ Class Library which enhances the capabilities of stream I/O with encoding and compression. Some of these features include:
The Advanced I/O class library has been designed with portability in mind: it compiles on Unix (GNU C++), Macintosh, and MS-DOS platforms (including Borland C++). Kiselyov has placed this library in the public domain. Advanced I/O library v2.23 is available on the CUG CD-ROM as volume #455.
Dmalloc is highly portable and users report success on many platforms, including: AIX, BSDI, DG/UX, HPUX, Irix, Linux, MS-DOS, NeXT, OSF, Solaris, SunOS, Ultrix, Unixware, and Cray Y-MP. The package includes the library, configuration scripts, debug utility application, test program, and docs (ASCII and PostScript). Dmalloc is free for academic and non-commercial use. Commercial users must register as shareware for US$35. Dmalloc version 3.2.1 as released on 9/30/95 is now available on the CUG CD-ROM.
Kiselyov Oleg (Denton, TX) contributes Grayimage, a C++ class library for dealing with full-depth grayscale images. Grayimage upports all standard image algebra/arithmetics including dealing with image slices, histogram equalization, and computing various norms and scalar products. The package reads and writes PGM, XWD and Group G (grayscale) TIFF file formats with automatic recognition of the input image file format. It's possible to assign one image to another to fit, no matter what their dimensions are.Grayimage is highly portable: Oleg has personally verified ports for Unix with GNU C++ (SUN, HP-UX), Macintosh with Metrowerk's C++, and Windows 95 and NT with Borland C++. Grayimage v2.2.3 as released on 03/31/96 is now available on the CUG CD-ROM.
Alex Hunger (Adlington, Lancashire UK) submits MMND, a game that puts the computer in the role of "codebreaker" in the classic MasterMind (TM) boardgame. The interesting aspect of Hunger's implementation is that the computer can guess a pattern that you choose. It uses an optimal information-theoretic algorithm and so plays extraordinarily well -- better than any human being. This takes a lot of computation, so patterns chosen are stored in a data file so a computation never needs to be made twice. The patterns chosen are put through a randomizing algorithm that makes the game more interesting to play, without losing optimality.MMND is written in C++ and should compile under any C++ compiler with
multiple inheritance, ANSI header files and ANSI libraries. This includes
MS-DOS and Unix platforms. MMND has a pipe mode so it can be run with
an X-Windows or other windowing system wrapper. Hunger has generously
placed the source code in the public domain. MMND as released on
10/8/96 is now available on the CUG CD-ROM.