home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TS_CONFG.ZIP / TS_CONFG.DOC < prev    next >
Encoding:
Text File  |  1989-04-12  |  9.0 KB  |  186 lines

  1.        @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  2.        @                                                                @
  3.        @                     @@@@@@  @@  @@  @@@@@@                     @
  4.        @                     @@      @@  @@  @@                         @
  5.        @                     @@@@@@  @@  @@  @@@@@@                     @
  6.        @                         @@   @@@@       @@                     @
  7.        @                     @@@@@@    @@    @@@@@@                     @
  8.        @                                                                @
  9.        @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  10.                @@@@@@@@@@                              @@@@@@@@@@
  11.                  @@@@@@@@@@                          @@@@@@@@@@
  12.                    @@@@@@@@@@                      @@@@@@@@@@
  13.                      @@@@@@@@@@                  @@@@@@@@@@
  14.                        @@@@@@@@@@              @@@@@@@@@@
  15.                          @@@@@@@@@@          @@@@@@@@@@
  16.                            @@@@@@@@@@      @@@@@@@@@@
  17.                              @@@@@@@@@@  @@@@@@@@@@
  18.                                @@@@@@@@@@@@@@@@@@
  19.          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  20.          @@                                                          @@
  21.          @@          @@@@@@  @@  @@  @@@@@@  @@@@@@  @@@@@@ TM       @@
  22.          @@            @@    @@  @@  @@  @@  @@  @@  @@  @@          @@
  23.          @@            @@    @@  @@  @@@@@@  @@@@@   @@  @@          @@
  24.          @@            @@    @@  @@  @@ @@   @@  @@  @@  @@          @@
  25.          @@            @@    @@@@@@  @@  @@  @@@@@@  @@@@@@          @@
  26.          @@                                                          @@
  27.          @@          @@@@@@  @@@@@@  @@  @@  @@@@@@  @@@@@@          @@
  28.          @@          @@        @@    @@  @@  @@      @@              @@
  29.          @@          @@@@@@    @@    @@  @@  @@@@    @@@@            @@
  30.          @@              @@    @@    @@  @@  @@      @@              @@
  31.          @@          @@@@@@    @@    @@@@@@  @@      @@              @@
  32.          @@                                                          @@
  33.          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  34.                                @@@@@@@@@@@@@@@@@@ 
  35.                              @@@@@@@@@@  @@@@@@@@@@
  36.                            @@@@@@@@@@      @@@@@@@@@@
  37.                          @@@@@@@@@@          @@@@@@@@@@
  38.                        @@@@@@@@@@              @@@@@@@@@@
  39.                      @@@@@@@@@@                  @@@@@@@@@@
  40.                    @@@@@@@@@@                      @@@@@@@@@@
  41.                  @@@@@@@@@@                          @@@@@@@@@@
  42.                @@@@@@@@@@                              @@@@@@@@@@
  43.        @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  44.        @                                                                @
  45.        @ @@@@@@  @@@@@@          @@@@@@  @@@@@@  @@  @@  @@@@@@  @@@@@@ @
  46.        @   @@    @@              @@      @@  @@  @@@ @@  @@      @@     @
  47.        @   @@    @@@@@@          @@      @@  @@  @@@@@@  @@@@    @@ @@@ @
  48.        @   @@        @@          @@      @@  @@  @@ @@@  @@      @@  @@ @
  49.        @   @@    @@@@@@  @@@@@@  @@@@@@  @@@@@@  @@  @@  @@      @@@@@@ @
  50.        @                                                                @
  51.        @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  52.  
  53.  
  54.  
  55.  TS_Confg v01.02.00 - Turbo Stuff Self-Configuration Routines for Turbo Pascal
  56.  
  57.        Copyright (c) 1989 Shenandoah Valley Software, all rights reserved.
  58.  
  59.  
  60.  
  61.                             Shenadoah Valley Software
  62.                                   P.O. Box 1456
  63.                               Winchester, Va 22601
  64.                              Turbo Stuff - TS_Confg
  65.  
  66. Introduction
  67.  
  68.     Turbo  Stuff is a set of utilities being developed for use  with  Turbo 
  69.     Pascal 5.0.  Since there are numerous utility packages currently on the 
  70.     market that do generic things like windows,  menus,   string functions,  
  71.     etc.,    Turbo Stuff will be devoted mostly to the more advanced  areas 
  72.     like error trapping, memory residency, advanced i/o, self configuration 
  73.     and more. 
  74.  
  75.     Shenandoah  Valley Software will release Turbo Stuff  "piece-meal"   as 
  76.     it is developed,   with full source code.   Once  the entire package is 
  77.     completed,   it will be combined into a full ShareWare product.   Those  
  78.     wishing  to receive a substanial discount  off the  registered  version 
  79.     (which should sell for about $50)  should send us $10. For this $10 you 
  80.     will receive a disk containing  all those routines currently  available 
  81.     and will receive a discount of 100%   off the registration price of the 
  82.     final  release.   That means for $10  now you will get the whole  thing 
  83.     free when it is released. Target release date is Fall 1989. 
  84.  
  85. Files Included in the Release
  86.  
  87.     TS_CONFG.TPU - the Turbo Pascal 5.0 TS_Confg unit
  88.     TS_CONFG.PAS - the pascal source file for the TS_Confg unit
  89.     TS_CONFG.DOC - the documentation for the TS_Confg unit
  90.     LEGAL.SVS    - text file contains the legalese on Turbo Stuff
  91.     BUG_FORM.SVS - text file/mailer on reporting bugs
  92.     SUPPORT.SVS  - text file on support services from SVS
  93.     BETATEST.SVS - text file on becoming a beta tester
  94.     CFG_DEM1.PAS - demo using TS_Confg
  95.     CFG_DEM2.PAS - demo using TS_Confg on linked OBJ screen
  96.     CFG_DEM2.BIN - binary screen image file for demo #2
  97.     CFG_DEM2.OBJ - object code for above
  98.  
  99. What is TS_Confg and how does it work?
  100.  
  101.     TS_Config  is a routine which allows you to create programs that modify 
  102.     themself,   or are self-configuring.  This procedure is pretty straight 
  103.     forward  by using typed constants.    This requires two  steps.   First 
  104.     create  a  record TYPE that contains a variable for each piece of  data 
  105.     you wish to include in the configuration.  Second, create a CONST using 
  106.     that record to contain the default values. For example: 
  107.  
  108.          TYPE
  109.            ConfigRec = RECORD
  110.              Name    : string[30];
  111.              Phone   : string[12];
  112.            END;
  113.  
  114.          CONST
  115.            Config : ConfigRec = ( Name : 'John Test'      ;
  116.                                   Phone : '123-456-7890' );
  117.  
  118.     That's it.  Once this has been done, all you have to do in your program  
  119.     is  prompt  the user for the new information and   call  the  TS_Config 
  120.     procedure. 
  121.  
  122. Using TS_Confg on Linked OBJ Screens
  123.  
  124.     Ever  convert a binary screen image to obj,  link it with your  program 
  125.     and find out later that you needed to be able to save modifications  to 
  126.     the compiled .exe? Try TS_Config! See CFG_DEM2.PAS 
  127.  
  128. TS_Confg Reference
  129.  
  130.     Syntax:   TS_Config ( FileName, seg(const), ofs(const), 
  131.                           @const, Sizeof(const), error );
  132.  
  133.     Parameters: Filename - name of .EXE file 
  134.                 const    - name of CONST declaration
  135.  
  136.     Returns:    error    - (integer) 
  137.  
  138.     Example:    assuming the EXAMPLE.EXE and the above constant.
  139.  
  140.          VAR Oops : integer;
  141.          BEGIN
  142.            TS_Config ('EXAMPLE', seg(Config), ofs(Config),
  143.                        @Config, Sizeof(Config), Oops);
  144.          END;
  145.     
  146. Limitations
  147.  
  148.     The  only  limitation is the size of the record.   TS_Config  uses  and 
  149.     array  of char for temporary storage.   TS_Config comes  pre-configured 
  150.     for  a  record  size of 5000.   This can be  changed  by  editing   the 
  151.     TS_CONFG.PAS source and changing the size of the array in the TS_CONFIG 
  152.     procedure to the desired size. You must then recompile the TPU. 
  153.  
  154. Using Older Version of Turbo Pascal
  155.  
  156.     Simply,  you can't.  TS_Confg uses Turbo Pascal 5.0  specific commands. 
  157.     With  a  little work,  and some additional toolkits,  you could  modify 
  158.     TS_Confg to work with Turbo Pascal 4.0. 
  159.  
  160. I/O Errors
  161.  
  162.     TS_Config  uses  the {$I-} compiler directive to check for  I/O  errors 
  163.     when opening and writing to the exe file.  If an  error is encountered,  
  164.     the  error variable defined by the user is set.  Otherwise,  the  error 
  165.     variable is set to zero.  (See the example above, Oops.)  For a list of 
  166.     error codes,  refer to the Turbo Pascal Reference Manual. 
  167.  
  168. Runtime Errors
  169.  
  170.     As-is,  TS_Config does not support run-time error checking. Errors such 
  171.     as the disk being write-protected,   the drive door open,   etc.   will 
  172.     cause the program to halt with the  ever familiar Runtime error message 
  173.     of Turbo's.   Although there are several ways to solve this,  using the 
  174.     TS_Error  routine  is the best.   For more information  on  this  unit, 
  175.     download the file TS_ERROR. 
  176.  
  177. Revision History
  178.  
  179.     31-MARCH-89 - 1st release
  180.  
  181.     31-MARCH-89 - 2nd  release,  added  verification  process   using   the 
  182.     SetVerify  procedure.   Thanks  to  Don  Gibson  for pointing out  that 
  183.     users  may remove the disk before DOS gets around to  actually  writing 
  184.     its buffer. 
  185.  
  186.