+2001-01-05 Bruno Haible <haible@clisp.cons.org>
+
+ * Makefile.in (INCLUDES): Remove reference to $(top_srcdir)/lib.
+ (.SUFFIXES): Put .c before .y, so that Solaris "make" uses the .c.o
+ rule, not the builtin .y.o rule.
+ (.y.c): Use $< instead of $^. $^ is not supported by SUSV2 "make"
+ specification. Remove $*.h explicitly: we don't need plural.h.
+ * gettextP.h: Include <stddef.h>.
+ (__gettext_free_exp, __gettextparse): Convert prototype to K&R C
+ syntax.
+ * bindtextdom.c (offsetof): Provide fallback for platforms that lack
+ it, like SunOS4.
+ (set_binding_values): Convert prototype to K&R C syntax.
+ * cat-compat.c: Include stdlib.h, string.h whenever possible.
+ * dcigettext.c: Ignore the value of C_ALLOCA, because libintl.a
+ must not depend on external .o files.
+ (offsetof): Provide fallback for platforms that lack it, like SunOS4.
+ (transcmp): Convert to K&R C syntax.
+ * explodename.c Include stdlib.h whenever possible.
+ (_nl_find_language): Convert to K&R C syntax.
+ * finddomain.c: Include stdlib.h whenever possible.
+ * l10nflist.c Include stdlib.h whenever possible.
+ (tolower): Conditional macro.
+ (_nl_normalize_codeset): Use tolower, not _tolower.
+ * loadmsgcat.c: Include stdlib.h whenever possible.
+ Include headers needed for alloca().
+ (freea): New macro.
+ (_nl_load_domain): Add fallback code for platforms lacking strtoul,
+ like SunOS4. Add fallback code for platforms lacking alloca.
+ * localealias.c: Include stdlib.h whenever possible.
+ (ADD_BLOCK, FREE_BLOCK): Remove macros.
+ (freea): New macro.
+ (read_alias_file): Simplify fallback code for platforms lacking alloca.
+ * plural.y (new_exp_0, new_exp_2, new_exp_3): New functions.
+ (new_exp): Remove function.
+ (__gettext_free_exp, yylex, yyerror): Convert to K&R C syntax.
+ * textdomain.c: Include stdlib.h whenever possible.
+ * gettext.c: Likewise.
+ * ngettext.c: Likewise.
+ * localcharset.c (volatile): Define to empty if not using ANSI C.
+
2001-01-01 Bruno Haible <haible@clisp.cons.org>
* Makefile.in (mostlyclean): Remove intlh.inst, charset.alias,
LTV_AGE=0
.SUFFIXES:
-.SUFFIXES: .y .c .o .lo .sin .sed
+.SUFFIXES: .c .y .o .lo .sin .sed
.c.o:
$(COMPILE) $<
.c.lo:
$(LIBTOOL) --mode=compile $(COMPILE) $<
.y.c:
- $(YACC) $(YFLAGS) --output $@ $^
+ $(YACC) $(YFLAGS) --output $@ $<
+ rm -f $*.h
.sin.sed:
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
mv t-$@ $@
-INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
+INCLUDES = -I.. -I. -I$(top_srcdir)/intl
all: all-@USE_INCLUDED_LIBINTL@
/* Implementation of the bindtextdomain(3) function
- Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# define _nl_domain_bindings _nl_domain_bindings__
#endif
+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
+#ifndef offsetof
+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
+#endif
+
/* @@ end of prolog @@ */
/* Contains the default location of the message catalogs. */
#endif
/* Prototypes for local functions. */
-static void set_binding_values (const char *domainname, const char **dirnamep,
- const char **codesetp);
+static void set_binding_values PARAMS ((const char *domainname,
+ const char **dirnamep,
+ const char **codesetp));
/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
to be used for the DOMAINNAME message catalog.
/* Compatibility code for gettext-using-catgets interface.
- Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
-#ifdef STDC_HEADERS
+#ifdef HAVE_STDLIB_H
# include <stdlib.h>
-# include <string.h>
#else
char *getenv ();
# ifdef HAVE_MALLOC_H
# endif
#endif
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+
#ifdef HAVE_NL_TYPES_H
# include <nl_types.h>
#endif
#include <sys/types.h>
-#if defined __GNUC__ && !defined C_ALLOCA
+#ifdef __GNUC__
# define alloca __builtin_alloca
# define HAVE_ALLOCA 1
#else
-# if (defined HAVE_ALLOCA_H || defined _LIBC) && !defined C_ALLOCA
+# if defined HAVE_ALLOCA_H || defined _LIBC
# include <alloca.h>
# else
# ifdef _AIX
# define _nl_domain_bindings _nl_domain_bindings__
#endif
+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
+#ifndef offsetof
+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
+#endif
+
/* @@ end of prolog @@ */
#ifdef _LIBC
/* Function to compare two entries in the table of known translations. */
static int
-transcmp (const void *p1, const void *p2)
+transcmp (p1, p2)
+ const void *p1;
+ const void *p2;
{
struct known_translation_t *s1 = (struct known_translation_t *) p1;
struct known_translation_t *s2 = (struct known_translation_t *) p2;
-/* Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1998, 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
# include <config.h>
#endif
-#if defined STDC_HEADERS || defined _LIBC
+#if defined HAVE_STDLIB_H || defined _LIBC
# include <stdlib.h>
#endif
/* @@ end of prolog @@ */
char *
-_nl_find_language (const char *name)
+_nl_find_language (name)
+ const char *name;
{
while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
&& name[0] != '+' && name[0] != ',')
/* Handle list of needed message catalogs
- Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
This program is free software; you can redistribute it and/or modify
#include <stdio.h>
#include <sys/types.h>
-#if defined STDC_HEADERS || defined _LIBC
+#if defined HAVE_STDLIB_H || defined _LIBC
# include <stdlib.h>
#else
# ifdef HAVE_MALLOC_H
/* Implementation of gettext(3) function.
- Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# define __need_NULL
# include <stddef.h>
#else
-# ifdef STDC_HEADERS
+# ifdef HAVE_STDLIB_H
# include <stdlib.h> /* Just for NULL. */
# else
# ifdef HAVE_STRING_H
/* Header describing internals of gettext library
- Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
This program is free software; you can redistribute it and/or modify
#ifndef _GETTEXTP_H
#define _GETTEXTP_H
+#if defined HAVE_STDDEF_H || defined _LIBC
+# include <stddef.h> /* Get size_t. */
+#endif
+
#ifdef _LIBC
# include "../iconv/gconv_int.h"
#else
#endif
extern int __gettextdebug;
-extern void __gettext_free_exp (struct expression *exp) internal_function;
-extern int __gettextparse (void *arg);
+extern void __gettext_free_exp PARAMS ((struct expression *exp))
+ internal_function;
+extern int __gettextparse PARAMS ((void *arg));
/* @@ begin of epilog @@ */
-/* Copyright (C) 1995-1999, 2000 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
#include <ctype.h>
#include <sys/types.h>
-#if defined STDC_HEADERS || defined _LIBC
+#if defined HAVE_STDLIB_H || defined _LIBC
# include <stdlib.h>
#endif
/* @@ end of prolog @@ */
+#ifdef _LIBC
+/* Use more efficient version of <ctype.h> function. */
+# define tolower _tolower
+#endif
+
#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
for (cnt = 0; cnt < name_len; ++cnt)
if (isalpha (codeset[cnt]))
- *wp++ = _tolower (codeset[cnt]);
+ *wp++ = tolower (codeset[cnt]);
else if (isdigit (codeset[cnt]))
*wp++ = codeset[cnt];
/* Load needed message catalogs.
- Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/types.h>
#include <sys/stat.h>
-#if defined STDC_HEADERS || defined _LIBC
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+#endif
+
+#if defined HAVE_STDLIB_H || defined _LIBC
# include <stdlib.h>
#endif
# define munmap __munmap
#endif
+/* For those losing systems which don't have `alloca' we have to add
+ some additional code emulating it. */
+#ifdef HAVE_ALLOCA
+# define freea(p) /* nothing */
+#else
+# define alloca(n) malloc (n)
+# define freea(p) free (p)
+#endif
+
/* We need a sign, whether a new catalog was loaded, which can be associated
with all translations. This is important if the translations are
cached by one of GCC's features. */
domain->conv = iconv_open (outcharset, charset);
# endif
# endif
+
+ freea (charset);
}
#endif /* _LIBC || HAVE_ICONV */
}
{
/* First get the number. */
char *endp;
+ unsigned long int n;
struct parse_args args;
nplurals += 9;
while (*nplurals != '\0' && isspace (*nplurals))
++nplurals;
- domain->nplurals = strtoul (nplurals, &endp, 10);
+#ifdef HAVE_STRTOUL
+ n = strtoul (nplurals, &endp, 10);
+#else
+ for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
+ n = n * 10 + (*endp - '0');
+#endif
+ domain->nplurals = n;
if (nplurals == endp)
goto no_plural;
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
'charset_aliases' simultaneously, both will produce the same value,
and everything will be ok if the two assignments to 'charset_aliases'
are atomic. But I don't know what will happen if the two assignments mix. */
+#if __STDC__ != 1
+# define volatile /* empty */
+#endif
/* Pointer to the contents of the charset.alias file, if it has already been
read, else NULL. Its format is:
ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
/* Handle aliases for locale names.
- Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# endif
#endif
-#if defined STDC_HEADERS || defined _LIBC
+#if defined HAVE_STDLIB_H || defined _LIBC
# include <stdlib.h>
#else
char *getenv ();
# define internal_function
#endif
-/* For those loosing systems which don't have `alloca' we have to add
+/* For those losing systems which don't have `alloca' we have to add
some additional code emulating it. */
#ifdef HAVE_ALLOCA
-/* Nothing has to be done. */
-# define ADD_BLOCK(list, address) /* nothing */
-# define FREE_BLOCKS(list) /* nothing */
+# define freea(p) /* nothing */
#else
-struct block_list
-{
- void *address;
- struct block_list *next;
-};
-# define ADD_BLOCK(list, addr) \
- do { \
- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
- /* If we cannot get a free block we cannot add the new element to \
- the list. */ \
- if (newp != NULL) { \
- newp->address = (addr); \
- newp->next = (list); \
- (list) = newp; \
- } \
- } while (0)
-# define FREE_BLOCKS(list) \
- do { \
- while (list != NULL) { \
- struct block_list *old = list; \
- list = list->next; \
- free (old); \
- } \
- } while (0)
-# undef alloca
-# define alloca(size) (malloc (size))
-#endif /* have alloca */
+# define alloca(n) malloc (n)
+# define freea(p) free (p)
+#endif
#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
# undef fgets
const char *fname;
int fname_len;
{
-#ifndef HAVE_ALLOCA
- struct block_list *block_list = NULL;
-#endif
FILE *fp;
char *full_fname;
size_t added;
static const char aliasfile[] = "/locale.alias";
full_fname = (char *) alloca (fname_len + sizeof aliasfile);
- ADD_BLOCK (block_list, full_fname);
#ifdef HAVE_MEMPCPY
mempcpy (mempcpy (full_fname, fname, fname_len),
aliasfile, sizeof aliasfile);
#endif
fp = fopen (full_fname, "r");
+ freea (full_fname);
if (fp == NULL)
- {
- FREE_BLOCKS (block_list);
- return 0;
- }
+ return 0;
added = 0;
while (!feof (fp))
if (nmap >= maxmap)
if (__builtin_expect (extend_alias_table (), 0))
- {
- FREE_BLOCKS (block_list);
- return added;
- }
+ return added;
alias_len = strlen (alias) + 1;
value_len = strlen (value) + 1;
? alias_len + value_len : 1024));
char *new_pool = (char *) realloc (string_space, new_size);
if (new_pool == NULL)
- {
- FREE_BLOCKS (block_list);
- return added;
- }
+ return added;
if (__builtin_expect (string_space != new_pool, 0))
{
qsort (map, nmap, sizeof (struct alias_map),
(int (*) PARAMS ((const void *, const void *))) alias_compare);
- FREE_BLOCKS (block_list);
return added;
}
/* Implementation of ngettext(3) function.
- Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# define __need_NULL
# include <stddef.h>
#else
-# ifdef STDC_HEADERS
+# ifdef HAVE_STDLIB_H
# include <stdlib.h> /* Just for NULL. */
# else
# ifdef HAVE_STRING_H
%{
/* Expression parsing for plural form selection.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
This program is free software; you can redistribute it and/or modify
# include <config.h>
#endif
-#include <stdarg.h>
#include <stdlib.h>
#include "gettext.h"
#include "gettextP.h"
%{
/* Prototypes for local functions. */
-static struct expression *new_exp (enum operator op, int n, ...);
-static int yylex (YYSTYPE *lval, const char **pexp);
-static void yyerror (const char *str);
+static struct expression *new_exp_0 PARAMS ((enum operator op));
+static struct expression *new_exp_2 PARAMS ((enum operator op,
+ struct expression *left,
+ struct expression *right));
+static struct expression *new_exp_3 PARAMS ((enum operator op,
+ struct expression *bexp,
+ struct expression *tbranch,
+ struct expression *fbranch));
+static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
+static void yyerror PARAMS ((const char *str));
%}
%left '?'
exp: exp '?' exp ':' exp
{
- if (($$ = new_exp (qmop, 3, $1, $3, $5)) == NULL)
+ if (($$ = new_exp_3 (qmop, $1, $3, $5)) == NULL)
YYABORT
}
| exp '|' exp
{
- if (($$ = new_exp (lor, 2, $1, $3)) == NULL)
+ if (($$ = new_exp_2 (lor, $1, $3)) == NULL)
YYABORT
}
| exp '&' exp
{
- if (($$ = new_exp (land, 2, $1, $3)) == NULL)
+ if (($$ = new_exp_2 (land, $1, $3)) == NULL)
YYABORT
}
| exp '=' exp
{
- if (($$ = new_exp (equal, 2, $1, $3)) == NULL)
+ if (($$ = new_exp_2 (equal, $1, $3)) == NULL)
YYABORT
}
| exp '!' exp
{
- if (($$ = new_exp (not_equal, 2, $1, $3)) == NULL)
+ if (($$ = new_exp_2 (not_equal, $1, $3)) == NULL)
YYABORT
}
| exp '+' exp
{
- if (($$ = new_exp (plus, 2, $1, $3)) == NULL)
+ if (($$ = new_exp_2 (plus, $1, $3)) == NULL)
YYABORT
}
| exp '-' exp
{
- if (($$ = new_exp (minus, 2, $1, $3)) == NULL)
+ if (($$ = new_exp_2 (minus, $1, $3)) == NULL)
YYABORT
}
| exp '*' exp
{
- if (($$ = new_exp (mult, 2, $1, $3)) == NULL)
+ if (($$ = new_exp_2 (mult, $1, $3)) == NULL)
YYABORT
}
| exp '/' exp
{
- if (($$ = new_exp (divide, 2, $1, $3)) == NULL)
+ if (($$ = new_exp_2 (divide, $1, $3)) == NULL)
YYABORT
}
| exp '%' exp
{
- if (($$ = new_exp (module, 2, $1, $3)) == NULL)
+ if (($$ = new_exp_2 (module, $1, $3)) == NULL)
YYABORT
}
| 'n'
{
- if (($$ = new_exp (var, 0)) == NULL)
+ if (($$ = new_exp_0 (var)) == NULL)
YYABORT
}
| NUMBER
{
- if (($$ = new_exp (num, 0)) == NULL)
+ if (($$ = new_exp_0 (num)) == NULL)
YYABORT;
$$->val.num = $1
}
%%
static struct expression *
-new_exp (enum operator op, int n, ...)
+new_exp_0 (op)
+ enum operator op;
{
- struct expression *newp = (struct expression *) calloc (1, sizeof (*newp));
- va_list va;
+ struct expression *newp = (struct expression *) malloc (sizeof (*newp));
- va_start (va, n);
+ if (newp != NULL)
+ newp->operation = op;
- if (newp == NULL)
- while (n-- > 0)
- __gettext_free_exp (va_arg (va, struct expression *));
- else
+ return newp;
+}
+
+static struct expression *
+new_exp_2 (op, left, right)
+ enum operator op;
+ struct expression *left;
+ struct expression *right;
+{
+ struct expression *newp = NULL;
+
+ if (left != NULL && right != NULL)
+ newp = (struct expression *) malloc (sizeof (*newp));
+
+ if (newp != NULL)
{
newp->operation = op;
- if (n > 0)
- {
- newp->val.args3.bexp = va_arg (va, struct expression *);
- newp->val.args3.tbranch = va_arg (va, struct expression *);
-
- if (n > 2)
- newp->val.args3.fbranch = va_arg (va, struct expression *);
-
- if (newp->val.args3.bexp == NULL
- || newp->val.args3.tbranch == NULL
- || (n > 2 && newp->val.args3.fbranch == NULL))
- {
- __gettext_free_exp (newp);
- newp = NULL;
- }
- }
+ newp->val.args2.left = left;
+ newp->val.args2.right = right;
+ }
+ else
+ {
+ __gettext_free_exp (left);
+ __gettext_free_exp (right);
}
- va_end (va);
+ return newp;
+}
+
+static struct expression *
+new_exp_3 (op, bexp, tbranch, fbranch)
+ enum operator op;
+ struct expression *bexp;
+ struct expression *tbranch;
+ struct expression *fbranch;
+{
+ struct expression *newp = NULL;
+
+ if (bexp != NULL && tbranch != NULL && fbranch != NULL)
+ newp = (struct expression *) malloc (sizeof (*newp));
+
+ if (newp != NULL)
+ {
+ newp->operation = op;
+ newp->val.args3.bexp = bexp;
+ newp->val.args3.tbranch = tbranch;
+ newp->val.args3.fbranch = fbranch;
+ }
+ else
+ {
+ __gettext_free_exp (bexp);
+ __gettext_free_exp (tbranch);
+ __gettext_free_exp (fbranch);
+ }
return newp;
}
void
internal_function
-__gettext_free_exp (struct expression *exp)
+__gettext_free_exp (exp)
+ struct expression *exp;
{
if (exp == NULL)
return;
static int
-yylex (YYSTYPE *lval, const char **pexp)
+yylex (lval, pexp)
+ YYSTYPE *lval;
+ const char **pexp;
{
const char *exp = *pexp;
int result;
static void
-yyerror (const char *str)
+yyerror (str)
+ const char *str;
{
/* Do nothing. We don't print error messages here. */
}
/* Implementation of the textdomain(3) function.
- Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# include <config.h>
#endif
-#if defined STDC_HEADERS || defined _LIBC
+#if defined HAVE_STDLIB_H || defined _LIBC
# include <stdlib.h>
#endif
-#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
+#if defined HAVE_STRING_H || defined _LIBC
# include <string.h>
#else
# include <strings.h>
+2001-01-05 Bruno Haible <haible@clisp.cons.org>
+
+ * basename.c: Include <stdio.h>, needed by assert on SunOS4.
+ (basename): Convert to K&R C syntax.
+ * vasprintf.c (int_vasprintf): Don't use fabs, it needs -lm on some
+ platforms.
+
2000-12-31 Bruno Haible <haible@clisp.cons.org>
* hash.c (insert_entry): Use obstack_copy instead of obstack_copy0.
/* Return the name-within-directory of a file name.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
# include <config.h>
#endif
+#include <stdio.h>
#include <assert.h>
#ifndef FILESYSTEM_PREFIX_LEN
If NAME is all slashes, be sure to return `/'. */
char *
-basename (char const *name)
+basename (name)
+ char const *name;
{
char const *base = name += FILESYSTEM_PREFIX_LEN (name);
int all_slashes = 1;
/* Like vsprintf but provides a pointer to malloc'd storage, which must
be freed by the caller.
- Copyright (C) 1994, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
(void) va_arg (ap, int);
break;
case 'f':
- if (fabs (va_arg (ap, double)) >= 1.0)
- /* Since an ieee double can have an exponent of 307, we'll
- make the buffer wide enough to cover the gross case. */
- total_width += 307;
+ {
+ double arg = va_arg (ap, double);
+ if (arg >= 1.0 || arg <= -1.0)
+ /* Since an ieee double can have an exponent of 307, we'll
+ make the buffer wide enough to cover the gross case. */
+ total_width += 307;
+ }
break;
case 'e':
case 'E':
+2001-01-04 Bruno Haible <haible@clisp.cons.org>
+
+ * Makefile.in.in (install-data-yes): Fix syntax error with "@".
+
2000-12-31 Bruno Haible <haible@clisp.cons.org>
* da.po: Change charset from ISO-Latin-1 to ISO-8859-1.
# Makefile for program source directory in GNU NLS utilities package.
-# Copyright (C) 1995, 1996, 1997, 2000 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
- $(mkinstalldirs) $(DESTDIR)$(datadir); \
+ $(mkinstalldirs) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
+2001-01-05 Bruno Haible <haible@clisp.cons.org>
+
+ * Makefile.am (po-gram-gen.h): Don't use $^, not supported by the
+ SUSV2 "make" specification.
+ (LDADD): Add @INTLLIBS@. Needed on Solaris without
+ --with-included-gettext.
+ * po-lex.c (gram_max_allowed_errors): Change type to
+ 'unsigned int'.
+
2001-01-01 Bruno Haible <haible@clisp.cons.org>
Implement plural form handling.
## Makefile for program src directory in GNU NLS utilities package.
-## Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+## Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/lib -I../intl \
-I$(top_srcdir)/intl
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
-LDADD = ../lib/libnlsut.a ../intl/libintl.$la
+LDADD = ../lib/libnlsut.a @INTLLIBS@ ../intl/libintl.$la
SED = sed
YACC = @YACC@ -d
po-lex.o: po-gram-gen2.h
po-gram-gen2.h: po-gram-gen.h
- $(SED) 's/[yY][yY]/po_gram_/g' $^ > $@-tmp
+ $(SED) 's/[yY][yY]/po_gram_/g' $(srcdir)/po-gram-gen.h > $@-tmp
mv $@-tmp $@
DISTCLEANFILES = po-gram-gen2.h
/* GNU gettext - internationalization aids
- Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
static FILE *fp;
lex_pos_ty gram_pos;
-size_t gram_max_allowed_errors = 20;
+unsigned int gram_max_allowed_errors = 20;
static int pass_comments = 0;
static int pass_obsolete_entries = 0;
+2001-01-04 Bruno Haible <haible@clisp.cons.org>
+
+ * plural-1-prg.c: Include config.h. Needed for C compilers lacking
+ "const", like SunOS4 cc.
+
2001-01-01 Bruno Haible <haible@clisp.cons.org>
Implement plural form handling.
+/* Test program, used by the plural-1 test. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <stdlib.h>
#include <stdio.h>