Mercurial > hg > octave-nkf > gnulib-hg
changeset 3436:da0f25c86213
Use `""', not `<>' to #include non-system header files.
(fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
and strncasecmp as r-values. Unixware didn't have declarations.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Sat, 01 Sep 2001 07:28:51 +0000 |
parents | e587cbb53203 |
children | b4c6e42f9dd9 |
files | lib/exclude.c |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/exclude.c +++ b/lib/exclude.c @@ -55,9 +55,9 @@ # endif #endif -#include <exclude.h> -#include <fnmatch.h> -#include <xalloc.h> +#include "exclude.h" +#include "fnmatch.h" +#include "xalloc.h" #ifndef SIZE_MAX # define SIZE_MAX ((size_t) -1) @@ -119,12 +119,15 @@ fnmatch_no_wildcards (char const *pattern, char const *f, int options) { if (! (options & FNM_CASEFOLD)) - return (options & FNM_LEADING_DIR ? strcasecmp : strcmp) (pattern, f); + return ((options & FNM_LEADING_DIR) + ? strcasecmp (pattern, f) + : strcmp (pattern, f)); else { size_t patlen = strlen (pattern); - int r = ((options & FNM_LEADING_DIR ? strncasecmp : strncmp) - (pattern, f, patlen)); + int r = ((options & FNM_LEADING_DIR) + ? strncasecmp (pattern, f, patlen) + : strncmp (pattern, f, patlen)); if (! r) { r = f[patlen];