home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d992 / cyberpager.lha / CyberPager / rexx / mwm / getuuenv next >
Text File  |  1994-04-05  |  518b  |  23 lines

  1. /* Routine to dig information out of the Amiga UUCP system */
  2.  
  3. parse arg name
  4.  
  5. /* Try the environment first */
  6. if open(env, 'env:'name) then do
  7.     out = readln(env)
  8.     call close env
  9.     return strip(out)
  10.     end
  11.  
  12. /* Otherwise, search uulib:config */
  13. if ~open(config, 'uulib:config') then
  14.     if ~open(config, 's:uuconfig') then return ""
  15.  
  16. do while ~eof(config)
  17.     line = readln(config)
  18.     if left(line, 1) = '#' then iterate
  19.     parse var line configname value
  20.     if upper(configname) = upper(name) then return strip(value)
  21.     end
  22.  
  23. return ""