Mail Archives: djgpp/2006/12/01/06:30:17.1
On Thu, 30 Nov 2006 00:20:00 -0800 in comp.os.msdos.djgpp, "Alexei A.
Frounze" <alexfru AT chat DOT ru> wrote:
>One more thing to consider, closing bracket as first character in the
>list/range inside the bracket expression:
>fnmatch("[]]", "]", 0) must return 0, doesn't
>fnmatch("[!]]", "]", 0) must return 1, does (by luck)
>fnmatch("[!]]", "a", 0) must return 0, doesn't
rangematch() for should be a do ... while.
>And one more, which seems to be partially wrong even in that same RH9 linux
>distro:
>fnmatch("\ab\c","abc",0) must return 0, does in linux, doesn't in DJGPP
>fnmatch("\[abc\]","[abc]",0) must return 0, doesn't in both linux and
>DJGPP -- the spec doesn't make an exception for the escaped opening bracket,
>\[ when describes the escaping option. Dunno, maybe it would be wise not to
>escape the bracket, but other characters should be made escapable w/o a
>problem.
Fixing escape handling and range handling should fix those.
>P.S. all the details obtained from fnmatch()'s description in The Single
>Unix Specification V3 2004 issue 6.
>P.P.S. of course there's a ton of what DJGPP's fnmatch() doesn't support,
>but the above things are pretty basic and it would be nice to have them
>handled properly, unless I overlook some major DOS-related issue for which
>it would be desirable to deviate from the spec.
Notice that escapes aren't handled in ranges; should they be?
Should escaped control characters be allowed?
Shouldn't all \ use in paths be conditional on FNM_NOESCAPE?
I'll need to checkout my SUS.
--
Thanks. Take care, Brian Inglis Calgary, Alberta, Canada
Brian DOT Inglis AT CSi DOT com (Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca)
fake address use address above to reply
- Raw text -