Page:4SIGHT manual- a computer program for modelling degradation of underground low level waste concrete vaults (IA 4sightmanualcomp5612snyd).pdf/83

 B CWEB - Source Code

The source code (except for the parsing described above) was written using the literate programming tool CWEB written by Donald Knuth and Silvio Levy. The CWEB tool is composed of two programs: cweave and ctangle. The user writes a CWEB file using. any ASCII editor. This file contains both the C code and the documentation, ctangle takes this input file and extracts the C code. Similarly, cweave takes the input file and creates a TEXfile which can be TEX-ed, creating a formatted version of the complete documentation, including the source code. Therefore, to use these tools, the user must have both CWEB and TEX for the PC. Fortunately, both of these tools are public domain, and can be accessed by anonymous ftp:

TeX machine: ftp.njit.edu directory:  pub/msdos/emtex

CWEB machine:  labrea. Stanford. edu directory:    pub/cweb

The only modification made to CWEB for the development of 4SIGHT was the extension to L TEX. To use the extensions of L TEX with CWEB, one only needs a L TEXstyle sheet. This too is available by anonymous ftp:

machine: ftp.th-darmstadt.de directory: pub/programming/literate-programming/c.C++

The pages that follow are verbatim output from cweave, via LATEX: