fnmatch.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  2. This library is free software; you can redistribute it and/or
  3. modify it under the terms of the GNU Library General Public License as
  4. published by the Free Software Foundation; either version 2 of the
  5. License, or (at your option) any later version.
  6. This library is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  9. Library General Public License for more details.
  10. You should have received a copy of the GNU Library General Public
  11. License along with this library; see the file COPYING.LIB. If
  12. not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  13. Cambridge, MA 02139, USA. */
  14. #ifndef _FNMATCH_H
  15. #define _FNMATCH_H 1
  16. #include <features.h>
  17. __BEGIN_DECLS
  18. /* Bits set in the FLAGS argument to `fnmatch'. */
  19. #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
  20. #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
  21. #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
  22. #if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
  23. #define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
  24. #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
  25. #define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
  26. #endif
  27. /* Value returned by `fnmatch' if STRING does not match PATTERN. */
  28. #define FNM_NOMATCH 1
  29. /* Match STRING against the filename pattern PATTERN,
  30. returning zero if it matches, FNM_NOMATCH if not. */
  31. extern int fnmatch __P ((__const char *__pattern, __const char *__string,
  32. int __flags));
  33. __END_DECLS
  34. #endif /* fnmatch.h */