home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 509.lha / ENVhandler / ENV.doc < prev    next >
Text File  |  1991-05-06  |  3KB  |  70 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.    I have also added support for temporary variables (which will not survive
  18. a system re-boot).  By creating the variable with a prefix of 'temp/'
  19. (e.g. temp/TempVar) it will not be added to the file and will have to be
  20. re-created when you boot your system.
  21.  
  22.    To install ENV-handler in your system copy the file 'ENV-handler' to your
  23. L: directory and add the following to your 'DEVS:MountList' file
  24.  
  25. ENV:    Handler   = L:ENV-handler
  26.         Startup   = "DEVS:envfile" /* put whatever filename you want here */
  27.         Stacksize = 4000
  28.         Priority  = 5
  29.         GlobVec   = -1
  30.         Mount     = 1  /* OPTIONAL */
  31. #
  32.  
  33. then somewhere in your 'S:Startup-Sequence' file put the command
  34. 'Mount ENV:' and your all set.
  35.  
  36.    ENV: will work much like the Commodore implementation of the 'ENV:'
  37. directory.  You can get use many of the DOS commands that you would use on
  38. files (Dir, List, Copy, Delete, Rename, etc) you can edit variables with
  39. your favourite editor (my editor works anyway) You can even CD to ENV:.
  40. One thing about Copying a file to a variable, you may get an error message
  41. telling you that the date and/or comment could not be changed, this is normal
  42. because date changes and comments are not supported.
  43.  
  44.    If you get a directory from ENV: temporary variables will have '  (temp)'
  45. appended to their names (ex. 'TempVar' will list as 'TempVar  (temp)') so
  46. you can which ones they are.
  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.
  59.  
  60.    This is my first attempt at writing an AmigaDOS handler so don't erase
  61. your ENV directory until you are satisfied that ENV-handler performs
  62. properly.  I have tried to break it in several ways and it seems quite
  63. stable to me.  ENV: runs under V1.3 of AmigaDOS.  I don't know about V1.2 or
  64. V2.0 (I don't have them) try it and let me know please.
  65.  
  66. Enjoy
  67.     Mike Ruble
  68.     CompuServe ID 71310,1237
  69.  
  70.