From: Charles Sandmann Newsgroups: comp.os.msdos.djgpp Subject: Re: Command line wildcard expansion under Win2K Date: Sat, 01 Feb 2003 14:05:52 CST Organization: Rice University, Houston TX Lines: 26 Message-ID: <3e3c28a0.sandmann@clio.rice.edu> References: <3e394a9a DOT sandmann AT clio DOT rice DOT edu> <3e39ff1a DOT sandmann AT clio DOT rice DOT edu> <7458-Sat01Feb2003124759+0200-eliz AT is DOT elta DOT co DOT il> NNTP-Posting-Host: clio.rice.edu X-Trace: joe.rice.edu 1044130924 23031 128.42.105.3 (1 Feb 2003 20:22:04 GMT) X-Complaints-To: abuse AT rice DOT edu NNTP-Posting-Date: 1 Feb 2003 20:22:04 GMT X-NewsEditor: ED-1.5.9 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > > Look at the variable "caseless" (in particular where it is set when the > > name has upper case characters and use_lfn). > > I wish it were that simple, but it isn't. Actually, it is. This variable is only used to control the flags to the fnmatch call (the FNM_NOCASE flag). If "caseless" is set to 1, the glob always does a case insensitive match, which is what the OP wants (and is standard for all DOS/Win program behavior on the file system). Adding a statement like "if crt_flag_alwayscaseinsensitiveglob caseless=1" should work (or make this default and require a flag to enable upper case quirkyness). > The ``when-to-downcase'' issue pops up in other places, not just in `glob'. The what to return/display issue doesn't have anything to do with matching case insensitively - the return file name will work in open statements no matter what the case is. No proposal to change that behavior at all. There is a flag to control it. There is no flag to control the non-standard globing behavior. If there are specific instances of GNU/Unixy programs that would expect glob to fail (not match) based on case - I would argue they should be the exceptions instead of the rule on a DOS/Windows based compiler.