delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
Date: | Wed, 29 Nov 2006 11:34:38 -0500 |
Message-Id: | <200611291634.kATGYcbw010800@envy.delorie.com> |
From: | DJ Delorie <dj AT delorie DOT com> |
To: | djgpp AT delorie DOT com |
In-reply-to: | <456dad03$0$486$cc7c7865@news.luth.se> (message from Martin |
Str|mberg on 29 Nov 2006 15:53:40 GMT) | |
Subject: | Re: fnmatch("\\\\", "\\", 0) == 1 ??? |
References: | <iKydndAovO98z_DYnZ2dnUVZ_sadnZ2d AT comcast DOT com> <LO6dnbePOLnKzvDYnZ2dnUVZ_sGdnZ2d AT comcast DOT com> <456dad03$0$486$cc7c7865 AT news DOT luth DOT se> |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
> 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. Except that PATTERN is a regex influenced by FNM_NOESCAPE and FNM_PATHNAME, and STRING isn't. So a pattern of "\\" is a single escaped backslash, whereas a string of "\" is a single backslash. They should match.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |