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 >
Text File  |  1993-01-01  |  4KB  |  94 lines

  1. NAME
  2.      manx - manual entry extracter
  3.  
  4. SYNOPSIS
  5.      manx [language] [page-length]
  6.  
  7. DESCRIPTION
  8.      The manx command extracts manual entries from source files.  The
  9.      source files are read from stdin and the manual entries are
  10.      written to stdout.  Each individual manual entry is separated
  11.      into pages by form feeds and terminated with a form feed.
  12.  
  13.      The language option specifies the language of the source file.
  14.      The languages supported are:
  15.  
  16.                            Ada           -a
  17.                            assembly      -as
  18.                            C             -c
  19.                            Fortran       -f
  20.                            Lisp          -l
  21.                            Modula-2      -m
  22.                            Pascal        -p
  23.                            Prolog        -pl
  24.                            Smalltalk     -st
  25.  
  26.      The default language is C.
  27.  
  28.      The page-length argument can be used to set the page length.
  29.      Pagination may be disabled by specifying a page length of 0.
  30.      The default page length is 60.
  31.  
  32.      The beginning of a manual entry is marked by the character
  33.      sequence (language dependent) to start a comment immediately
  34.      followed by the characters 'man'.  This marker must appear in the
  35.      leftmost column allowed by the language.  For block comments, the
  36.      end of the manual entry is marked by the end of the comment.  For
  37.      line comments, the end of a manual entry is marked by the
  38.      character sequence to end a comment immediately followed by the
  39.      characters 'end'.  All lines between but not including these
  40.      constitute the manual entry.
  41.  
  42.      The following escape sequences can be used within a manual entry:
  43.  
  44.                   audible alert       BEL       \a
  45.                   backspace           BS        \b
  46.                   form feed           FF        \f
  47.                   carriage return     CR        \r
  48.                   horizontal tab      HT        \t
  49.                   backslash           \         \\
  50.  
  51. EXAMPLES
  52.      On a UNIX system, the following command would extract the manual
  53.      pages from all C files in the current UNIX directory, paginate
  54.      them to 52 lines, and place the results in a file called manual.
  55.  
  56.           $ cat *.c | manx -c 52 > manual
  57.  
  58.      Catenating files is much for difficult in DOS.  For that system,
  59.      the following sequence of commands is required.
  60.  
  61.           > copy file.c/a+file2.c+file3.c+file4.c tmp
  62.           > type tmp | manx -c 52 > manual
  63.           > del tmp
  64.  
  65.      It is strongly recommended that a DOS version of cat be obtained
  66.      for use with manx.
  67.  
  68. NOTES
  69.      manx is particularly convenient when used in conjunction with a
  70.      make utility.  Below are the relevant parts of the UNIX makefile
  71.      of an actual C library for which manx is used to extract the
  72.      reference manual.
  73.  
  74.           LIB   = blkio
  75.           MAN   = $(LIB).man
  76.  
  77.           MANS  = blkio.h                                \
  78.                   bclose.c bexit.c  bflpop.c  bflpush.c  \
  79.                   bflush.c bgetb.c  bgetbf.c  bgeth.c    \
  80.                   bgethf.c bopen.c  bputb.c   bputbf.c   \
  81.                   bputh.c  bputhf.c bsetbuf.c bsetvbuf.c \
  82.                   bsync.c  lockb.c
  83.  
  84.           man:    $(MAN)
  85.  
  86.           $(MAN): $(MANS)
  87.                   cat $(MANS) | manx -c > $@
  88.  
  89.      The reference manual for this library is generated with the
  90.      command
  91.  
  92.           make man
  93.  
  94.