Mail Archives: djgpp/2003/01/28/15:45:16
From: | "Gary Hubbard" <me AT sandia DOT gov>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Command line wildcard expansion under Win2K
|
Date: | Tue, 28 Jan 2003 12:24:26 -0800
|
Organization: | Sandia National Laboratories, Albuquerque, NM USA
|
Lines: | 58
|
Message-ID: | <b16osl$pkd$1@sass2141.sandia.gov>
|
References: | <b16aeu$ilk$1 AT sass2141 DOT sandia DOT gov> <6137-Tue28Jan2003192943+0200-eliz AT is DOT elta DOT co DOT il>
|
NNTP-Posting-Host: | hubbardpc.ran.sandia.gov
|
X-Trace: | sass2141.sandia.gov 1043785429 26253 134.252.7.230 (28 Jan 2003 20:23:49 GMT)
|
X-Complaints-To: | usenet AT sass2141 DOT sandia DOT gov
|
NNTP-Posting-Date: | Tue, 28 Jan 2003 20:23:49 +0000 (UTC)
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 6.00.2600.0000
|
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Sorry for the imprecision in the my earlier post. I had thought I
understood the problem but it is slightly more subtle than I realized.
As Charles notes *.vec and *.VEC DO do the same thing. The problem is with
a*.vec, which only works if the a and obj parts are lower case, or A*.VEC,
which only works i A and VEC are upper case in the real directory entry.
They simply return the pattern, as a Unix program would do. All this does
occur in djecho, at least for me.
The segment fault was my error. I was trying to open a file called
something like "a*.vec" which did not exist. Due to a series of foul-ups, I
did not properly trap the open error and my code dies later on. OOPS!!!
TIA
Gary
"Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> wrote in message
news:6137-Tue28Jan2003192943+0200-eliz AT is DOT elta DOT co DOT il...
> > From: "Gary Hubbard" <me AT sandia DOT gov>
> > Newsgroups: comp.os.msdos.djgpp
> > Date: Tue, 28 Jan 2003 08:18:09 -0800
> >
> > Comman line filename expansions (any presumably others) seem to be case
> > sensitive.
>
> That's true: DJGPP tries to mimic a Unix environment, and thus
> file-name expansion is by design case-sensitive. However, since the
> filesystems on which DJGPP runs are case-INsensitive, the wildcard
> expansion tries to play along: the file names match case-insensitively
> unless the wildcard includes upper-case characters.
>
> See the documentation for the library function `glob' for more details
> (type "info libc alpha glob" from the DOS prompt).
>
> > Thus running a program
> > prog *.vec
> > will fail with a memory access exception (before main() is started) if
the
> > files were written as upper case, say A.VEC and B.VEC. Running with
> > prog *.VEC
> > will work.
> >
> > Is this a known problem?
>
> No, I don't think we know about this problem. Please post the
> details:
>
> - the exact command you type from the command prompt;
>
> - the exact error message(s) printed when the program fails, and
>
> - the output of "dir /x" in the directory where you run the failing
> command.
>
> Thanks.
- Raw text -