Click on our sponsor, Genitor Corporation

C/C++ Sources

By Victor R. Volkman
July 1996 (No. 4)

AUTHOR BACKGROUND

Victor R. Volkman received a BS in Computer Science from Michigan Technological 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 by email.

FREEDOCK: APPLICATION DOCK FOR WINDOWS

Freedock by Sean Gordon is 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 really use every day. Freedock also provides the nicety of remembering your preferred window geometry for each application that you register with it as well. This saves you from having to continually re-arrange 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. Fig. 1 shows Freedock being configured for launching Microsoft Money.

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.

Gordon advises: "If it does not do everything you want it to do, you can modify the source code and add functionality to it." Freedock is freeware and any programs derived from its source must remain freeware.

http://www.winsite.com/info/pc/winnt/desktop/32frdk30.zip/downl.html

Available on C/C++ Users Group CD-ROM

SWMP: Sound Wizards Module Player

The Sound Wizards Module Player (SWMP) by Beat Rigazzi is a driver for playing .MOD sound files through any digital audio card (e.g. SoundBlaster compatible). The .MOD audio file format was first popularized by the Amiga computer, long before the introduction of Windows 3.1 and its .WAV file standard. 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 (especially in Europe).

SWMP includes several example .MOD tracks for you to experiment with as well as a standalone MS-DOS player program (SWMP.EXE). For developers, 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 routine can autodetect the operating parameters of a SoundBlaster, SoundBlaster Pro, or Gravis UltraSound digital audio adapter. 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.

ftp://garbo.uwasa.fi/pc/sound/swmp141.zip 666923 bytes

Available on C/C++ Users Group CD-ROM

ACE: Adaptive Communication Environment

Douglas C. Schmidt maintains the Adaptive Communication Environment (ACE) home page (http://www.cs.wustl.edu/~schmidt/ACE.html) which organizes all related documentation and source code. ACE is an object-oriented platform-independent network programming toolkit. ACE encapsulates many UNIX and Windows NT API layers with type-secure and object-oriented interfaces. The primary focus is on multitasking and Inter-Process Communication (IPC) layers. Here are the facilities it encapsulates:

Additionally ACE contains a higher-level network programming framework that integrates and enhances the lower-level C++ wrappers. This framework supports the dynamic configuration of concurrent network daemons composed of application services. This is similar to the "inetd" mechanism in Unix.

ACE is currently being used in a number of commercial products such as an ATM signaling softwaret, PBX monitoring, network management for mobile communications systems, and an enterprise-wide distributed medical imaging system for medical engineering.

Diffpack: object-oriented framework for PDEs

The "Diffpack home page" (http://www.nobjects.com/Diffpack/) organizes all related documentation and source code for the SINTEF Diffpack project at the University of Oslo (Norway). The goal of Diffpack is to develop 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. The best demonstration of the power of Diffpack is to look at some of the successful application areas in which its used:

Of course, the raw data from Diffpack is much more useful if you have something to visualize it with. Diffpack can interface with gnuPlot and plotmtv. You can even construct MPEG movies from multiple visualization frames. Fig. 2 shows a Diffpack visualization of a finite element based simulator for two-phase (oil/water) porous media flow.

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

Available on C/C++ Users Group CD-ROM

FRESCO: A Fresh Look at User-Interfaces

The Fresco Home Page (http://www.faslab.com/fresco/HomePage.html) is maintained by Denis Bohm and provides detailed documentation and source code on the Fresco user-interface system. Fresco is an object-oriented application programming interface (API) for graphical user interfaces, covering functionality in Xlib and Xt, and adding structured graphics and application embedding. The Fresco specification and sample implementation are under development by the X Consortium as an open, multi-vendor standard. Fresco offers a broad range of functionality, including low-level display and window management, structured graphics hierarchies, and UI widgets such as buttons and editors. An application may choose to use part of Fresco within another environment, such as using Fresco structured graphics capabilities from within Xt, or an application may choose to use Fresco solely. Fresco uses the CORBA standard object model, which allows for object distribution and provides a high-level Interface Definition Language (IDL). Fresco has been certified to run on the following platforms:

Other users have reported success in using Fresco in Linux, SunOS, Hewlett-Packard HP-UX, and OSF/1 environments. ftp://ftp.gmd.de/gmd/ginaplus/

FOCUS ON SOFTWARE TOOLS

A "software tool" is a program which simplifies the writing of a target program. The most popular type of software tools are code generators. A code generator produces an extensive infrastructure based on a relatively small input. For example, the classic Unix YACC tool generates a LALR(2) bottom-up parser based on the grammar that you describe. Nowadays, the most common example is the "visual" programming environments which provide wizards that act as software tools. My web search on "software tools" turned up 20,000 hits, most of which turned out to have a very liberal view of what constitutes a software tool. I will list only a few here.

XWindows Software Tools Page

The COnceptual Learning Of Science (COLOS) consortium maintains an XWindows software tools page (http://hpwww.ec-lyon.fr/colosHp/software/all_program). The page contains links to many useful X11 development tools including:

Software Tools Page

The Software Tools Page (http://www-cmpo.mit.edu/~djboccip/Links_soft.html) provides links to software packages and Internet resources that deal with a variety of software tools. This list goes beyond software tools for C programming to includes links to areas of software tools for mathematics, visualization, and HTML/WWW development. In this case, software tools has been extended to mean more than the earlier definition.

C/C++ MAILBAG

Keep those cards and letters coming, folks. Please send your comments to SYSOP@HAL9K.COM. Here's a sampling from our mailbag:

np76ba@mail.telepac.pt writes:
    "Please, can you tell me where I can get a freeware version of C++.  I'm
    new and I would like to try and get some information about this
    language"

C/C++ Answer Man:
    Your first stop should be DJ Delore's home page where you can find out
    where to get the GNU C++ compiler (known by insiders as "g++").  Here's
    a link for you to try -- http://www.delorie.com/gnu/


kory@sodak.net writes:
    "I would like the Internet Header Files for Programming in c/c++."

C/C++ Answer Man:
    Well, its hard to tell you much without knowing the exact protocol
    that you want, but I can tell you that you can find all the Internet
    RFCs (Requests For Comment) at --
    http://www.cis.ohio-state.edu/hypertext/information/rfc.html
    Each RFC contains all of the constants and structures that you'll need
    and thus serves the same purpose as a header (.h) file.


ores@mad.servicom.es writes:
    "I am very much interested in C++ programming.  I have started to use
    the STL with G++ 2.7.0 and I am in troubles.  I thought this was a good
    point to find some help.  I would like to get news periodically about
    what's going on in the C++ world.  Thank you."

C/C++ Answer Man:
    Although I'm far from an expert on use of the Standard Template Library,
    there are plenty of folks out there who can give you a hand.  Here's a
    handful of STL pointers that may help you!

    Mummit's STL Newbie Guide
       http://www.xraylith.wisc.edu/~khan/software/stl/STL.newbie.html (164k)
    STL Web Site
       http://weber.u.washington.edu/~bytewave/bytewave_stl.html (2k)
    Standard Template Library
       http://www.cs.rpi.edu/~musser/stl.html (5k)
    STL Resources on th Web
       http://corsa.ucr.edu/~jcharvat/stl.html (2k)

    Please also read the September 1996 issue of C/C++ Users Journal coming,
    very soon, check http://www.cuj.com/ to subscribe.


clements_t@4j.lane.edu writes:
    "We would to know how to program a MUD with c++, and your help would
    be VERY helpful and appreaciated."

C/C++ Answer Man:
    There's two great freeware programs you should try out:
      * Mordor is a MUD server, which allows multiple individuals to log
        in and play. This is often called the driver or engine.
      * Muddle is a MUD client, and can be used by players to log into
        MUDs. It allows you to automate many functions of your character
        through a relatively simple scripting language.
    Both of these are written in C and can be found at
    http://moria.bio.uci.edu/req.html


jon@acm.org writes:
    "Right now I'm hunting for a grammar for C++"

C/C++ Answer Man:
    And well you might hunt for such a thing, even though it should be
    included with your compiler.  You'll find a pointer to a C++ grammar
    in the comp.lang.c++ FAQ.  Here's a pointer to the relevant portion
        http://osiris.sund.ac.uk/online/C++/part19#Q126


    The grammar can be accessed by anonymous ftp from the following sites:
     * ftp://ics.uci.edu/ftp/gnu/c++grammar2.0.tar.Z and
                                 byacc1.8.tar.Z
     * ftp://mach1.npac.syr.edu/ftp/pub/C++/c++grammar2.0.tar.Z and
                                 byacc1.8.tar.z

      Jim Roskind can be reached at jar@hq.ileaf.com

<H2>Up</H2> <H2>Prev Doc</H2> <H2>Next Doc</H2>
This page maintained by Victor R. Volkman
Last updated on 11/07/98