home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume16
/
xfmt
/
README
< prev
next >
Wrap
Text File
|
1988-11-10
|
2KB
|
54 lines
The first version of xfmt, 'extended fmt', was written by Bill Gray
(bgray@marque.mu.edu) and appeared in comp.sources.misc as "fmt".
Since it is nearly downward compatible with the BSD fmt program
(treatment of ending sentence punctuation is a little different), you
might choose to name your version "xfmt" -- or not.
This version interprets a few nroff -man commands or a (very) few
TeX commands, or both, if you ask it to (by using the -m or -x flags).
It does a more complete job of interpreting fonts in terms of screen
attributes than can be done nroff(1) and ul(1). There is also a -c flag
for displaying C code with comments highlighted and keywords shown with
various screen attributes.
Many man pages are not correctly processed, since many have nroff
commands not interpreted by xfmt. The addition of -man interpretation
and other features to xfmt will not be to everyone's taste, especially
since they are incompletely implemented.
The BSD termcap facility is used in this version of xfmt. Also, you
need flex, by Vern Paxson et al. to make xfmt. Unless a second version
of flex has been distributed by now, you will need to modify flex's
skeleton files by making the following changes:
CHANGE
static int yy_start; /* start state number */
TO
static int yy_start = 0; /* start state number */
CHANGE
yy_start = 1; /* first start state */
TO
if (!yy_start) yy_start = 1; /* first start state */
Or you can try "patch < flex.skel.diff" to make the changes
automatically in the distributed version of the file flex.skel. (This
patch file includes another patch concerning the reject action.) The
change to flex is required so xfmt can choose a start condition in its
main() procedure depending on what flags it sees on the command line.
Once you have made xfmt, the accompanying documents can be displayed
with:
xfmt -mu xfmt.1
xfmt -xu cmds.tex
xfmt -c xfmt.l
The amount of pattern matching done in this version of xfmt exceeds the
capacity of lex by quite a bit. This kind of program is now easy to do
thanks to the implementors of flex: Vern Paxson, Kevin Gong, Jef
Poskanzer, Van Jacobson.
Greg Lee, lee@uhccux.uhcc.hawaii.edu