delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/10/14:02:09

From: ad354 AT FreeNet DOT Carleton DOT CA (James Owens)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: InfoZIP vol label: force it, but please advise
Date: 10 Nov 2000 18:29:18 GMT
Organization: The National Capital FreeNet
Lines: 77
Message-ID: <8uhepu$kk5$1@freenet9.carleton.ca>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1001108090500 DOT 4601G-100000 AT is> <8ubi1t$j7k$1 AT freenet9 DOT carleton DOT ca> <1659-Wed08Nov2000195636+0200-eliz AT is DOT elta DOT co DOT il> <8uc9gb$mvn$1 AT freenet9 DOT carleton DOT ca> <9003-Thu09Nov2000002038+0200-eliz AT is DOT elta DOT co DOT il> <8uee2v$1v7$1 AT freenet9 DOT carleton DOT ca> <2110-Thu09Nov2000195846+0200-eliz AT is DOT elta DOT co DOT il>
NNTP-Posting-Host: freenet10
X-Trace: freenet9.carleton.ca 973880958 21125 134.117.136.30 (10 Nov 2000 18:29:18 GMT)
X-Complaints-To: complaints AT ncf DOT ca
NNTP-Posting-Date: 10 Nov 2000 18:29:18 GMT
X-Given-Sender: ad354 AT freenet10 DOT carleton DOT ca (James Owens)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Eli Zaretskii" (eliz AT is DOT elta DOT co DOT il) writes:
>> From: ad354 AT FreeNet DOT Carleton DOT CA (James Owens)

>> Here are what seem to be the relevant bits of volumelabel():

> Are you sure that the above definition of F_intdosx is used for DJGPP?

No -- and now I must offer my sincere and abject apologies.  There are two
definitions of volumelabel; one is a substantial function and the other is
very small.  I've given information from the big one:

#if (!defined(__GO32__) && !defined(__EMX__))

...

/**************************/
/* Function volumelabel() */
/**************************/

static int volumelabel(newlabel)
    char *newlabel;
...

(I'm still not sure how this is excluded from the DJGPP compile.)  There's
another routine within the function version(), and it looks like this:

...
#endif /* !__DJGPP__ || (__DJGPP__ < 2) */

static int volumelabel(char *name)
{
    int fd;
    return _dos_creat(name, FA_LABEL, &fd) ? fd : _dos_close(fd);
}
...

A printf inserted here shows up.

The fact that there are two functions is stated at the beginning of the
file, as shown below.  When I first searched for the alternate definition,
I searched for volumelabel() and only the first one showed up, which
puzzled me.  I was also puzzled by the __GO32__ condition for the
function, rather than the DJGPP condition I was expecting. I shouldn't
have let the matter go there, and I'm sorry for the confusion my
inattention has caused. 

/*-------------------... 
  msdos.c

  MSDOS-specific routines for use with Info-ZIP's UnZip 5.3 and later.

  Contains:  Opendir()                      (from zip)
...
             volumelabel()                  (non-djgpp, non-emx)
...
             version()
             _dos_getcountryinfo()          (djgpp 1.x, emx)
            [_dos_getftime()                (djgpp 1.x, emx)   to be added]
             _dos_setftime()                (djgpp 1.x, emx)
             _dos_setfileattr()             (djgpp 1.x, emx)
             _dos_getdrive()                (djgpp 1.x, emx)
             _dos_creat()                   (djgpp 1.x, emx)
             _dos_close()                   (djgpp 1.x, emx)
             volumelabel()                  (djgpp, emx)
             _dos_getcountryinfo()          (djgpp 2.x)
             _is_executable()               (djgpp 2.x)
             __crt0_glob_function()         (djgpp 2.x)
             __crt0_load_environment_file() (djgpp 2.x)

...



--

                                     James Owens  ad354 AT Freenet DOT carleton DOT ca
                                     Ottawa, Ontario, Canada

- Raw text -


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