home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / petern.zip / PETERN.DOC < prev    next >
Text File  |  1994-06-15  |  4KB  |  123 lines

  1. PeterN c 1994 by Peter Neuendorffer
  2.  
  3. This is not a program! It is a Turbo Pascal Unit for displaying
  4. text files that you may attach to your Turbo Pascal Program.
  5. This program provides a reader to install in your programs, and allows
  6. you to bundle the text directly onto the .EXE file
  7.  
  8.                Peter N Turbo Pascal 7.0 Text File Tool
  9.  
  10.                        To Register, send $15.00 to
  11.                        Peter Neuendorffer
  12.                        1399 Commonwealth Ave #11
  13.                        Allston MA 02134
  14.  
  15.  
  16. You need: a. Turbo Pascal 7.0
  17.           b. Petern.tpu.
  18.           c. The source code to a Turbo Pascal DOS program that does NOT
  19.              use attached overlays or drivers.
  20.           d. One DOS text (flat) file to display.
  21.           e. A little patience to catch on.
  22.  
  23. To attach a text file for reading:
  24.  
  25.     1. Determine the size of the text file in bytes
  26.        (DIR from DOS).
  27.  
  28.     2. Copy the enclosed PETERN.TPU to your .TPU directory.
  29.     3. Call up your program source code. At the point you wish to
  30.        display a file, insert the procedure display_file() as
  31.        described below. THe text file size is most important.
  32.     3a Insert PETERN in your uses clause for the current unit.
  33.     3b Dos_error will return the runtime error of reading the textfile
  34.         (if any).
  35.  
  36.     4. Compile your program
  37.  
  38.     5. exit to DOS,
  39.        BEFORE running the program, and AFTER compiling it,
  40.        from DOS do this command:
  41.  
  42.             COPY /B FILENAME.EXE + TEXTFILE.DOC
  43.  
  44.             Where filename.exe is the name of your program EXE
  45.             textfile.doc is the name of your text file.
  46.  
  47.    6.  Run the program.
  48.  
  49.    7.  Do not do 5. twice without recompiling the program.
  50.  
  51. This unit contains 1 procedure, which allows you to display a text
  52. file in page up and page down format. You will be attaching this text
  53. file directly to your program's .exe.
  54. Here is the procedure you get:
  55. ---------------------------------------------------------------------
  56.     Procedure   Display_file(exe_name:string;text_file_size:longint;
  57.                  cursor_wanted:boolean;page_wanted:boolean;
  58.                       foreground_color,background_color:byte;
  59.                       VAR dos_error:INTEGER);
  60. --------------------------------------------------------------------
  61.  
  62.     The parameters for "Display_file" are described below. If you already
  63.     are using the name "Display_file" then specify petern.display_file();
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.            Parameters for PeterN UNIT Procedure Display_file();
  71.  
  72.  
  73.     Your Procedure Parameters (all may be literals, except for dos_error,
  74.                                  which must be a variable)
  75.     ------------------
  76.  
  77. exe_name:string
  78.  
  79.       the NAME of your program, for example 'WONDER.EXE'
  80.       (this is the name of your .EXE, NOT the name of the text file)
  81.  
  82.  
  83. text_file_size:longint
  84.  
  85.       the size in bytes of the text file you wish to display.
  86.       If this text file changes, you must change this number
  87.       in the source, and recompile, and re-attach the text file
  88.       (see above)
  89.  
  90.  
  91. cursor_wanted:boolean
  92.  
  93.       If TRUE, then the unit will turn off the cursor during reading,
  94.       and turn it back on (bottom scan cursor) on exit.
  95.       If FALSE, the state of the cursor will not be touched.
  96.  
  97.  
  98.  
  99. pages_wanted:boolean
  100.  
  101.       If TRUE, page numbers are displayed
  102.       if FALSE, page numbers are NOT displayed
  103.  
  104.  
  105. foreground_color:byte
  106.  
  107.       The color to display the foreground   (will do white if monochrome)
  108.  
  109.  
  110.  
  111.  
  112. background_color:byte
  113.  
  114.       The color to display the background   (will to black if monochrome)
  115.  
  116.  
  117.  
  118.  
  119. dos_error:INTEGER;
  120.  
  121.       The DOS error_code is returned. (0 if no error)
  122.  
  123.