home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / SASC6571.LZX / rexx / libraries.cpr < prev    next >
Encoding:
Text File  |  1996-12-24  |  678 b   |  25 lines

  1. /* Display the libraries in the system */
  2.  
  3. address 'COMMAND'
  4. 'version >nil: exec.library 36 '
  5. lrc = rc
  6.  
  7. if (rc = 0) then
  8.   check = addlib('rexxsupport.library',0,-30,0) 
  9.  
  10. address
  11.  
  12. execbase = next("00000004"x)
  13. liboff   = 378
  14. nodebase = import(offset(execbase, liboff), 4)
  15.  
  16. 'd "  Address NT Pri Open Name"'
  17. do while(import(nodebase,4) ~= "00000000"x)
  18.    nt      = right(c2d(import(offset(nodebase,8),1),1),3)
  19.    pri     = right(c2d(import(offset(nodebase,9),1),1),4)
  20.    namestr = import(import(offset(nodebase,10),4))
  21.    opencnt = right(c2d(import(offset(nodebase,32),2),2),5)
  22.    'd "$'||c2x(nodebase)||nt||pri||opencnt||' \"'||namestr||'\""'
  23.    nodebase = import(nodebase,4)
  24. end
  25.