People are talking about Genitor...
Visit Genitor Corporation Online Now!

C/C++ Sources

By Victor R. Volkman
November 1996 (No. 6)

IN SEARCH OF C++ LIBRARIES

Overall, I've found the greatly renowned search engines of the WWW to be generally hostile to straightforward queries for finding C++ library source code. This month, I'd like to take a brief detour on the information highway to see how well these search engines stack up to a typical query: "C++ library source code" (including quote marks). Along the way, I'll list some of the best findings. One interesting result is that any one search engine almost never returned any of the same documents found by the others (of the first 20 hits examined).

1. AltaVista (http://www.altavista.digital.com) destroys anything remotely resembling punctuation so it transformed my query to "C library source code" and produced a total of 14 hits. After removing the quotes, AltaVista claimed about 1,000,000 hits, but it also decided that "C" was just a noise word. Accordingly, it equally weighted library source code in Pascal, Assembly language, Oberon, FORTRAN and others with C or C++. From the first query, I found several useful links including:

http://www.wdn.com/ems/cutil.htm

EMS Professional Shareware produces the highly acclaimed "C/C++ Utility Library CD-ROM" is a collection of all freely distributable (Public Domain, freeware, shareware, contribution requested, demo code, etc.) source code, utilities, applications, etc. for PC C/C++ developers. This home page features a downloadable file containing a ZIPed text file (CU20.ZIP) listing all known public domain and shareware C/C++ products found on BBSes in the USA, organized by type, with release date and short description.

http://www.letters.com/dmalloc/

The Debug Malloc Library (dmalloc) library has been designed as a drop in replacement for the system's malloc(), realloc(), calloc(), free(), and other memory management routines while providing powerful debugging facilities configurable at runtime. These facilities include such things as memory-leak tracking, fencepost write detection, file/line number reporting, and general logging of statistics.

The library is highy portable and claims usability on least the following operating systems: AIX, BSDI, DG/UX, HPUX, Irix, Linux, MS-DOG, OSF, Solaris, SunOS, and Ultrix. The package includes the library, configuration scripts, debug utility application, test program, and extensive documentation (formats: text, texi, info, and ps). There is also online documentation. dmalloc is distributed as shareware and requires a $35 fee for use beyond the evaluation period.

Dmalloc is coming soon to C/C++ Users Group CD-ROM

2. Lycos (http://www.lycos.com) reduced "C++" to "C" and then decided that "C" by itself was insignificant and dropped it from the query. It then combined "source", "code", "codes", and "library" to come up with a list of 300,000 pages containing these four keys. Among the top 20 hits were some useful pages including:

http://www.aic.nrl.navy.mil/galist/src/

Alan C. Schultz (schultz@aic.nrl.navy.mil) at The US Navy Center for Applied Research in Artificial Intelligence maintains "Genetic Algorithm Source Code Collection" page. The collection includes dozens of Genetic Algorithm (GA) implementation libraries, most with C/C++ source, that you can download with a click of your mouse. For example, libga100.tar.Z is a C library which is both easy to use and has "many knobs to turn". It supports both generational and steady state models with many standard operators (via function pointers). libga100.tar.Z is free for non-commercial use and runs under Unix, DOS, NeXT and Amiga.

3. Excite (http://www.excite.com) reported that it had found 212,000 pages of interest with the top ranking page having an 89% confidence level. Excite also gave me the option to sort by site, which I found intriguing but not useful. Excite seems to give the highest weight to the shortest page fulfilling the query. Excite did not report query modification, though I suspect it may have silently dropped the string "C++" since fewer than 30% of the hits were related to C++. Among the top 20 scores was:

http://http.tamu.edu:8000/~sdd2252/Docs/Zen/Zen.html

The "Zen Source Library" maintained by Andre Merwe (andrev@aztec.co.za) seems to be a very professionally polished site but which had only attracted a few hundred hits when I contacted it. Its purpose is an online registry of URL links to source code on the Internet. At this point it doesn't have its own internal search engine but rather is broken into useful categories such as General Programming, C++ OWL/MFC, Delphi, Java, and so on. The Zen Source Library is definitely an Internet resource that's long overdue.

There must have been a problem communicating with Excite using my Netscape Gold version 2.01 browser since clicking on the "Next Documents" button yielded the cryptic "Error: no query terms were found in index". This left me particularly unexcited.

4. Magellan (http://www.mckinley.com) modified my query and eliminated the string "C++" for unspecified reasons. Nevertheless, it returned 199,000 hits, strikingly close to the figures reported by the Excite engine. Furthermore, it also claimed 6 more hits on pages that were "rated and reviewed". Unfortunately, the truncation of my query string caused online public library card-catalogs to dominate the top 20 returned hits. Among the most promising was a Magellan 4-Star ("****") site called "The Vision Library". A click here revealed a 403 security block against unauthorized users. Nevertheless, I managed to glean a an interesting link:

http://www.cs.york.ac.uk/~fisher/mkfilter/

The Interactive Filter Design page by Tony Fisher fisher@minster.york.ac.uk received only a Magellan 1-Star ("*") rating probably due to its lack of flashy graphics. In my opinion, it is very useful and deserves at least a 3-star ("***") rating. Specifically, this page allows you to design digital filters and generate C or C++ code by the bilinear transform or matched z-transform method. All you need to do is enter the relevant parameters for a Butterworth, Chebyshev, Bessel, or Resonator model and hit the "Submit" button. In addition to source code, you also receive dynamically generated graphs showing "Magnitude and Phase vs. Frequency" (see Fig .1) and "Impulse Response" so you can understand the results of the filter.


Sample output from Interactive Filter Design Page

5. InfoSeek (http://www.infoseek.com) returned only 1 hit when I applied the quoted search string. After removing the quotes, it returned 272,000 hits. Furthermore, InfoSeek is the only search engine that clearly retained the keyword "C++" and weighted it in the results: 18 of the top 20 hits were definitely C++ libraries or links to them. Finally, here's the best of the top 20:

http://www.cis.ohio-state.edu/hypertext/faq/usenet/C++-faq/libraries/faq.html

The "Available C++ Libraries FAQ" maintained by Nikki Locke (nikki@trmphrst.demon.co.uk) is a treasure trove of links to nearly all of the freely available C++ libraries, online source code from books, and commercial libraries. The web page is somewhat disorganized, appearing as 140KB of unindexed text, but worth looking over for undiscovered gems. Many of the libraries featured in this column in recent months can be found from this FAQ.

http://mozart.compsci.com/~oleg/ftp/image.README.txt

Grayimage by Kiselyov Oleg (oleg@ponder.csci.unt.edu) is a C++ class library for dealing with full-depth grayscale images. This software has been greatly improved since its original posting in comp.sources.misc. Grayimage upports all standard image algebra/arithmetics including dealing with image slices, histogram equalization, and computing various norms. 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.

http://cuiwww.unige.ch/cgi-bin/freecomp

Grayimage is coming soon to C/C++ Users Group CD-ROM

The "Free Compilers List" maintained by the Software Composition Group, University of Berne is a small web page with a big online search engine. The search engine will search its database of known freeware compilers for any language that you specify. The engine returns you one link for each compiler found -- no wading through dozens of references trying to find the "real" web page. Some quick tests returned more than three dozen C/C++ compilers and a half-dozen BASIC interpreters, alas no SNOBOL compilers could be found.

THE URLS ARE OUT THERE

InfoSeek remains ahead of the other search engines in its ability to recognize and preserve keywords and indices that have some punctuation. In a world of punctuated acronymns like "C++", "OS/2", "v.34", and "8859-1", the web search engines must change their methods or risk losing information forever. The art of indexing and retrieving from the World Wide Web remains in the realm of black magic and I think it will be some years before you can choose a single search engine and believe that its going to do the job for you every time. Ironically, at least one of the five engines surveyed will almost certainly have modified its searching heuristics by the time this story goes to press. Such is the instantaneous and volatile (some might say fickle) nature of information on the web. In subsequent months, I'll be reviewing more search engine sites so you can help yourself to the best of the Web. My motto is simple: "If at first you don't succeed, try, try another search engine."

FOCUS ON CONCURRENCY AND MULTITHREADING

http://www.aa.net/~mtp/PCthreads.html

The "Posix and DCE Threads for Linux Home Page" by Michael T. Peterson provides documentation and code for these multithreading libraries. Linux has quickly become one of the most popular freeware Unix platforms owing to its ease of installation and tailoring to the PC architecture. The PCthreads (tm) multithreading library is based on the POSIX 1003.1c standard. The kit contains the sources for the library (libpthreads.a) and a complete set of man pages for all POSIX 1003.1c functions. Both PCthreads and a DCE implementation of threads for Linus can be downloaded here.

http://www.sun.com/sunsoft/Developer-products/sig/threads/

The "SUN Workshop Developer Products Threads" page is a highly organized index of programming resources. Included are links to books, papers, and free software for POSIX thread implementations. There are also links to many other sources thread pages on the WWW.

http://www.mit.edu:8001/people/proven/pthreads.html

The "Pthreads" page maintained by Christopher Angelo Provenzano (proven@mit.edu) provides documentation and pointers to this popular freeware implementation of Posix threads. Currently, this implementation minimally supports the following platforms: the i386/i486/Pentium processors running NetBSD 1.0A, FreeBSD 2.x, Linux 1.x, SUN SPARC SunOS 4.1.3, Solaris 2.3 and 2.4, DEC Ultrix 4.2, DEC Alpha OSF/1 2.3, SGI IRIX 5.3, HP-UX version 9.x.

BOOKS ON MULTITHREADING AND CONCURRENCY

http://www.sun.com/smi/ssoftpress/books/Lewis/Lewis.html
Threads Primer: A Guide to Multithreaded Programming by Bil Lewis and Daniel J. Berg 300 pages; ISBN 0-13-443698-9 (Emphasis on POSIX and Solaris, coverage of Windows NT and OS/2 too)

http://www.sun.com/smi/ssoftpress/books/Kleiman/Kleiman.html
Programming with Threads by Steve Kleiman, Devang Shah and Bart Smaalders 534 pages; ISBN 0-13-172389-8 (Emphasis on POSIX and Unix International thread models)

C/C++ MAILBAG

If you would like to share some of your favorite C/C++ sources, please email me at sysop@HAL9K.com. Here's a sampling of queries which have come to me recently via email.

mnovoa@servidor.unam.mx writes:

"I'm interested in windows 95 programing and fractal compression, maybe you have something about this."
C/C++ Answer Man:
Fractal compression is one of those exciting technologies which is getting closer to practical implementations. Barny Mercer barny.mercer@zetnet.co.uk provided me with the following pointer to fractal compression source code. Fracpack and Fracunpack work on fixed size images (256x256) in grayscale mode:

ftp://x2ftp.oulu.fi/pub/msdos/programming/crypt/frcomp.zip


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