home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / EASL2PRF.ZIP / GETDISK.INC < prev    next >
Text File  |  1990-03-20  |  1KB  |  35 lines

  1. # Gets the list of available drives and puts them in an array
  2. # We are going to assume that A: and B: are available, so we'll just
  3. # test the hard drives.
  4. application GETDRIVES
  5.  
  6. integer Cnt
  7. string DriveLet
  8.  
  9. subroutine GetDrives (integer:NumDrives) is
  10.      set pointer to SPTR_WAIT
  11.      copy "Loading, please wait\n█" to InitMsg
  12.      change InitializeST text to InitMsg
  13.      start local GETDRIVES "MPGDISK.EXE"  
  14.            begin guarded 
  15.               response to line "ALL DONE" from GETDRIVES 
  16.                    stop GETDRIVES
  17.                    leave block
  18.               response to line "Drives=" from GETDRIVES 
  19.                     extract from input      # parse line into drives
  20.                         skip "=" 
  21.                     while (marker <= length of input) loop
  22.                         extract from input 
  23.                            skip to marker
  24.                            take 1 DriveLet
  25.                         if (DriveLet = "@") then
  26.                            leave loop
  27.                         else
  28.                            add to DiskDriveLB  
  29.                              insert DriveLet ":"
  30.                         end if
  31.                     end loop
  32.             end   # guarded
  33.      set pointer to SPTR_ARROW
  34.  
  35.