Next: Course Structure Up: X WINDOWS Previous: About this Course

Kernighan and Ritchie C

You have already studied the ANSI Standard form of C programs. Unfortunately most books on X programming still use the original Kernighan and Ritchie (K &R) C.

This is because some of X is still written in this style.

The major differences between K &R and ANSI C that concern us are:

We can (and should) still write our X window programs in ANSI C.

There is a c89 compiler option -common that we will have to use to tell the compiler to understand K &R syntax as well and turn off prototyping. (See later for more details on compling X window programs.

Alternatively you can write totally in K &R C and use the cc compiler.


Dave.Marshall@cm.cf.ac.uk
Tue May 24 16:52:56 BST 1994