summaryrefslogtreecommitdiff
path: root/intl/l10nflist.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-06-29 22:38:13 +0000
committerjbj <devnull@localhost>2001-06-29 22:38:13 +0000
commit5177464972a45db08785964718215c2a9ddd7179 (patch)
treed0429cf0010784a685edce3a929f87e8deb61b48 /intl/l10nflist.c
parent3e219ad91a7ccc6632b948c5bab03694f3f6b25d (diff)
downloadlibrpm-tizen-5177464972a45db08785964718215c2a9ddd7179.tar.gz
librpm-tizen-5177464972a45db08785964718215c2a9ddd7179.tar.bz2
librpm-tizen-5177464972a45db08785964718215c2a9ddd7179.zip
Update included gettext routines to 0.10.38.
CVS patchset: 4911 CVS date: 2001/06/29 22:38:13
Diffstat (limited to 'intl/l10nflist.c')
-rw-r--r--intl/l10nflist.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/intl/l10nflist.c b/intl/l10nflist.c
index 9c7dc1836..557253eb9 100644
--- a/intl/l10nflist.c
+++ b/intl/l10nflist.c
@@ -1,5 +1,4 @@
-/* Handle list of needed message catalogs
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
This program is free software; you can redistribute it and/or modify
@@ -16,22 +15,18 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+/* Tell glibc's <string.h> to provide a prototype for stpcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-# endif
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
-# endif
-#endif
+#include <string.h>
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
@@ -43,10 +38,7 @@
#endif
#include <ctype.h>
#include <sys/types.h>
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
#include "loadinfo.h"
@@ -224,7 +216,7 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
/* Construct file name. */
memcpy (abs_filename, dirlist, dirlist_len);
- __argz_stringify (abs_filename, dirlist_len, ':');
+ __argz_stringify (abs_filename, dirlist_len, PATH_SEPARATOR);
cp = abs_filename + (dirlist_len - 1);
*cp++ = '/';
cp = stpcpy (cp, language);
@@ -349,10 +341,11 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
/* Normalize codeset name. There is no standard for the codeset
names. Normalization allows the user to use any of the common
- names. */
+ names. The return value is dynamically allocated and has to be
+ freed by the caller. */
const char *
_nl_normalize_codeset (codeset, name_len)
- const unsigned char *codeset;
+ const char *codeset;
size_t name_len;
{
int len = 0;