home *** CD-ROM | disk | FTP | other *** search
- list2bm.doc : The 'list2bm' command
- By: Brian E. Yoder.
- 11/17/93
-
- The list2bm command reads a list file that names a set of files. It
- combines the named set of files into one output file, converting special
- characters in each file to BookMaster symbols. The output file can be
- processed by BookMaster to produce a nicely formatted document that
- contains all of the named files, one file per chapter.
-
- ========================================================================
- Command syntax
- ========================================================================
-
- list2bm [-n] listfile outfile
-
- This program reads a list file and writes a BookMaster document to
- outfile. The output document contains a title page and the contents of
- the files named in the listfile. Each named file is contained in its
- own ":h1." heading and is enclosed with example tags. The entire
- document is enclosed by :userdoc and :euserdoc tags.
-
- If -n is specified, no title page is written to the output and the
- output file has no :userdoc and :euserdoc tags. However, each file
- named in the listfile is written to the output file. The output file is
- then suitable for a high-level document to imbed.
-
- ========================================================================
- Format of the list file
- ========================================================================
-
- In general, the list file is a text file. Blank lines are ignored.
- Lines that begin with a # are assumed to contain comments and are
- ignored. Any text on a line that begins with a # (except within a
- string) is assumed to be a comment and is ignored.
-
- The rest of the list file consists of a series of tokens. A token is a
- series of contiguous non-blank characters, a series of characters
- enclosed by either double quotes or by single quotes, or an equal sign.
-
- --------------------- Title page ---------------------------------------
-
- The first lines in the list file define the title page as follows:
-
- -sec "Security Classification"
- -date "Date of Document"
- -author "Author of Document"
- -title "Title of Document"
-
- In place of each string, you can specify the name of an environment
- variable preceeded by a $. In this case, the value of the environment
- variable is used. For example, if your environment contains the
- variable 'DATE=March 3, 1989', then the following two date
- specifications are the same:
-
- -date "March 3, 1989"
- -date $DATE
-
- --------------------- File names ---------------------------------------
-
- The remaining lines in the list file specify file names and section
- headings as follows:
-
- -section "Title of Section"
-
- filename
-
- A section heading is simply an ":h0." tag.
-
- A file is put into its own ":h1." tag, with the name of the heading set
- to the name of the file. If the name of the file has a drive letter and
- colon in it, such as 'd:string', only the 'string' portion is written to
- the heading.
-
- ========================================================================
- Sample List File: This is an excerpt from the "utilsrc.txt" file in
- this directory. It illustrates a properly formatted listfile.
- ========================================================================
-
- #------------------------------------------------------------------------------
- # Title page
- #------------------------------------------------------------------------------
-
- -sec "Unclassified"
- -title "util Source Code (OS/2)"
- -author "Brian E. Yoder"
- -date "October 16, 1991"
-
- #------------------------------------------------------------------------------
- # Body of the output document
- #------------------------------------------------------------------------------
-
- -section "Makefile and Listfiles"
- makefile # Primary makefile
- util.rsp # Response file for LIB command
- util.def # Module definition file for utilities
-
- -section "Command Files"
- c.cmd # Compile
- l.cmd # Link
-
- -section "Library Subroutines"
- crcfile.c # Get CRC and length of a file
- cfaccess.c # Customization (text) file subroutines
-