home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / utils / bug / 1544 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.3 KB  |  40 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!gain.COM!jtc
  3. From: jtc@gain.COM (J.T. Conklin)
  4. Subject: file name globbing with tar-1.11
  5. Message-ID: <9209110017.AA24585@rangoon.gain.com>
  6. Sender: gnulists@ai.mit.edu
  7. Reply-To: jtc@gain.com
  8. Organization: GAIN Technology Inc., Palo Alto, CA
  9. Distribution: gnu
  10. Date: Thu, 10 Sep 1992 10:17:21 GMT
  11. Approved: bug-gnu-utils@prep.ai.mit.edu
  12. Lines: 26
  13.  
  14. fnmatch(), used by most of the other gnu utilities for file name
  15. globbing, allows both `!' and `^' to negate character classes.
  16.  
  17. wildmat(), used by tar-1.11, only allowed `!' until now:
  18.  
  19.  
  20. *** OLD/wildmat.c    Thu Sep 10 17:03:38 1992
  21. --- wildmat.c    Thu Sep 10 17:04:32 1992
  22. ***************
  23. *** 104,110 ****
  24.           return(*++p ? Star(s, p) : TRUE);
  25.           case '[':
  26.           /* [!....] means inverse character class. */
  27. !         if (reverse = p[1] == '!')
  28.               p++;
  29.           for (last = 0400, matched = FALSE; *++p && *p != ']'; last = *p)
  30.               /* This next line requires a good C compiler. */
  31. --- 104,110 ----
  32.           return(*++p ? Star(s, p) : TRUE);
  33.           case '[':
  34.           /* [!....] means inverse character class. */
  35. !         if (reverse = (p[1] == '!' || p[1] == '^'))
  36.               p++;
  37.           for (last = 0400, matched = FALSE; *++p && *p != ']'; last = *p)
  38.               /* This next line requires a good C compiler. */
  39.  
  40.