home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d5xx
/
d551
/
cweb.lha
/
CWeb
/
cweb.man
next >
Wrap
Text File
|
1991-10-28
|
4KB
|
133 lines
WEB(1L) 7/12/90 WEB(1L)
1mNAME
0mctangle, cweave - translate CWEB to C and/or TeX
1mSYNOPSIS
ctangle 0m[ -1mbhp 0m] [ +1ms 0m] webfile[.w] [changefile[.ch]]
1mcweave 0m[ -1mbfhpx 0m] [ +1mags 0m] webfile[.w] [changefile[.ch]]
1mDESCRIPTION
0mThe 3mctangle 0mprogram converts a CWEB source document into a C
program that may be compiled in the usual way. The output
file includes #line specifications so that debugging can be
done in terms of the CWEB source file.
The 3mcweave 0mprogram converts the same CWEB file into a
TeX file that may be formatted and printed in the usual
way. It takes appropriate care of typographic details like
page layout and the use of indentation, italics, boldface,
etc.,and it supplies extensive cross-index information that
it gathers automatically.
CWEB allows you to prepare a single document containing
all the information that is needed both to produce a
compilable C program and to produce a well-formatted
document describing the program in as much detail as the
writer may desire. The user of CWEB ought to be familiar
with TeX as well as C.
The command line should have either one or two names on
it. The first is taken as the CWEB file (and .w is added if
there is no extension). If that file cannot be opened, the
extension .web is tried instead. If there is a second name,
it is a change file (and .ch is added if there is no
extension). The change file overrides parts of the WEB
file, as described in the documentation.
Options in the command line may be either turned off
with - (if they are on by default) or turned on with + (if
they are off by default). In fact, the options are
processed from left to right, so a sequence like -f +f
corresponds to +f (which is the default).
The -1mb 0moption shows a banner line on your terminal.
The -1mh 0moption shows a happy message if the processing was
successful. The -1mp 0moption shows progress reports (starred
module numbers) as the processing takes place. If you say
-bhp, you get nothing but error messages.
The +1ms 0moption prints statistics about memory usage at
the end of a run (assuming that the programs have been
compiled with the -DSTAT switch).
There are two other options applicable to 3mcweave 0monly:
-1mf 0mmeans do not force a newline after every statement in the
formatted output. -1mx 0mmeans omit the index and table of
contents.
-1-
WEB(1L) 7/12/90 WEB(1L)
In addition to these options the Amiga version of
3mcweave 0mhas two more options: +1ma 0mcauses Amiga-specific type
identifiers to be recognized as keywords (e.g. UWORD). +1mg
0mmeans that the german CWEB macros should be used instead of
the english ones.
The output C and TeX file names are formed by using .c
and .tex as extensions of the WEB file name.
1mFILES
0mcweb/cwebmac.tex: TeX macros used by cweave output.
amiga/cwebmacg.tex: German TeX macros for cweave output.
cweb/cwebman.tex: The user manual.
cweb/examples/wc.w: An introductory example.
1mSEE ALSO
0m3mLiterate Programming 0mby D.E. Knuth.
3mWeaving a Program 0mby Wayne Sewell
tex(1), cc(1), web(1)
1mAUTHORS
0mDon Knuth wrote WEB for TeX and Pascal. Silvio Levy designed
and developed CWEB by adapting the WEB conventions to C and
by recoding everything in CWEB.
-2-