All computer programs I'm posting here are written in something close to ANSI C. This is partly because C is a good language, partly because C is a popular language, and partly becuase C is the language I know best. Although I build and test this code on an Apple Power Macintosh 7300 I try to make it rather portable, so most of it should work as is on other machines. I hope.
In many cases the comments imbedded in the source code are themselves source code for the LaTeX document formatting system. Among the programs on this site is one called Docstrip , which can be used to extract the comments and feed them to the TeX processor. The LaTeX document produced this way is not entirely self-contained; it requires a file named doccode.tex which defines some macros I find useful for typesetting C code.
Those of you who are not acquainted with TeX and LaTeX, I encourage you to find out about them. It is possible to produce printed output from them which is better than that produced by even the best of word processors, but the tools themselves are flexible enough that I can automate the entire process of extracting LaTeX from a file and typesetting it. I have yet to see a word processor that allows you to do this sort of thing. And by the way, they're available for free.
For mor information about TeX and LaTeX see the TeX Users Group .
The images produced by these programs are written to files in BMP file format. I'm using this format because it handles 24 bit color, and because it's basically brain-dead. This is actually a good thing; you can put together a routine that reads and writes BMP files in about half an hour, and then move on and do what you actually were interested in working on. Simplicity is often important.
Of course, the versions of these pictures I post to the Web are not BMP files. There are two reasons for this. One is that not all Web browsers support BMP, and the other is that everything downloads so much faster if you use a format which has a good compression algorithm. I'm actually posting the images as JPEG format, which has very good compression and is a native format for most web browsers. I didn't write any software to do the translation to JPEG; I just use a JPEG translator from the Independent JPEG Group . I'm using JPEG instead of GIF because GIF does not support 24 bit images, and because I disapprove of the fact that the format is regulated by software patents.