home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / utility / system / envirnmt / enviro.txt < prev    next >
Text File  |  1991-02-25  |  4KB  |  124 lines

  1.  
  2.  
  3.      ENVIRO.ACC    &    AUTOENVR.PRG (*)
  4.     =====================================
  5.  
  6.        Freeware by Pascal Fellerich
  7.        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  8.  
  9.  
  10.  
  11. PURPOSE:
  12.   Use it to set the environment strings
  13. WHY?
  14.   Environment strings are used to transfer some information to other 
  15. programs. The desktop, the original COMMAND.PRG by Atari and the 
  16. RSRC_LOAD function use these strings. The standard string is: 
  17. 'PATH=;C:\' if you use a harddisk. Now, if you launch a program from 
  18. an inactive window, it won't find it's RSC-file. If you had set the 
  19. environment variable 'PATH=' to the right path, this would not have 
  20. happened.
  21. An example: all your utility programs are in as folder called 
  22. 'UTILITY', and most of your RSC-files are in a folder called 'RSC' - 
  23. and now you set the environment the following way:
  24.  
  25.             PATH=;E:\UTILITY\;E:\RSC\;C:\
  26.  
  27. Now if you launch a program or try to find a resource file, the OS 
  28. will use the paths specified after 'PATH='.
  29.  
  30. Another feature:
  31. TOS has some functions to read and set the path for a 
  32. clipboard-directory. Nowadays, there are some programs that use this 
  33. feature (e.g. the GEMINI-shell). Simply type
  34.  
  35.             SCRAPDIR=X:\your\scrap_dir
  36.  
  37. and ENVIRO.ACC will set this path using the AES-function SCRP_WRITE()
  38.  
  39.  
  40. IMPORTANT:
  41.   The first variable must be 'PATH=;' - don't change it to avoid 
  42. problems...
  43.  
  44.  
  45. AUTOENVR.PRG:
  46.   must be in the AUTO-folder as this program installs a special 
  47. buffer for the AES-environment.
  48.  
  49. ENVIRO.ACC:
  50.   Allows you to modify the current environment strings and sets the 
  51. clipboard-path according to the environment variable 'SCRAPDIR='. 
  52. This ACC runs also as a program, you only have to rename it.
  53. * NOTE *: if you want only the scrapdir being set, you do not need 
  54. ENVIRO.ACC if you use the DESKTOP-BUTLER JAMES v1.5c or higher.
  55.  
  56. DESKTOP.ENV:
  57.   AutoEnvr searches in the root directory for a file called 
  58. 'DESKTOP.ENV'. If not available, then he OS-default will be used.
  59.  
  60.  
  61. Technical Notes:
  62. ----------------
  63. * AUTOENVR needs an entry in the 'cookie jar' of the OS. If there's 
  64. already a cookie jar (TOS 1.6, POOLFIX 3&4 etc...) my program uses 
  65. it; if there's none, it creates one. (logical, isn't it?)
  66. My entry is 'ENVR', and the value is a pointer to a longword-array 
  67. containing pointers and some other data.
  68.  
  69. DOC for programmers:
  70. --------------------
  71. The Cookie:
  72. Entry:      ENVR
  73. Data:       Pointer to LW-array
  74.  
  75. Array:      ARR[0] = Pointer to the AES-Environment-Buffer
  76.             ARR[1] = Length of the buffer
  77.             ARR[2] = Pointer to E_INFO - function
  78.             ARR[3] =    "     " E_SFIRST     "
  79.             ARR[4] =    "     " E_SNEXT      "
  80.  
  81. Functions:
  82. ----------
  83.   The functions are called like a normal C-routine. They return 
  84. something in register d0.
  85.  
  86.   1. E_INFO:
  87.         C-Declaration:  long e_info()
  88.      CALL:
  89.         C:    version=e_info();
  90.         GFA:  version%=C:e_info%()
  91.      RETURN-VALUE:
  92.         version: upper word: Release, lower word: rev.
  93.  
  94.   2. E_SFIRST:
  95.         C-Declaration:  long e_sfirst(pattern)
  96.                                 char *pattern;
  97.      CALL:
  98.         C:    found=e_sfirst(pattern);
  99.         GFA:  found%=C:e_sfirst(L:V:pattern$)
  100.      RETURN-VALUE:
  101.         pattern: nukll terminated string containing the
  102.         search-pattern.
  103.         found:   -1.L (failure) or pointer to matching string.
  104.  
  105.   3. E_SNEXT:
  106.         C-Declaration:  long e_snext()
  107.      CALL:
  108.         C:    found=e_sfirst();
  109.         GFA:  found%=C:e_sfirst()
  110.      RETURN-VALUE:
  111.         found:   -1.L (failure) or pointer to matching string.
  112.  
  113.   The search-string (pattern strin) must not exceed 20 chars. But it 
  114. can be sa complicated as you want. There are two wildcards: '*' and 
  115. '?'; they are used in exactly the same way as in TOS. An pattern 
  116. string like ?*MS?D*?*O**S?* is valid! (Would return for example
  117.           COMSPEC=D:\TOS\XYZ.PRG
  118.             ^^    ^   ^^    
  119.  
  120.   Their further use is like the GEMDOS FSFIRST and FSNEXT functions.
  121.  
  122. =====================================================================
  123.  
  124.