www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/01/04:43:49

Date: Wed, 1 Jul 1998 11:43:42 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: nebo <nebo AT linetap DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: _chdrive()
In-Reply-To: <2FF50F00.2C9E@linetap.com>
Message-ID: <Pine.SUN.3.91.980701113709.12487V-100000@is>
MIME-Version: 1.0

On Wed, 1 Jul 1998, nebo wrote:

> Is there an equivalent, or does someone know how to
> 	make an equivalent to borlands _chdrive() function??

I think you can use the chdir function in DJGPP to do that.  For example, 
instead of _chdrive(3) you should say chdir("c:."), instead of 
_chdrive(1) say chdir("a:."), instead _chdrive(0) say chdir("."), etc.

(chdir in DJGPP's library changes drives as well as directories, unlike 
other compilers.)

> 	for those who aren't familiar with it, it checks the
> 	availability of the given drive(as an integer argument)
> 	including floppy drives, WITHOUT trying to access
> 	the drive to do it.

Not according to my references.  I think _chdrive actually changes to the 
named drive and returns non-zero if it couldn't.  chdir does the same in 
DJGPP.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019