summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-09-01 07:28:51 +0000
committerJim Meyering <jim@meyering.net>2001-09-01 07:28:51 +0000
commit847d1c0da769fcc4229300c8e7d292de7044721f (patch)
treeae37c60fbc818803a3a77e1d4d53ed23d696c6a0
parent414d5f13bee6e7e833784e264ddff902b0a4bcae (diff)
downloadcoreutils-847d1c0da769fcc4229300c8e7d292de7044721f.tar.xz
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.
-rw-r--r--lib/exclude.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/exclude.c b/lib/exclude.c
index 5a1e1ee6f..7df879dd1 100644
--- a/lib/exclude.c
+++ b/lib/exclude.c
@@ -55,9 +55,9 @@ extern int errno;
# 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 @@ static int
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];