Chinaunix首页 | 论坛 | 博客
  • 博客访问: 468053
  • 博文数量: 724
  • 博客积分: 40000
  • 博客等级: 大将
  • 技术积分: 5010
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-13 14:47
文章分类

全部博文(724)

文章存档

2011年(1)

2008年(723)

我的朋友

分类:

2008-10-13 16:56:47

CUG CD-ROM Vols. 440-459


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:

  • Text and .INI files (18 functions)
  • Low-level keyboard (42 functions)
  • Linked list (6 functions)
  • Math and Matrices (26 functions)
  • 2-D and 3-D vectors (33 functions)
  • Mouse (13 functions)
  • String manipulation (80 functions)
  • Text-mode screen I/0 (60 functions)
  • SVGA bitmaps with animation (50 functions)
  • much more!

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:

  • What is a Pointer?
  • Pointer Types and Arrays
  • Pointers and Strings
  • More on Strings
  • Pointers and Structures
  • More on Strings and Arrays of Strings
  • More on Multi-Dimensional Arrays
  • Pointers to Arrays
  • Pointers and Dynamic Allocation of Memory
  • Pointers to Functions

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.

  • Generic classes:
    • Tree structured class hierarchy, similar to NIH class lib
    • General purpose (e.g. arrays, linked lists, AVL trees)
    • Interface classes for UNIX system calls: pipes, select, sockets
    • Persistent objects
  • Simulation:
    • Event driven simulation classes
    • Statistical evaluation classes
    • Random number generator and distribution classes
  • Fuzzy logic:
    • Fuzzy sets, fuzzy variables, fuzzy rules and inference engine for building fuzzy controllers and expert systems
    • Fuzzy rules to C++ translator
  • Graphics:
    • Interface classes for DEC's ezd graphics server
    • Interface classes for GIST graphics server (available separately)

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:

  • Countdown timer: for use with board games, cooking, and other applications. Requires VGA and 386 or better.
  • Alert: combination "burglar alarm" and "screen saver". It flashes a warning message on the screen and simulates a phone dialing the police.
  • OneTime: an extremely secure file encryption system based on the "one-time" cipher used by intelligence agencies.
  • Butterfly: colorful graphic demonstration of Pikover's "butterfly" curves.
  • CountUp: restartable count-up timer with a very large digital display. Requires VGA and 386 or better.
  • Pi5Ways: demonstrates calculating the value of PI in five different ways.
  • WCHILL: wind chill calculator.
  • Fractional calculator and fraction class (C++)
  • Soundex: algorithm for translating names into a form suitable for archiving.
  • Blank: a simple-minded screen saver

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:

  • ima(3): an image library as from the University of Twente . A simple version of the ima(3) library is included with CppIma.
  • : a tool for information processing and visualization with an extensive image processing library.
  • Scil-Image: a large collection of linear filters, morphologic filters, segmentation algorithms, measurement functions and arithmetic operations for both 2D and 3D binary, grey, floating point, complex valued and color images.

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:

  • Filenames with pipes embedded
  • Explicit Endian I/O of short/long integers (guarantees portability)
  • Stream sharing of different I/O types
  • Simple variable-length coding of short integers
  • Arithmetic compression of a stream of integers

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.


Kerwin F. Medina (New Westminster, BC) contributes LZHLIB, a small C library with the minimum code neccessary to compress and uncompress using the LZH algorithm. This library is a direct derivative of the source cod of Haruhiko Okumura's popular "ar" archiver. Medina has created the library so an application can make use of compression with a function call and without having to spawn an external compression program. The library has only two API functions: "lzh_freeze" (to compress) and "lzh_melt" (to decompress). In both cases, the caller only has to provide the I/O functions and memory allocation functions. The interface is simple enough that you can integrate it with fewer than 20 additional lines of code in your program. LZHLIB can be built on MS-DOS, Unix, and other platforms. LZHLIB as released on 04/18/96 is now available on the CUG CD-ROM.

Gray Watson (Pittsburgh, PA) submits dmalloc, the debug memory allocation library. The dmalloc library has been designed as a drop-in replacement for C runtime malloc(), realloc(), calloc(), free() and other memory management routines. It provides many debugging facilities that you can configure at runtime, including: memory-leak tracking, fence-post write detection, file/line number reporting, and general logging of statistics.

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.



Last updated on 9/7/96
--------------------next---------------------

阅读(598) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~