X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=intl%2Fl10nflist.c;h=557253eb985164c1b022a9c0c2cb447e368c2ecf;hb=7496e03686af078c207382bed94e2a2d1c350da7;hp=9c7dc18360ff7901da699b99f6d8dc7a53d3e992;hpb=65ae367d30cd63a5a0b277c08ff9744e9dd1db44;p=gedcom-parse.git diff --git a/intl/l10nflist.c b/intl/l10nflist.c index 9c7dc18..557253e 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 , 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 to provide a prototype for stpcpy(). + This must come before because may include + , and once has been included, it's too late. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + #ifdef HAVE_CONFIG_H # include #endif - -#if defined HAVE_STRING_H || defined _LIBC -# ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -# endif -# include -#else -# include -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) -# endif -#endif +#include #if !HAVE_STRCHR && !defined _LIBC # ifndef strchr # define strchr index @@ -43,10 +38,7 @@ #endif #include #include - -#if defined STDC_HEADERS || defined _LIBC -# include -#endif +#include #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;