www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/24/09:24:50

Date: Sat, 24 Mar 2001 16:21:16 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Message-Id: <3405-Sat24Mar2001162116+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: djgpp AT delorie DOT com
In-reply-to: <99ffnj$lq1$1@antares.lu.erisoft.se> (eplmst@lu.erisoft.se)
Subject: Re: Freedos, INT 0x21, AX=0x71a0 and emacs
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1010322094711 DOT 7564F-100000 AT is> <99cfks$cbt$1 AT antares DOT lu DOT erisoft DOT se> <99dikd$ftj$1 AT news DOT luth DOT se> <2110-Fri23Mar2001131056+0200-eliz AT is DOT elta DOT co DOT il> <99ffnj$lq1$1 AT antares DOT lu DOT erisoft DOT se>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
> Newsgroups: comp.os.msdos.djgpp
> Date: 23 Mar 2001 12:31:47 GMT
> 
> : I'm not sure there's a bug; Emacs doesn't do anything that any other
> : DJGPP program would do.  Please step with a debugger into _use_lfn and
> : see what happens there.
> 
> : What you describe can and should happen if 71A0h doesn't return 71h
> : in the AH register.  In that case, the library function
> : `_get_volume_info' does this:
> 
> :     if (r.h.ah == 0x71)
> :     {
> 
> This is executed.
> 
> :       errno = ENOSYS;
> :       retval = 0;	/* meaning none of the features supported */
> :     }
> :     else
> :     {
> :       /* If the call failed, but not because the OS doesn't support
> : 	 the function (e.g., invalid drive), don't disable LFN.  */
> :       errno = __doserr_to_errno(r.x.ax);
> :       retval = _FILESYS_UNKNOWN;
> :     }
> 
> 
> : If FreeDOS doesn't return 71h in the AH register, this will return
> : _FILESYS_UNKNOWN.  The function `_use_lfn' then does this:
> 
> Sure but it's not relevant as the branch indicated above is taken.

There's still the case where _use_lfn is passed a valid file name with
a drive letter (as opposed to a NULL pointer, which is what the
_USE_LFN macro does).  In that case, _use_lfn always calls 71A0h,
because it never caches the drive letter from the previous call.

One notable case where _use_lfn is passed a drive letter is when it is
called by _fixpath.  Since stat calls _fixpath, and Emacs calls stat a
lot, I'd bet if you put a breakpoint in _get_volume_info and print a
backtrace, you will see _fixpath and stat most, if not all, of the
time.

Note that glob also calls _use_lfn with a file name, so any program
which gets argc > 1 will call _get_volume_info more than once in the
startup code.

- Raw text -


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