libintl.
+2001-01-07 Bruno Haible <haible@clisp.cons.org>
+
+ * gettextP.h (__gettextdebug): Remove declaration.
+ (gettext_free_exp__, gettextparse__): New non-libc declarations.
+ * plural.y [!_LIBC]: Define gettextparse__, gettext_free_exp__, not
+ __gettextparse, __gettext_free_exp.
+ * loadmsgcat.c [!_LIBC]: Use gettextparse__, not __gettextparse.
+
2001-01-07 Bruno Haible <haible@clisp.cons.org>
* libgnuintl.h: Renamed from intlh.inst.in.
const char *__codeset));
#endif
-extern int __gettextdebug;
+#ifdef _LIBC
extern void __gettext_free_exp PARAMS ((struct expression *exp))
internal_function;
extern int __gettextparse PARAMS ((void *arg));
+#else
+extern void gettext_free_exp__ PARAMS ((struct expression *exp))
+ internal_function;
+extern int gettextparse__ PARAMS ((void *arg));
+#endif
/* @@ begin of epilog @@ */
# define munmap __munmap
#endif
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define PLURAL_PARSE __gettextparse
+#else
+# define PLURAL_PARSE gettextparse__
+#endif
+
/* For those losing systems which don't have `alloca' we have to add
some additional code emulating it. */
#ifdef HAVE_ALLOCA
is passed down to the parser. */
plural += 7;
args.cp = plural;
- if (__gettextparse (&args) != 0)
+ if (PLURAL_PARSE (&args) != 0)
goto no_plural;
domain->plural = args.res;
}
#include <stdlib.h>
#include "gettextP.h"
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define FREE_EXPRESSION __gettext_free_exp
+#else
+# define FREE_EXPRESSION gettext_free_exp__
+# define __gettextparse gettextparse__
+#endif
+
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
#define YYPARSE_PARAM arg
%}
}
else
{
- __gettext_free_exp (left);
- __gettext_free_exp (right);
+ FREE_EXPRESSION (left);
+ FREE_EXPRESSION (right);
}
return newp;
}
else
{
- __gettext_free_exp (bexp);
- __gettext_free_exp (tbranch);
- __gettext_free_exp (fbranch);
+ FREE_EXPRESSION (bexp);
+ FREE_EXPRESSION (tbranch);
+ FREE_EXPRESSION (fbranch);
}
return newp;
void
internal_function
-__gettext_free_exp (exp)
+FREE_EXPRESSION (exp)
struct expression *exp;
{
if (exp == NULL)
switch (exp->operation)
{
case qmop:
- __gettext_free_exp (exp->val.args3.fbranch);
+ FREE_EXPRESSION (exp->val.args3.fbranch);
/* FALLTHROUGH */
case mult:
case not_equal:
case land:
case lor:
- __gettext_free_exp (exp->val.args2.right);
- __gettext_free_exp (exp->val.args2.left);
+ FREE_EXPRESSION (exp->val.args2.right);
+ FREE_EXPRESSION (exp->val.args2.left);
break;
default: