Delila Program: pbreak

pbreak program

Documentation for the pbreak program is below, with links to related programs in the "see also" section.

{version = 4.26; (* of pbreak.p 1993 Jan 27}

(* begin module describe.pbreak *)
(*
name
   pbreak: breaks a file into pages at a certain trigger phrase

synopsis
   pbreak(pbreakp: in, input: in, output: out, list: out)

files
   pbreakp: The parameter file which contains the trigger on one line.
      Only one trigger is allowed in pbreakp.
      The next line may contain one integer which represents the right most
      position (in characters, 1 is the first character on a line)
      where the trigger will be looked for.  Default is an enormous number.
   input: the file to break up
   output: the broken file
   list: where messages will appear.

description
   The program pbreak will go through a file, line by line, looking for a
   "trigger" phrase.  Upon finding the trigger on a line, pbreak will insert a
   "new page" mark at the beginning of the line.  This will cause the printer
   to start a new page at this line when the file is printed.  A page number is
   added and an alphabetical index of the lines containing the trigger strings
   and their page numbers is printed at the end of the output file.  The
   trigger phrase can be any string of characters and is in the file pbreakp.
   The pbreak program is thus useful for breaking up large files into
   workable-size chunks, or to make a large file more readable.

examples
   Pbreak has been used to make pascal source code easier to read and
   work with by using the trigger "procedure" to make a file which
   when printed has one procedure to a page.  Pbreak also has been used
   to make the delila manual, delman.  Delman is one large, continuous
   textfile, and pbreak is used to break delman into its formatted pages
   by using the parameters
        (@ begin module
        1
   which will only recognize modules that begin at the left margin.
   (Note: the @ in the example above must be replaced by a '*' to
   make the example work.  The (@ form fools the compiler, and prevents
   it from thinking I'm doing something funny.)

documentation
   delman.intro.organization: "technical notes"

author
   Patrick R. Roche
   modified by Tom Schneider

bugs
   none known

technical notes
   Three procedures, firstpage, makepage and lastpage contain instructions for
   forming new pages.  These are system dependent.  Constant pagelength
   determines the size of the page.

   If a line is too wide, the page number will not be printed, however the
   number will override the characters on the line in the index at the end.
   The constant "top" defines the maximum length of a buffer, thus the maximum
   length of an input line or a trigger.  The constant "pagewidth" defines the
   page width for numbering of pages and the printing of the index.  Pagewidth
   should be set to the desired page width - 1 to come out right.  The constant
   liston (true or false) indicates whether or not to display the index on the
   file list.

*)
(* end module describe.pbreak *)
{This manual page was created by makman 1.44}
{created by htmlink 1.55}
National Cancer Institute    National Institutes of Health    Health and Human Services    USA Gov - Official Web Portal    Viewing Files    Accessibility