summaryrefslogtreecommitdiff
path: root/libc/misc/fnmatch/fnmatch_old.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
commitaf0172162f7c653cad6a11ed1c1a5459bc154465 (patch)
tree70031dad1e7286d58762da7b9e3d3f93d043c278 /libc/misc/fnmatch/fnmatch_old.c
parentc8609543a9a8bf6559c2931dbbef6b3c41b3fbf2 (diff)
hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed
Diffstat (limited to 'libc/misc/fnmatch/fnmatch_old.c')
-rw-r--r--libc/misc/fnmatch/fnmatch_old.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libc/misc/fnmatch/fnmatch_old.c b/libc/misc/fnmatch/fnmatch_old.c
index 2762b3930..47075e914 100644
--- a/libc/misc/fnmatch/fnmatch_old.c
+++ b/libc/misc/fnmatch/fnmatch_old.c
@@ -28,6 +28,9 @@ Cambridge, MA 02139, USA. */
#include <fnmatch.h>
#include <ctype.h>
+libc_hidden_proto(fnmatch)
+
+libc_hidden_proto(tolower)
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
Library, but also included in many other GNU distributions. Compiling
@@ -50,13 +53,13 @@ Cambridge, MA 02139, USA. */
/* Match STRING against the filename pattern PATTERN, returning zero if
it matches, nonzero if not. */
-int attribute_hidden __fnmatch(const char *pattern, const char *string, int flags)
+int fnmatch(const char *pattern, const char *string, int flags)
{
register const char *p = pattern, *n = string;
register char c;
/* Note that this evaluates C many times. */
-# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? __tolower (c) : (c))
+# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
while ((c = *p++) != '\0') {
c = FOLD(c);
@@ -116,7 +119,7 @@ int attribute_hidden __fnmatch(const char *pattern, const char *string, int flag
c1 = FOLD(c1);
for (--p; *n != '\0'; ++n)
if ((c == '[' || FOLD(*n) == c1) &&
- __fnmatch(p, n, flags & ~FNM_PERIOD) == 0)
+ fnmatch(p, n, flags & ~FNM_PERIOD) == 0)
return 0;
return FNM_NOMATCH;
}
@@ -220,5 +223,5 @@ int attribute_hidden __fnmatch(const char *pattern, const char *string, int flag
# undef FOLD
}
-strong_alias(__fnmatch,fnmatch)
+libc_hidden_def(fnmatch)
#endif /* _LIBC or not __GNU_LIBRARY__. */