Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
	* posix/fnmatch_loop.c (FCT): Handle !() after * special like @()
	and +().
	* posix/tst-fnmatch.input: Add test cases for matching empty strings.
  • Loading branch information
Ulrich Drepper committed Mar 28, 2001
1 parent 325a39c commit 228293b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
2001-03-27 Ulrich Drepper <drepper@redhat.com>

* posix/fnmatch_loop.c (FCT): Handle !() after * special like @()
and +().
* posix/tst-fnmatch.input: Add test cases for matching empty strings.

* sysdeps/ieee754/dbl-64/endian.h: Removed. Move definitions...
* include/endian.h: ...to here.

Expand Down
4 changes: 2 additions & 2 deletions posix/fnmatch_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ FCT (pattern, string, string_end, no_leading_period, flags)

if (c == L('[')
|| (__builtin_expect (flags & FNM_EXTMATCH, 0) != 0
/* XXX Do we have to add '!'? */
&& (c == L('@') || c == L('+')) && *p == L('(')))
&& (c == L('@') || c == L('+') || c == L('!'))
&& *p == L('(')))
{
int flags2 = ((flags & FNM_FILE_NAME)
? flags : (flags & ~FNM_PERIOD));
Expand Down
6 changes: 5 additions & 1 deletion posix/tst-fnmatch.input
Original file line number Diff line number Diff line change
Expand Up @@ -713,5 +713,9 @@ C "[" "!([!]a[])" 0 EXTMATCH
C "]" "!([!]a[])" 0 EXTMATCH
C ")" "*([)])" 0 EXTMATCH
C "*" "*([*(])" 0 EXTMATCH
C "abcd" "*!(|a)cd" NOMATCH EXTMATCH
C "abcd" "*!(|a)cd" 0 EXTMATCH
C "ab/.a" "+([abc])/*" NOMATCH EXTMATCH|PATHNAME|PERIOD
C "" "" 0
C "" "" 0 EXTMATCH
C "" "*([abc])" 0 EXTMATCH
C "" "?([abc])" 0 EXTMATCH

0 comments on commit 228293b

Please sign in to comment.