Tools for C/C++ Programmers

Perl is an ideal language for writing tools for handling large-scale C or C++ programs. It easily lets you analyze large amounts of text and create reports. This section presents two of the more popular tools that are useful for large programming projects. These are LXR, the Linux cross-referencer, and Bugzilla, a bug-tracking system.

Linux Cross-Reference (C Source Cross Reference)

The Linux cross-reference project is a web site that produces a cross-reference of the Linux kernel source. This tool lets you browse through the kernel source (see Figure C.1).

Figure C.1. Linux cross-reference.


Click on an identifier, and you’ll be taken to a screen that shows you every place that identifier is defined or used (see Figure C.2).

Figure C.2. Linux cross-reference indenture search results.


But the best thing about this is that the source to the utility is available. That means that you can download it and with a little tweaking make it work for any large source project you have.

Be warned, however. The tool is in love with the Linux source tree, and you’ll learn a lot about configuration files, HTML, and regular expressions when you adapt it to your software project.

The system requires an external database (glimpse, or MySQL depending on version). It can be found at http://lxr.linux.no/.

Bug Tracking with Mozilla

The Mozilla project has a bug-tracking system called Bugzilla. This program consists of a bunch of Perl CGI scripts and tools that are used as a front end to a MySQL database. Because it is used by the Mozilla project, you know that it is able to robustly handle many errors. If your software project is growing beyond about 5 or 10 engineers, you need some sort of bug-tracking system.

This one not only has a track record, but also it’s free from http://www.mozilla.org/ (see Figure C.3).

Figure C.3. Main Bugzilla screen.


Web Search Engine

A variety of programs are available that will index a web site and then allow users to search the site. MiniSearch is simple, easy to install, and works fairly well for small sites.

To use this program, all you need to do is install the scripts in your CGI directory. Next, run the script searchindex to generate an index of your site.

Next, check the configuration file (searchdata/config) and update it as needed. You can now access the admin page for this script through the URL http://<your-;server>/<cgi-install-dir>/searchindex.

Where:

<your–server> is the name of your server.

<cgi–install–dir> is the name of the CGI directory in which you installed MiniSearch.

After you log in, you arrive at the administration screen shown in Figure C.4. This screen allows you to adjust the configuration parameters and to reindex the site.

Figure C.4. MiniSearch screen.


The searches can be made using the URL http//:<your-server>/<cgi-install-dir>/search.

MiniSearch can be obtained from http://www.dansteinman.com/minisearch/.

Text Search GUI

A nice little search tool called Critter can be found at http://www.mainmatter.com/perltk/. It searches a series of files for a given string. Figure C.5 shows the GUI. Although a high-powered tool, Critter does provide you with a number of bells and whistles. Besides, you get the source, so if you want to add anything, you can.

Figure C.5. Critter Search.


Although the basic functions of Critter Search work, I found many minor, annoying flaws in the program, such as the use of uninitialized variables and a directory selection system that could use some improvement. However, you’ve got the program, and a knowledge of Perl, so it’s possible to come up with a solution.

Photo Album

If you have a digital camera, you may want to put your photos on the web. You can write the code to do this yourself, or you can use one of the many different photo album scripts out there.

One of the more complete ones is IDS (Image Display System) available from http://ids.sourceforge.net/. This script installs in your CGI directory and lets you and other users on your system generate your own photo albums. Figure C.6 shows one example.

Figure C.6. Sample IDS album.


The program is complex to install, but it contains many features and gets the job done.

E-Commerce

A number of useful E-Commerce solutions are available. I’ve listed a few of the more interesting ones here. Note that my one foray into E-Commerce was a disaster (not one order), so I really don’t know what makes up a good E-Commerce tool or web store.

Here are three that are widely available and provide most of the features you’d expect in a robust E-Commerce site:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset