home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 534.lha / ENV-handler_v2.5 / ENV.doc < prev    next >
Text File  |  1991-08-08  |  4KB  |  84 lines

  1.  
  2. ENV-handler and associated files are © 1991 by Mike Ruble.  Any inquiries or
  3. problems should be sent EMAIL CompuServe ID 71310,1237.
  4.  
  5.  
  6.    The Environment Variable handler is an AmigaDOS handler that manages all
  7. variables in memory instead of in separate files on disk.  The way that
  8. Commodre implemented environment variables requires you to create a separate
  9. directory somewhere on your disk and create files with the name of your 
  10. variables.  I always thought that this was STUPID and a waste of disk
  11. space.  So I (finally) wrote ENV-handler to store all variables in a single
  12. file that you can specify in its MountList entry.  When you Mount ENV: the
  13. handler will read this file (if it exists) and set up its own variable list.
  14. Each time a variable is updated, added, renamed, or deleted the file will be
  15. updated so that variables will become permanent until you delete them.
  16.  
  17.    ENV: also supports sub-directories.  You can create a sub-directory using
  18. the AmigaDOS MakeDir command.  This was added to support the OS2.0 "sys"
  19. sub-directory.  ENV: will support any number of nested sub-directories.
  20.  
  21.    I have also added support for temporary variables (which will not survive
  22. a system re-boot).  By creating the variable with a prefix of 'temp/'
  23. (e.g. temp/TempVar) it will not be added to the file and will have to be
  24. re-created when you boot your system.
  25.  
  26.    To install ENV-handler in your system copy the file 'ENV-handler' to your
  27. L: directory and add the following to your 'DEVS:MountList' file
  28.  
  29. ENV:    Handler   = L:ENV-handler
  30.         Startup   = "DEVS:envfile" /* put whatever filename you want here */
  31.         Stacksize = 4000
  32.         Priority  = 5
  33.         GlobVec   = -1
  34.         Mount     = 1  /* OPTIONAL */
  35. #
  36.  
  37. then somewhere in your 'S:Startup-Sequence' file put the command
  38. 'Mount ENV:' and your all set.
  39.  
  40.    ENV: will work much like the Commodore implementation of the 'ENV:'
  41. directory.  You can use many of the DOS commands that you would use on
  42. files (Dir, List, Copy, Delete, Rename, etc) you can edit variables with
  43. your favourite editor (my editor works anyway) You can even CD to ENV:.
  44. One thing about Copying a file to a variable, you may get an error message
  45. telling you that the date and/or comment could not be changed, this is normal
  46. because date changes and comments are not supported (or neccesary).
  47.  
  48.    Variable names are not case sensitive (because of Commodore) so 'Var'
  49. will be the same as 'var' or 'VAR' etc.
  50.  
  51.    The file maintained by ENV: has a specific format.  Be VERY carefull if
  52. you make any changes to it.  The first 4 characters may look wierd because
  53. they indicate the length of the variable that follows (name=value).  So an
  54. example of the file format is
  55. 00 00 00 0a name=value00 00 00 0c name2=value2
  56.           |                     |
  57.          10                    12
  58. if the length is incorrect the results could be disasterous.  This file is
  59. updated any time a non-temporary variable is added, changed, deleted, etc.
  60.  
  61.    This is my first attempt at writing an AmigaDOS handler so don't erase
  62. your ENV directory until you are satisfied that ENV-handler performs
  63. properly.  I have tried to break it in several ways and it seems quite
  64. stable to me.  ENV: runs under V1.3 of AmigaDOS.  I don't know about V1.2 or
  65. V2.0 (I don't have them) try it and let me know please.
  66.  
  67. Enjoy
  68.     Mike Ruble
  69.     CompuServe ID 71310,1237
  70.  
  71.  
  72. CHANGES:
  73.  
  74. V2.5  05/21/91 - MWR - Added support for sub-directories.  cleaned up some
  75.                        code to make a little faster.
  76. V2.0  05/04/91 - MWR - Re-coded in assembler to reduce size and
  77.                        increase speed.  fixed a bug found when creating
  78.                        or writing to variables.
  79. V1.3  05/02/91 - MWR - Removed '  (temp)' tag on temporary variables.
  80.                        I decided it wasn't necessary.
  81. V1.1  04/23/91 - MWR - Added support for temp variables.  Stomped on
  82.                        bug found when using type.
  83. V1.0  04/21/91 - MWR - New program.
  84.