Go to the first, previous, next, last section, table of contents.
FWEB works with a variety of files. File names have the form `[path]/root[.ext]', where the brackets denote optional. Here the slash is called the prefix end character. Since this character differs for various operating systems, it can be changed by system installers in `custom.h' (see section CUSTOMIZATION). The character that initiates the file-name extension (normally a period) can be changed with the `-E' command-line option (see section `-E': Change the delimiter of a file-name extension).
FWEB reads files with a variety of default extensions.
`.fweb' -- Initialization file (optional; for setting up default options used for all runs). This file is always in the home directory. See section Initialization
`fweb.sty' -- Style file (optional; for customizing the behavior of a particular
web
file). See section The Style file. This file is always in the directory of theweb
file that is being tangled unless that is changed by environment variableFWEB_STYLE_DIR
. The basic name can be changed by the `-z' option (see section `-z': Change name of style file).`name.web' -- Source code.
`name.ch' -- Change file (optional; for making incremental changes to a
web
source file). See section Change files.`name.hweb' -- Code included into web file with `@i' (see section `@i': Include file (unconditional)). Include files are searched for in the path set by the environment variable
FWEB_INCLUDES
and/or the `-I' option (see section `-I': Append to search list for include files). If that path is empty, then the current directory is searched.`name.hch' -- Optional change file for include file.
Automatic completion of input file names is turned on by the `-e' command-line option (see section `-e': Turn on automatic file-name completion). When in effect, input file names that include no period (have no extension) are completed automatically according to the contents of the following style-file entries:
Type of file Style-file entry Default WEB file `ext.web' `.web' Change file `ext.ch' `.ch' Include file `ext.hweb' `.hweb' Change file for include file `ext.hch' `.hch'
More than one extension may be specified, as a space-delimited list--e.g., `"web wb"'; the first one that matches is used.
FWEAVE writes a variety of output files.
`name.tex' -- Woven output to be processed with LaTeX.
`CONTENTS.tex' -- Temporary file that accumulates Table-of-Contents information. (For LaTeX, the `aux' file is used.)
`INDEX.tex' -- Temporary file that stores indexing information.
The names of the three temporary files can be changed with style-file parameters (see section The Style file). Commonly, one may put into the style file `fweb.sty' commands such as
index.tex "#.ndx" modules.tex "#.mds" contents.tex "#.cts"
The `#' is replaced by the root name of the web
file.
FTANGLE writes files of the form
`name.ext' -- Compilable output file.
The extensions for the compilable output file(s) have certain defaults, but can be changed by style-file parameters according to the following table:
Language Style-file entry UNIX default non-UNIX default C suffix.C .c .c C++ suffix.Cpp .C .C Fortran--77 suffix.N .f .for Fortran--90 suffix.N90 .f90 .for90 Ratfor--77 suffix.R .r .rat Ratfor--90 suffix.R90 .r90 .rat90 TeX suffix.X .sty .sty VERBATIM suffix.V .mk .mk
The primary input to the FWEB processors is the `test.web' source file. However, a change file `test.ch' can also be specified. A change file consists of instances of the following structure:
@x (One or more lines of text, EXACTLY as in the web file. Copy these lines with an editor; don't type them from scratch.) @y (Replacement text.) @z
The change-file mechanism allows one to insert local changes or test new code without physically modifying the original web file.
To specify a change file, use its name as the second file name on the command line. The extension `.ch' is assumed by default. For example,
FTANGLE test test
processes `test.web' with the change file `test.ch'.
In addition to `@x', `@y', and `@z', the only `@' commands allowed in a change file are language-changing commands such as `@c' and the special commands `@[' and `@]'. The command `@[' is used for column-oriented languages such as FORTRAN--77 and means switch into code mode. Similarly, `@]' means switch out of code mode.
All `@' commands in a change file must begin in column 1. Lines not beginning with `@' are ignored, so may be used as comments. Comments may also be included on the `@x', `@y', and/or `@z' lines.
Go to the first, previous, next, last section, table of contents.