home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Press 1997 July
/
Sezamfile97_1.iso
/
msdos
/
c
/
cbase11.a03
/
CBASE11.ZIP
/
MAN
/
MANX.MAN
< prev
next >
Wrap
Text File
|
1993-01-01
|
4KB
|
94 lines
NAME
manx - manual entry extracter
SYNOPSIS
manx [language] [page-length]
DESCRIPTION
The manx command extracts manual entries from source files. The
source files are read from stdin and the manual entries are
written to stdout. Each individual manual entry is separated
into pages by form feeds and terminated with a form feed.
The language option specifies the language of the source file.
The languages supported are:
Ada -a
assembly -as
C -c
Fortran -f
Lisp -l
Modula-2 -m
Pascal -p
Prolog -pl
Smalltalk -st
The default language is C.
The page-length argument can be used to set the page length.
Pagination may be disabled by specifying a page length of 0.
The default page length is 60.
The beginning of a manual entry is marked by the character
sequence (language dependent) to start a comment immediately
followed by the characters 'man'. This marker must appear in the
leftmost column allowed by the language. For block comments, the
end of the manual entry is marked by the end of the comment. For
line comments, the end of a manual entry is marked by the
character sequence to end a comment immediately followed by the
characters 'end'. All lines between but not including these
constitute the manual entry.
The following escape sequences can be used within a manual entry:
audible alert BEL \a
backspace BS \b
form feed FF \f
carriage return CR \r
horizontal tab HT \t
backslash \ \\
EXAMPLES
On a UNIX system, the following command would extract the manual
pages from all C files in the current UNIX directory, paginate
them to 52 lines, and place the results in a file called manual.
$ cat *.c | manx -c 52 > manual
Catenating files is much for difficult in DOS. For that system,
the following sequence of commands is required.
> copy file.c/a+file2.c+file3.c+file4.c tmp
> type tmp | manx -c 52 > manual
> del tmp
It is strongly recommended that a DOS version of cat be obtained
for use with manx.
NOTES
manx is particularly convenient when used in conjunction with a
make utility. Below are the relevant parts of the UNIX makefile
of an actual C library for which manx is used to extract the
reference manual.
LIB = blkio
MAN = $(LIB).man
MANS = blkio.h \
bclose.c bexit.c bflpop.c bflpush.c \
bflush.c bgetb.c bgetbf.c bgeth.c \
bgethf.c bopen.c bputb.c bputbf.c \
bputh.c bputhf.c bsetbuf.c bsetvbuf.c \
bsync.c lockb.c
man: $(MAN)
$(MAN): $(MANS)
cat $(MANS) | manx -c > $@
The reference manual for this library is generated with the
command
make man