home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / pascal / pxl214a / pxl.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-02-11  |  3.6 KB  |  80 lines

  1. {$R-}    {Range checking}
  2. {$B-}    {Boolean complete evaluation}
  3. {$S+}    {Stack checking}
  4. {$I+}    {I/O checking}
  5. {$N-}    {No numeric coprocessor}
  6. {$M 32768,65536,655360}
  7.  
  8. program PXL (input, Output);     {Version 2.12 for Turbo Pascal 3-5.5}{.CP25}
  9.    {Pascal X-ref Lister.  Not copyright.  Enjoy.                        }
  10.    {Programmer: R. N. Wisan, 37 Clinton St., Oneonta, NY 13820          }
  11.    {Options (available via menu or command line):                       }
  12.    {  1. Make a cross-reference of all identifiers.                     }
  13.    {  2. Number lines.                                                  }
  14.    {  3. Mark Turbo Pascal reserved words.                              }
  15.    {     (When both #2 and #3 selected, counts begin/end depth.         }
  16.    {  4. If printer uses #12, feeds out FF before printing if requested.}
  17.    {Makes standard default header containing file name & creation date. }
  18.    {  If user ID found in file PXL.ID, puts that in header, too.  Can   }
  19.    {  take user defined header (& some other format instructions) from  }
  20.    {  PXL.HDR or in body of listed file.                                }
  21.    {Paginates automatically or per absolute or conditional page advance.}
  22.    {Takes printer info and list of reserved words from data files:      }
  23.    {  PXL.PRN and PXL.WDS.  Can be set to use internal data instead.    }
  24.    {Can be run from a batch file.  Reports failure as ERRORLEVEL 1.     }
  25.    {Requires DOS 2.00 or higher.                                        }
  26.  
  27. Uses
  28.   Crt,
  29.   Dos,
  30.   PXLINIT,
  31.   PXLMENU,
  32.   PXLLIST;
  33.  
  34. {=========The following values are the ones you may want to adjust===={.CP21}
  35.  
  36. procedure SetUp;
  37. begin
  38.    DataFiles := True;         {True loads printer symbols data from PXL.WDS }
  39.                               {   and reserved word list from PXL5.PRN.     }
  40.                               {False uses internal data, correct for Epson  }
  41.                               {   printers & Turbo Pascal 4 & 5.            }
  42.  
  43.    Turbo3 := False;   {Default TP version.  Overridden by M or X options if }
  44.                       {DataFiles=False.  That forces PXL.WDS to be read; PXL}
  45.                       {then sets for TP3/TP4+ by number of reserved words.  }
  46.  
  47.    NormalColor  := 7;{2;{Colors for screen.  NormalColor is for main text,  }
  48.    FrameColor   := 6;   {FrameColor is used for frame, and Background is the}
  49.    Background   := 1;{0;{same for both.  PXL doesn't change a CGA border, & }
  50.                         {on exit, restores any screen text colors it found. }
  51.  
  52.    MarkWCaps    := False;  {If true, Reserved words are marked by printing  }
  53.                                {them in CAPITALS (regardless of what's in   }
  54.                                {the printer instruction strings)            }
  55.  
  56.    BottomMargin :=  4;  {Number of lines to leave blank at bottom of page.  }
  57.    OutputDevice := 'PRN';  {Default printer device --can be any filename or }
  58.                            {'Prn' or 'LPT1' etc. (Note: no colon!)  Can be  }
  59.                            {overriden from the command line.                }
  60. end; {Setup}
  61.  
  62. {====Don't tinker with things below this line unless you're going in deep===}
  63.  
  64. begin {Main}                                                          {.CP15}
  65.    CursorOff;
  66.    SetUp;
  67.    Initialize;
  68.    Menu;
  69.    if NumberLines or Mrk or XRef then begin
  70.       if not GotPrnData and (Mrk or XRef) then
  71.          CantCont(' reading '+ PrnFileName,'Can''t find it on path');
  72.       SetStyle;
  73.       if Mrk or XRef then
  74.          LoadReserv;
  75.    end; {if Num...}
  76.    Blank(9,16);
  77.    ListIt;
  78.    ByeBye
  79. end.
  80.