Mail Archives: djgpp/2006/11/29/11:16:16
Alexei A. Frounze <alexfru AT chat DOT ru> wrote:
> Alexei A. Frounze wrote:
>> FYI fnmatch("\\\\", "\", 0) in DJGPP returns 1(no match) -- the
> obvious correction (missed one slash):
> fnmatch("\\\\", "\\", 0)
>> escaping functionality seems to be broken.
>> The same function call returns 0 (match) in Linux (Red Hat 9 kernel
>> 2.4.20) -- what it should be.
Info page says
" #include <fnmatch.h>
int fnmatch(const char *pattern, const char *string, int flags);
Description
-----------
This function indicates if STRING matches the PATTERN. ..."
So DJGPP says that "\" doesn't match "\\" while Linux says it does.
Well, I say DJGPP is right as the pattern says there should be two
backslashes and you only provide one.
Right,
MartinS
- Raw text -