> Software > cgihtml

Next Previous Contents

2. What is cgihtml?

cgihtml is a collection of routines for parsing World Wide Web (WWW) Common Gateway Interface (CGI) input and outputting HyperText Markup Language (HTML).

2.1 What are the advantages of cgihtml?

cgihtml simplifies the task of parsing CGI input and producing HTML output. Tasks which would normally require several lines of C can be reduced to just a few.

Additionally, I have attempted to include general routines which CGI programmers often find themselves using. Consequently, some of the complexities of CGI programming are hidden. On the other hand, if you want to know what's going on, source is included.

2.2 Why C?

The purpose of CGI programs is to take data and manipulate it as the web programmer desires. Since CGI programs are often dealing with text manipulation, Perl or other scripting languages is an ideal way of producing CGI scripts. (Perl programmers should check out Lincoln Stein's or Steve Brenner's

However, interpreted scripting languages tend to be relatively large. This rarely has a major effect on the performance of your server (unless you are a high-traffic site). However, if this is a concern of your's, a program written in C is often several times smaller than the equivalent program written in Perl. There's definitely a performance improvement when using CGI programs written in C, although the performance is not always noticeable.

Additionally, some servers (notably Netsite and Apache) have APIs so that CGI programs can be written as extensions to the server, rather than as separate programs. This greatly improves performance, especially on high-traffic sites. The best way to take advantage of these APIs is to write your programs in C.

Or, you might fall under one of the following categories:

In which case, you will hopefully find cgihtml useful.

2.3 Latest changes

See the CHANGES file, included in the distribution.

2.4 Files included in this package

The following files are included in this package:

Next Previous Contents