Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

C++ Users Group (CUG) Library Update


March 1998/A C/C++ Users Group (CUG) Library Update


Introduction

Since 1981, the mission of the C/C++ Users Group (CUG) has been committed to low-cost distribution of shareware and freeware C/C++ source code. The CUG is an independent organization sponsored by C/C++ Users Journal. CUG remains impartial to compiler vendors and platforms. Currently, CUG focuses heavily on cross-platform compatibility with Unix, Windows, and other platforms. You can visit the CUG on the web at http://www.HAL9K.com/cug.

The CUG CD-ROM is the primary vehicle by which the CUG organizes and redistributes tools and libraries. One CD-ROM includes nearly 400 archives covering the gamut of subjects from compilers to windowing systems. It also includes a complete copy of the website for offline viewing, an HTML viewer, Access 97 database indexes, and tech support information for each product (where available).

CUG in Print Again!

After a hiatus of more than five years, CUG is back in print. On February 1 1998, CUG and R&D Technical Books launched a special book plus CD-ROM edition. The book, now entitled C/C++ Treasure Chest: A Developer's Resource Kit of C/C++ Tools and Source Code (ISBN 0879305142) includes summaries and indexes of all CUG archives. List price for the combined edition is only $39.95. In my five years of stewardship I've shepherded more than 100 new archives of software through CUG, but this is my proudest moment.

What's New on the CUG CD-ROM

This edition represents the single biggest installment to the CUG Library in its 17-year history. There is a greater emphasis on C++, though we haven't forgotten our C roots. Here's a brief summary of the new titles:

CUG# Summary
467 LADsoft 32-bit C Compiler for 386 & M68k families
468 Programmable Arbitrary Precision Calculator for Windows
469 V: a platform-independent GUI library for C++
470 src2www/fm: hypertext index for program listings
471 Beagle: Client/server DBMS for Unix
472 Radiosity (photorealistic) renderer for Windows
473 Windows 95 style taskbar for Windows 3.1
474A X Games: multiplayer scrabble with 114K words
474B X Games: countdown UK quiz show game
474C X Games: lightcycle game for 2-6 players over the Internet
475 ThinAir: pseudo-random number generator in C++
476 Amulet: portable C++ GUI application framework
477 Using C++ and Fortran: tutorial on mixed languages
478 FreeDOS: 16-bit MS-DOS replacement with sources

CUG Updates

Due to the sheer number of new archives, I have room only to list the existing archives that have been recently updated here:

CUG# Summary
401 Sockets++: Socket Class Library (v1.11)
417 LIBFTP: easy interface to servers (v5.8)
437 C/C++ Exploration Tools for Windows (v1.09)
455 Advanced I/O C++ Class Library (v2.3)
458 GrayImage: grayscale image C++ Class Library (v2.3)

You can order your updated copy of the CUG Library CD-ROM for $49.95 directly from Miller Freeman Inc. by calling 800-444-4881 or 785-841-1631, or via the web through one of the vendors listed on the CUG website.

(CUG 467) LADsoft 32-bit ANSI C Compiler for 386 and M68k families

David Lindauer (Louisville, KY) submits his LADsoft C compiler, an optimizing cross-compiler which can produce either Intel i386 or Motorola M68000 assembly language output. The compiler contains optimizations and also has separate code generation switches for M68000, M68010, and M68020 CPUs. The compiler recognizes some C++ syntax as well, except for class declarations.

LADsoft C strives to be ANSI-compatible at the source level. It may fall short of requirements for evaluation ordering when casts are used. Also, floating point is done purely using the math coprocessor, and is not adjusted for ANSI/IEEE compatibility. The runtime library is designed to be ANSI-compatible. The CUG distribution includes full source for compiler and library as well as compiled executables. LADSoft C v1.35, released on 3/5/97, is now available on the CUG CD-ROM.

(CUG 468) Programmable Arbitrary Precision Calculator for Windows

S. Jason Olasky (Rockville, MD) submits his Programmable Arbitrary Precision Calculator for Windows (PAPCW). PAPCW is a reverse polish notation (RPN) line-oriented calculator for Windows 3.1, 95, and NT. It includes financial and date functions in addition to many standard mathematical functions. The extended precision math routines utilize Judson D. McClendon's Bigcalc extended precision library. Virtual arrays are used for the stack and memory registers, so there are no effective limits on the stack size or number of registers.

The stack is based on the FORTH model rather than the HP calculator model; the stack expands and contracts as numbers are entered or result from operations on numbers already on the stack. PAPCW programs use a hybrid notation combining elements of the HP-41 and FORTH. Programs can be written using any ASCII editor, or through a rudimentary built-in editor. Calculator dialogs facilitate use of the financial and date functions. A registration fee of $35 is required for use beyond the evaluation period. The CUG distribution includes full C source code. PAPCW v1.1, as released on 12/7/96, is now available on the CUG CD-ROM.

(CUG 469) V: A Platform-independent GUI Library for C++

Dr. Bruce E. Wampler (University of New Mexico, Albuquerque) releases V, a portable C++ GUI Framework intended to support a wide variety of applications on different graphical interface platforms. Applications developed using V will have the look and feel of the native platform, yet will be portable across platforms. Most standard GUI objects are supported by V, including windows with menus, status bars, toolbars, and a drawing canvas; modal and modeless dialogs with the most common controls; and portable printing support.

V was originally written for use on X Windows and has since been ported to Windows 3.1 and Win32 environments. The X Window implementation has been validated on Linux, SunOS, and Alpha, and SGI machines. In Windows, it has been built successfully with Borland, Watcom, and Microsoft VC++. OS/2 and Motif ports are underway and should be completed soon. V is licensed under the GNU Public License, which is intended to preserve its freeware status. The CUG distribution includes separate archives for X Windows and Windows. V v1.16, as released on 1/20/97, is now available on the CUG CD-ROM.

(CUG 470) src2www/fm: Hypertext Index for Program Listings

Michal Young (Purdue University) contributes a pair of packages for producing program listings with hypertext indices. These packages do not automatically indent code; a code formatting utility (such as GNU indent) or pretty-printing text editor should be used prior to using src2www or src2fm. src2www produces HTML versions of ANSI C and Ada code as well as simple C++ code. Building the binaries requires Gnu make, Flex, and GCC from the Free Software Foundation. Also, the scripts will need a recent version of gawk or nawk.

src2fm shares the same front end, and therefore processes the same languages, but produces FrameMaker documents. FrameMaker document colors and fonts can be customized using style sheets, while customizing the HTML documents requires editing a table compiled into the program. src2www and src2fm have been implemented only on Unix systems. Young is willing to provide advice to those attempting a port to non-Unix platforms. According to Young, "A good C programmer should be able to add a driver for another output format, such as RTF or LaTeX." src2www and src2fm are distributed as freeware. src2www v0.9g and src2fm v0.9e are now available on the CUG CD-ROM.

(CUG 471) Beagle: Client/Server DBMS for Unix

Robert Klein (Glen Burnie, MD) submits Beagle, an SQL-based client/server relational DBMS. Currently, Beagle supports a wide variety of Unix platforms including: Linux 2.0.14, SCO Openserver, FreeBSD 2.1R, SGI IRIX v5.3, Solaris v2.x, and HP/UX. The current version also supports OS/2, and porting projects are underway for Windows 95, NT, and other platforms. A support mailing list is available, too.

Beagle's features are accessible primarily through its C-callable API. Its client/server implementation works using BSD-style sockets for communication. Most of the recent development has centered around implementing BTree indices and seeing that they are properly applied in SELECT, DELETE, and other SQL statements. Beagle DBMS, released on 4/3/97, is now available on the CUG CD-ROM.

(CUG 472) HELIOS: Radiosity (photorealistic) Renderer for Windows

Ian Ashdown (West Vancouver, BC) releases HELIOS, a radiosity renderer for Windows. Radiosity is the name used by the computer graphics community to describe radiative flux transfer techniques. Radiosity methods are extremely useful in developing advanced lighting simulation and visualization software for architectural design and illumination engineering applications. Radiosity is, in a sense, the complement of ray tracing. Ray-tracing techniques excel in the rendition of point light sources, specular reflections, and refraction effects. Radiosity methods accurately model area light sources, diffuse reflections, color bleeding effects, and realistic shadows.

Ashdown wrote HELIOS as an integral part of his book Radiosity: A Programmer's Perspective, (ISBN 0-471-30488-3). The HELIOS source code is copyrighted, but freely available for personal, non-commercial uses. The CUG distribution of HELIOS includes complete C++ source code and executables for a fully functional radiosity renderer that runs under Windows 3.1, 95, and NT. Helios v1.03, released 4/1/96, is now available on the CUG CD-ROM.

(CUG 473) HotKey: Windows 95-style taskbar for Windows 3.1

Hao Liang (Zongshan, People's Republic of China) contributes HotKey, a Windows 95-style taskbar for Windows 3.1. HotKey can be used by itself or can coexist with PCTools for Windows desktop (by Central Point Software). In addition to organizing tasks and their icons, HotKey includes a popup zoom window (F12 key toggles), RGB value display (F11 key), and absolute position display wherever the mouse cursor roams.

HotKey was written using Borland C++ 4.5. Rather than using MFC or OWL, Liang created his own lightweight GUI framework. HotKey also includes a copy of John Webster Small's popular container_lite, a portable container library for C++. The CUG Library distribution of HotKey includes full C++ source and executables. HotKey, released on 1/17/97, is now available on the CUG CD-ROM.

(CUG 474A) The X Games

Matt Chapman (Bournemouth, England) submits a trio of games for the X Windows environment: XScrabble, XCountdown, and XBikes. XScrabble was co-written with Matthew Badham. The programs also incorporate Xc, the Control Panel Widget Set v1.3, by Paul D. Johnston. Chapman has granted permission for these programs to be freely copied and distributed by any means, provided that his copyright notices remain unchanged. He reserves the right to be identified as the author.

(CUG 474A) X Games: Multiplayer Scrabble with 114K Words

XScrabble is a full multiplayer (1-4) implementation of the classic board game, with multilevel computer players, an over 118,000-word dictionary (the Official Scrabble Players Dictionary, edition 3, as used in U.S. tournaments). There is a high-score table, a best single goes list, a handy setup window, and load/save facilities. XScrabble should work in most X Window environments, including SunOS 5.1, AIX, and Linux. The CUG Library distribution includes full source code in C. XScrabble v1.00, released on 3/12/97, is now available on the CUG CD-ROM.

(CUG 474B) X Games: Countdown UK Quiz Show Game

Countdown is a daily British quiz show involving word games and number games. Xcountdown is a two-player implementation of Countdown for the X Window System. Each player has their own game window on their own display. The included OSPD (Official Scrabble Players Dictionary, v2 — all words up to nine letters) is used for the word games. Various algorithms are used to show the best possible score for each game, after the players have attempted it. XCountdown also contains some pictures of Carol Vorderman, who is featured on the show. XCountdown should work in most X Window environments, including SunOS 5.1, AIX, and Linux. The CUG Library distribution includes full source code in C. XCountdown v1.00, released on 2/12/97, is now available on the CUG CD-ROM.

(CUG 474C) X Games: Lightcycles Game for 2-6 Players over the Internet

XBikes is a very simple lightcycles game for 2 to 6 players. The lightcycles game idea was first popularized by the movie Tron. BSD sockets are used for client/server communications so each player can play from their own X console. Each player controls a "bike," which keeps moving until it hits something, while leaving a trail behind it. Your path must not intersect another player's path, your path, or the playing field walls. The sooner you crash, the more points you lose. The last player still moving is declared the winner. XBikes requires an X Window environment, and only Solaris is currently supported. The CUG Library distribution includes full source code in C. XBikes v1.00, released on 2/12/97, is now available on the CUG CD-ROM.

(CUG 475) ThinAir: Pseudo-random Number Generator in C++

G. Wade Johnson (Houston, TX) contributes ThinAir, a C++ class library providing an abstract interface to pseudo-random number sequence generator (PRNG) classes. The library is distributed as source and documentation for over 40 PRNGs, including algorithms by Knuth, Borosh-Niederreiter, Waterman, Lavaux-Janssense, and Marsaglia.

ThinAir is designed to take the guesswork out of using PRNGs. Unfortunately, most PRNGs available to the average programmer are not very good. Usually it's not easy to learn which generator is provided. This makes finding the weaknesses or problems with a particular generator almost impossible. Even if you realize the potential problems with a provided generator, you usually don't know how to go about testing and verifying another PRNG. ThinAir allows you to take control of which PRNG you want to get the quality and integrity you need.

The CUG Library distribution includes makefiles for VC++, Borland C++, and GNU C++. ThinAir features a rand() interface, function object interface, ability to save and restore state on a generator, and the ability to clone a generator. ThinAir is released as freeware. Although Johnson retains copyright to the source, there are no restrictions on using it in your applications. ThinAir v0.9B, released on 2/20/97, is now available on the CUG CD-ROM.

(CUG 476) Amulet: Portable C++ GUI Application Framework

Brad A. Myers of the User Interface Software Group in the Human Computer Interaction Institute at Carnegie Mellon University submits Amulet. Amulet is a user interface development environment for C++ and is portable across X11 on all kinds of Unix (Sun, Dec, HP, SGI, Linux, NetBSD, etc.), Windows 95 and NT (with VC++), and the Macintosh. Amulet helps you create graphical, interactive user interfaces for your software.

More than just another free virtual toolkit, Amulet includes many features specifically designed to make the creation of highly interactive, graphical, direct-manipulation user interfaces significantly easier, including: a prototype-instance object model; constraints; high-level input handling, including automatic undo, built-in support for animation, and gesture-recognition; and a full set of widgets. Amulet is the successor to Garnet, an earlier CMU project you may be familiar with. Amulet v3.0 is now available on the CUG CD-ROM.

(CUG 477) Using C++ and Fortran: Tutorial on Mixed Languages

Carsten Arnholm (Heggedal, Norway) has contributed his paper "Portable Mixed Language Programming Using C++ and FORTRAN" and accompanying class libraries. This treatise considers how to best encapsulate calling FORTRAN libraries from the C++ environment in both Windows and Unix platforms. Arnholm notes that 40 years of legacy FORTRAN code and its maintenance should and must continue to be used in many cases. He sets forth rigorous guidelines for mixed-language integration:

  • The C++/FORTRAN programs must be as portable as their FORTRAN-only ancestors.
  • A single source code must be used on all platforms.
  • Calling FORTRAN from C++ must be easy and straightforward. It must not be significantly more difficult to call FORTRAN from C++ than calling it from FORTRAN itself.
  • Mixed C++/FORTRAN must not induce any significant performance penalty.
  • All major FORTRAN features must be supported from C++.
  • Calling FORTRAN from C++ shall be done without changing the FORTRAN code, which has been tested and verified.

Arnholm's package consists of the 30-page paper (.wri file), fortran.h macros, and character, complex, and fmatrix compatibility classes. Version 1.1,

released on 5/28/97, is now available on the CUG CD-ROM.

(CUG 478) FreeDOS: 16-bit MS-DOS Replacement with Sources

Morgan Toal (Barrow, AK) releases FreeDOS, a completely free MS-DOS-compatible operating system. FreeDOS will run on all DOS-capable platforms, from XTs to Pentium Pros. FreeDOS is a complete standalone operating system. It includes a kernel, shell (command.com replacement), and a full complement of utilities from ATTRIB to XCOPY. FreeDOS uses a freeware C compiler for all development work. The FreeDOS mission is to allow hobbyists, hackers, and anyone who would enjoy a chance to examine or customize the source code and inner workings of a real operating system for educational, practical, or recreational purposes. FreeDOS is compatible with MS-DOS v3.30.

FreeDOS and its associated programs and documentation are protected under the terms of the GNU General Public License (GPL). All copyrights are retained by the original authors. All source code will be publicly available. FreeDOS v0.92.0, released 2/7/97, can now be found on the CUG CD-ROM.

The CUG Needs You!

The deadline for submissions for the next edition of the CUG Library CD-ROM is coming soon. If you have an innovative C or C++ application or library that you'd like to share with the world, please contact me by email at <[email protected]> or visit the CUG website at http://www.HAL9K.com/cug. As a small token of our appreciation, you will receive a complimentary copy of CUG CD-ROM if your submission is accepted.o

Victor R. Volkman received a BS in Computer Science from Michigan Tech University. He has been a frequent contributor to the C/C++ Users Journal since 1987. His most recent book is entitled Windows Programming with Shareware Tools. He can be reached on the web at http://www.HAL9K.com, or email to [email protected].


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.