summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/texinfo/intl/finddomain.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/texinfo/intl/finddomain.c')
-rw-r--r--gnu/usr.bin/texinfo/intl/finddomain.c46
1 files changed, 9 insertions, 37 deletions
diff --git a/gnu/usr.bin/texinfo/intl/finddomain.c b/gnu/usr.bin/texinfo/intl/finddomain.c
index 3b7861e8472..ec85d4de4d1 100644
--- a/gnu/usr.bin/texinfo/intl/finddomain.c
+++ b/gnu/usr.bin/texinfo/intl/finddomain.c
@@ -1,5 +1,5 @@
-/* finddomain.c -- handle list of needed message catalogs
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Handle list of needed message catalogs
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
This program is free software; you can redistribute it and/or modify
@@ -39,12 +39,14 @@ void free ();
# include <string.h>
#else
# include <strings.h>
+# ifndef memcpy
+# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
+# endif
+#endif
+#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
# endif
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) bcopy ((Src), (Dst), (Num))
-# endif
#endif
#if defined HAVE_UNISTD_H || defined _LIBC
@@ -60,18 +62,6 @@ void free ();
#endif
/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ANSI C functions. This is required by the standard
- because some ANSI C functions will require linking with this object
- file and the name space must not be polluted. */
-# define stpcpy(dest, src) __stpcpy(dest, src)
-#else
-# ifndef HAVE_STPCPY
-static char *stpcpy PARAMS ((char *dest, const char *src));
-# endif
-#endif
-
/* List of already loaded domains. */
static struct loaded_l10nfile *_nl_loaded_domains;
@@ -103,7 +93,7 @@ _nl_find_domain (dirname, locale, domainname)
and six parts for the CEN syntax:
- language[_territory][+audience][+special][,sponsor][_revision]
+ language[_territory][+audience][+special][,[sponsor][_revision]]
Beside the first all of them are allowed to be missing. If the
full specified locale is not found, the less specific one are
@@ -168,7 +158,7 @@ _nl_find_domain (dirname, locale, domainname)
&sponsor, &revision);
/* Create all possible locale entries which might be interested in
- generalzation. */
+ generalization. */
retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
strlen (dirname) + 1, mask, language, territory,
codeset, normalized_codeset, modifier, special,
@@ -197,21 +187,3 @@ _nl_find_domain (dirname, locale, domainname)
return retval;
}
-
-/* @@ begin of epilog @@ */
-
-/* We don't want libintl.a to depend on any other library. So we
- avoid the non-standard function stpcpy. In GNU C Library this
- function is available, though. Also allow the symbol HAVE_STPCPY
- to be defined. */
-#if !_LIBC && !HAVE_STPCPY
-static char *
-stpcpy (dest, src)
- char *dest;
- const char *src;
-{
- while ((*dest++ = *src++) != '\0')
- /* Do nothing. */ ;
- return dest - 1;
-}
-#endif