X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: <456dad03$0$486$cc7c7865@news.luth.se> From: Martin Str|mberg Subject: Re: fnmatch("\\\\", "\\", 0) == 1 ??? Newsgroups: comp.os.msdos.djgpp References: User-Agent: tin/1.4.6-20020816 ("Aerials") (UNIX) (NetBSD/1.6Q (alpha)) Date: 29 Nov 2006 15:53:40 GMT Lines: 30 NNTP-Posting-Host: speedy.ludd.ltu.se X-Trace: 1164815620 news.luth.se 486 130.240.16.13 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Alexei A. Frounze 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 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