Re: [AD] a 'bug' fix

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Pavlovic <pavlovic@xxxxxxxxxx> writes:
> But there is another funny thing about this. When I try to read something
> from the logical drive directly in DOS, e.g. b:\test.exe, it asks for the
> diskette. I give a diskette into my drive a: and it works. But then, the 
> DOS function <get logical drive (I don't remember the numbers exactly)>
> says that a: is a logical drive for b:. This is a thing I will try to
> solve... although in this case Allegro's file selector works with b: :-)

That's ok, not a bug: DOS is designed to work that way. On a single floppy 
machine, the drive letters a: and b: both refer to the same physical drive. 
Whichever one you used most recently is directly connected to it, and trying 
to use the other one will prompt you to change floppies before doing the 
access. This is from the old pre-HD days, so that you can do things like 
"copy a:\*.* b:\" on a single-disk machine, and be told whenever that 
operation needs you to change the disk.

The problem is that when DOS prompts you to change disk, it prints a message 
to the screen and then waits for a keypress, which will die horribly if 
something like Allegro is active at the time. So the Allegro file access 
routines take care to make sure that will never happen (see the 
_al_file_isok() function in dfile.c), which means that you will never see 
this prompt, and will simply be unable to access whatever drive would 
otherwise require the prompt to be displayed.


--
Shawn Hargreaves - shawn@xxxxxxxxxx - http://www.talula.demon.co.uk/
"A binary is barely software: it's more like hardware on a floppy disk."



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/