Re: Bug in filelist.e

new topic     » goto parent     » topic index » view thread      » older message » newer message

At 15:56 97-05-08 -0400, you wrote:

>I just downloaded Jacques SFX2 file and find an error in
>hi fileist.e routines (also found on the jd.zip version).
>The problem is that if you have a CD-ROM, but with no CD
>in it, you'll get a Critical Error, cause the function
>tryies to make a dir() to the drive with the function
>GetDriveList() at line 724 of the code (yes, I traced it!).


Hi Daniel,

    I was aware of that problem but as David Cuny releassed is excellent
text tool, I will not spend any more effort on filelist.e, You should forget
filelist.e and use David's d_open.e instead.


    For my programs that uses filelist.e I simply commented out the search
for cd-rom.


global function GetDriveList()
  integer hdn,fdn
  sequence fl,hl,cdl, cdId
  object d

  fdn = floor(peek(#410) / 64) -- number of floppies
  if fdn = 0 then
    fl = "A"
  elsif fdn = 1 then
    fl = "AB"
  end if

  hdn = peek(#475) -- number of hard disk
  if hdn = 1 then
     hl = "C"
     cdId = "D:"
  elsif hdn = 2 then
     hl = "CD"
     cdId = "E:"
  end if
--check for CD-ROM
  d = {}
  cdl = ""
--  while not atom(d) do
--    d = dir(cdId)
--    if sequence(d) then
--        cdl = cdl & cdId[1]
--        cdId[1] = cdId[1] + 1
--    end if
--  end while
  return fl & hl & cdl
end function -- GetDriveList()

Jacques Deschenes
Baie-Comeau, Quebec
Canada
desja at quebectel.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu