home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / diff.lzh / diff / fnmatch.h < prev    next >
Encoding:
C/C++ Source or Header  |  1986-04-24  |  2.1 KB  |  63 lines

  1. /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  2.  
  3. $Id: fnmatch.h_v 1.1 96/04/23 02:52:43 hiro Exp $
  4.  
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Library General Public License as
  7. published by the Free Software Foundation; either version 2 of the
  8. License, or (at your option) any later version.
  9.  
  10. This library is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13. Library General Public License for more details.
  14.  
  15. You should have received a copy of the GNU Library General Public
  16. License along with this library; see the file COPYING.LIB.  If
  17. not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  18. Cambridge, MA 02139, USA.  */
  19.  
  20. #ifndef    _FNMATCH_H
  21.  
  22. #define    _FNMATCH_H    1
  23.  
  24. #ifdef    __cplusplus
  25. extern "C" {
  26. #endif
  27.  
  28. #if defined (__cplusplus) || defined (__STDC__)
  29. #undef    __P
  30. #define    __P(args)    args
  31. #else /* Not C++ or ANSI C.  */
  32. #undef    __P
  33. #define    __P(args)    ()
  34. /* We can get away without defining `const' here only because in this file
  35.    it is used only inside the prototype for `fnmatch', which is elided in
  36.    non-ANSI C where `const' is problematical.  */
  37. #endif /* C++ or ANSI C.  */
  38.  
  39. /* Bits set in the FLAGS argument to `fnmatch'.  */
  40. #define    FNM_PATHNAME    (1 << 0) /* No wildcard can ever match `/'.  */
  41. #define    FNM_NOESCAPE    (1 << 1) /* Backslashes don't quote special chars.  */
  42. #define    FNM_PERIOD    (1 << 2) /* Leading `.' is matched only explicitly.  */
  43.  
  44. #if !defined (_POSIX_C_SOURCE) || defined (_GNU_SOURCE)
  45. #define    FNM_FILE_NAME    FNM_PATHNAME /* Preferred GNU name.  */
  46. #define    FNM_LEADING_DIR    (1 << 3) /* Ignore `/...' after a match.  */
  47. #define    FNM_CASEFOLD    (1 << 4) /* Compare without regard to case.  */
  48. #endif
  49.  
  50. /* Value returned by `fnmatch' if STRING does not match PATTERN.  */
  51. #define    FNM_NOMATCH    1
  52.  
  53. /* Match STRING against the filename pattern PATTERN,
  54.    returning zero if it matches, FNM_NOMATCH if not.  */
  55. extern int fnmatch __P ((const char *__pattern, const char *__string,
  56.              int __flags));
  57.  
  58. #ifdef    __cplusplus
  59. }
  60. #endif
  61.  
  62. #endif /* fnmatch.h */
  63.