home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / OUT18.ZIP / OUTDATA.INC < prev    next >
Encoding:
Text File  |  1986-11-25  |  4.4 KB  |  135 lines

  1.  
  2. (*
  3.  * outline - a simple "outline" oriented document generator
  4.  *
  5.  * outdata.inc - this module contains the data declarations
  6.  *               of the outline processor.
  7.  *
  8.  * Author:  Samuel H. Smith,  11-Jan-86
  9.  *
  10.  *)
  11.  
  12.  
  13. const
  14.    anystring_length = 68;         {the length of lines.  this has to fit on
  15.                                    the screen.}
  16.  
  17.  
  18.    print_width = 150;             {the length of print lines}
  19.  
  20.  
  21.    max_text = 10;                 {the number of text lines in a section}
  22.  
  23.    max_subsects = 10;             {max number of subsections in a section.
  24.                                    note that max_text+max_subsects should
  25.                                    be less than 21.  otherwise the screen
  26.                                    formatting won't work}
  27.  
  28.  
  29.    start_underline = #27#45#1;
  30.  
  31.    stop_underline = #27#45#0;     {printer codes to control underlined print}
  32.  
  33.  
  34.  
  35. type
  36.  
  37.    textfile = text[512];
  38.  
  39.    anystring = string[anystring_length];
  40.  
  41.    linestring = string[print_width];
  42.  
  43.    textarray = array[1..max_text]      {text description of a section}
  44.                  of anystring;
  45.  
  46.    textptr = ^textarray;
  47.  
  48.  
  49.    section_ptr = ^section;
  50.    section = record
  51.  
  52.       title:          anystring;              {title of a section}
  53.  
  54.       estimate:       real;                   {estimate (time, value, etc) for
  55.                                                this section and all subs}
  56.  
  57.       onpage:         integer;                {the page number on which this
  58.                                                section was last printed}
  59.  
  60.       text:           textptr;                {text description of a section}
  61.  
  62.       subsect:        array[1..max_subsects]  {list of subsections}
  63.                       of section_ptr;
  64.  
  65.       refcount:       integer;                {count of references to
  66.                                                this section record.  this
  67.                                                is used when there are multiple
  68.                                                copies or pointers to a single
  69.                                                section record}
  70.    end;
  71.  
  72.  
  73.    print_formats = (detail_format,
  74.                     outline_format,
  75.                     contents_format,
  76.                     tree_format,
  77.                     index_format,
  78.                     no_format);
  79.  
  80.  
  81.  
  82. var
  83.    emptytext: textptr;       {common text array when all text is blank}
  84.  
  85.    document:  section_ptr;   {pointer into main section of document}
  86.  
  87.    marksec:   section_ptr;   {pointer into section with a marker}
  88.    marksub:   integer;       {subsection number of marker}
  89.  
  90.    delsec:    section_ptr;   {holding the most recently deleted section}
  91.  
  92.    docfile:   anystring;     {filename of current document}
  93.  
  94.    prnfile:   anystring;     {filename of current print output}
  95.    prnline:   integer;       {the current print file line number}
  96.  
  97.    lineout:   linestring;    {print output line buffer used in reformatting}
  98.  
  99.    nullfd:    textfile;      {a null output file for linecounting}
  100.  
  101.    olf_format: integer;      {OLF file format number; used in loading}
  102.  
  103.    page_number:        integer;   {the current output page number}
  104.  
  105.    saved:              boolean;   {has the outline been saved since the
  106.                                    last change was made?}
  107.  
  108.  
  109.    pagelen:        integer;       {max number of lines to print on a page}
  110.  
  111.    minlines:       integer;       {minimum number of lines on a page before
  112.                                    a new page can be started}
  113.  
  114.    indentation:    integer;       {amount of indentation for each level
  115.                                    of subsection nesting in printouts}
  116.  
  117.    indent_mult:    integer;       {indentation multiplier; used when
  118.                                    printing compressed print}
  119.  
  120.    right_margin:   integer;       {right margin for reformatted print
  121.                                    file outputs}
  122.  
  123.    underline_titles:   boolean;   {should section titles be underlined?}
  124.  
  125.    paragraph_reformat: boolean;   {should paragraphs of text be reformatted?}
  126.  
  127.    break_into_pages:   boolean;   {should output be divided into pages?}
  128.  
  129.    section_numbering:  boolean;   {should a dewey-decimal section number
  130.                                    be added to each section on printouts?}
  131.  
  132.  
  133.    justify:            boolean;   {right justify text?}
  134.  
  135.