C resources
Home

 

These are materials that can help with C.

General information

The USENET comp.lang.c group does not let a question go unanswered.  The comp.lang.c FAQ page is very helpful, and can be purchased as a book.

Compilers

LCLint is a superior version of lint for checking C programs, and integrates with the MS Developer Studio
Lysator Computer Society's Hotlinks to C Resoures
ACCU, the Association of C & C++ Users - they do Java too.
The egcs (experimental GNU compiler system).
The GNU gcc compiler, and its port to dos. (This is a true DOS program and only does 8.3 filenames.)

Translation programs

The actual translation had to be done in an automatic manner to prevent the introduction of new bugs.  In the end I used the forc package.

f2c is free, openly available from many sites, and often installed on Unix systems.  The Fortran compiler in a Linux environment is often f2c followed by the C compiler.  The intermediate C output can be saved, and seems to always work as the Fortran was intended.   The code is a train wreck not meant to be read by a human.  For instance, multi-dimensional arrays are converted to 1D arrays.

forc by Cobalt Blue is the translation program I used to convert Cloudy.  They are a bit pricey, but all the code needed to support the translation is provided, and you end up with a stand-alone program that looks like it might have been written by a person.

References

These are the books I found most helpful in learning C.  The notes here are based on them.  They appear in the order I would recommend reading them,

Practical C Programming, Steve Oualline, O'Reilly & Associates, Inc., 1997.  This book is fun to read, and very practical.  I read Osterbrock's book three times while learning nebulae.  I read this book three times while learning C.

Expert C ProgrammingDeep C Secrets, Peter van der Linden, SunSoft Press, 1994.  This book and the following one were written by people who write C compilers.  They have seen all the mistakes.

C, A Reference Manual, Samuel P. Harbison and Guy L. Steele, Printice Hall, 1991