/[gnats]/gnats/libiberty/fnmatch.c
ViewVC logotype

Diff of /gnats/libiberty/fnmatch.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jsm, Tue Oct 26 07:10:16 1999 UTC revision 1.3 by pdm, Mon Dec 10 23:03:26 2001 UTC
# Line 1  Line 1 
1  /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.  /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
2    
3  NOTE: The canonical source of this file is maintained with the GNU C Library.  NOTE: This source is derived from an old version taken from the GNU C
4  Bugs can be reported to bug-glibc@prep.ai.mit.edu.  Library (glibc).
5    
6  This program is free software; you can redistribute it and/or modify it  This program is free software; you can redistribute it and/or modify it
7  under the terms of the GNU General Public License as published by the  under the terms of the GNU General Public License as published by the
# Line 45  Boston, MA 02111-1307, USA.  */ Line 45  Boston, MA 02111-1307, USA.  */
45    
46  #include <errno.h>  #include <errno.h>
47  #include <fnmatch.h>  #include <fnmatch.h>
48  #include <ctype.h>  #include <safe-ctype.h>
   
49    
50  /* Comment out all this code if we are using the GNU C Library, and are not  /* Comment out all this code if we are using the GNU C Library, and are not
51     actually compiling the library itself.  This code is part of the GNU C     actually compiling the library itself.  This code is part of the GNU C
# Line 74  fnmatch (pattern, string, flags) Line 73  fnmatch (pattern, string, flags)
73    register const char *p = pattern, *n = string;    register const char *p = pattern, *n = string;
74    register unsigned char c;    register unsigned char c;
75    
76  /* Note that this evalutes C many times.  */  #define FOLD(c) ((flags & FNM_CASEFOLD) ? TOLOWER (c) : (c))
 #define FOLD(c) ((flags & FNM_CASEFOLD) && isupper (c) ? tolower (c) : (c))  
77    
78    while ((c = *p++) != '\0')    while ((c = *p++) != '\0')
79      {      {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26