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

  1.  
  2. (*
  3.  * outline - a simple "outline" oriented document generator
  4.  *
  5.  * outmisc.inc - this module contains various support procedures
  6.  *               used by the rest of the outline processor.
  7.  *
  8.  * Author:  Samuel H. Smith,  11-Jan-86
  9.  *
  10.  *)
  11.  
  12. procedure usage(why: anystring);
  13. begin
  14.    writeln(version);
  15.    writeln;
  16.    writeln(why);
  17.    writeln;
  18.    writeln('Usage:  outline');
  19.    writeln('  or    outline -mono           ;use monochrome monitor');
  20.    writeln('        outline -slowdisplay    ;use DOS for displays');
  21.    writeln;
  22.    halt;
  23. end;
  24.  
  25.  
  26. procedure initialize;
  27. var
  28.    i: integer;
  29.  
  30. begin
  31.    if paramcount > 1 then
  32.       usage('**Too many options');
  33.  
  34.    if paramcount = 1 then
  35.    begin
  36.       if paramstr(1) = '-mono' then
  37.          default_disp_seg := $B000
  38.       else
  39.       if paramstr(1) = '-slowdisplay' then
  40.          slowdisplay := true
  41.       else
  42.          usage('**Unknown option: '+paramstr(1));
  43.    end;
  44.  
  45.  
  46.    window(1,1,80,25);
  47.  
  48.    load_options;
  49.  
  50.    new(emptytext);
  51.    for i := 1 to max_text do
  52.       emptytext^[i] := '';
  53.  
  54.    document := new_section;    {initialize document to be empty}
  55.  
  56.    marksec := nil;
  57.    marksub := 0;
  58.  
  59.    delsec  := nil;
  60.    docfile := '';
  61.  
  62.    prnfile := 'PRN';
  63.    assign(nullfd,'nul');
  64.    rewrite(nullfd);
  65.  
  66.    saved := true;
  67.    indent_mult := 1;
  68. end;
  69.