cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/28/13:04:09

Date: Thu, 28 May 1998 20:03:41 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Anthony Appleyard <MCLSSAA2 AT fs2 DOT mt DOT umist DOT ac DOT uk>
cc: DJGPP AT delorie DOT com, ralf AT pobox DOT com
Subject: Re: A funny in windows 95
In-Reply-To: <200CC431A78@fs2.mt.umist.ac.uk>
Message-ID: <Pine.SUN.3.91.980528195904.1138P-100000@is>
MIME-Version: 1.0

On Thu, 28 May 1998, Anthony Appleyard wrote:

> In assembling pathnames it is easy to forget that root level directory names
> end in a \, e.g. C:\ , and so to make up a pathname containing two consecutive
> \ characters, e.g. C:\\MYFILE.TXT . I have found the hard way that if you call
> `AX=0x7160, CX=2 (or 0x8002), int21' to find the longname given the shortname,
> if the shortname starts with a drive letter, colon, and TWO \ as above, that
> interrupt call takes <<several seconds>> to run even on a very fast new PC,
> instead of quickly faulting and exiting.

This is most probably because two slashes at the beginning is taken by 
Windows as a network share (aka UNC), a name that points to another 
machine.  So Windows goes to the network and looks for a machine with a 
non-existent name, and you wait...

To make this problem go away, always use forward slashes, and call DJGPP 
functions whenever possible.  DJGPP library transparently collapses all 
consecutive slashes to a single slash before calling DOS interrupts, but 
it only does so for forward slashes.

As for function 7160h, you can just call `_truename' from the DJGPP 
library, it does the same.  But you get the above slash-collapsing 
feature for free, while using it.

- Raw text -


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