+2001-10-29 Zack Weinberg <zack@codesourcery.com>
+
+ * tradcpp.c: Include intl.h. Rename WARNING, ERROR, FATAL to
+ MT_WARNING, MT_ERROR, MT_FATAL.
+ (main): Call gcc_init_libintl.
+ (v_message): Call gettext on msgid and "warning: "
+ * tradcif.y: Include intl.h.
+ (yyerror): Make parameter definition consistent with
+ prototype. Call gettext on msgid argument.
+
2001-10-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* combine.c (num_sign_bit_copies): Avoid signed/unsigned
#include "cppdefault.h"
#include "tradcpp.h"
#include "mkdeps.h"
+#include "intl.h"
typedef unsigned char U_CHAR;
static void delete_macro PARAMS ((HASHNODE *));
/* First arg to v_message. */
-enum msgtype { WARNING = 0, ERROR, FATAL };
+enum msgtype { MT_WARNING = 0, MT_ERROR, MT_FATAL };
static void v_message PARAMS ((enum msgtype mtype, int line,
const char *msgid, va_list ap))
ATTRIBUTE_PRINTF (3, 0);
max_include_len = cpp_GCC_INCLUDE_DIR_len + 7; /* ??? */
+ gcc_init_libintl ();
+
/* It's simplest to just create this struct whether or not it will
be needed. */
deps = deps_init ();
const char *fname = 0;
int i;
- if (mtype == WARNING && inhibit_warnings)
+ if (mtype == MT_WARNING && inhibit_warnings)
return;
for (i = indepth; i >= 0; i--)
else
fprintf (stderr, "%s: ", progname);
- if (mtype == WARNING)
- fputs ("warning: ", stderr);
+ if (mtype == MT_WARNING)
+ fputs (_("warning: "), stderr);
- vfprintf (stderr, msgid, ap);
+ vfprintf (stderr, _(msgid), ap);
putc ('\n', stderr);
- if (mtype == ERROR)
+ if (mtype == MT_ERROR)
errors++;
}
VA_OPEN(ap, msgid);
VA_FIXEDARG (ap, const char *, msgid);
- v_message (ERROR, 0, msgid, ap);
+ v_message (MT_ERROR, 0, msgid, ap);
VA_CLOSE (ap);
}
VA_FIXEDARG (ap, int, line);
VA_FIXEDARG (ap, const char *, msgid);
- v_message (ERROR, line, msgid, ap);
+ v_message (MT_ERROR, line, msgid, ap);
VA_CLOSE (ap);
}
VA_OPEN(ap, msgid);
VA_FIXEDARG (ap, const char *, msgid);
- v_message (WARNING, 0, msgid, ap);
+ v_message (MT_WARNING, 0, msgid, ap);
VA_CLOSE (ap);
}
VA_OPEN(ap, msgid);
VA_FIXEDARG (ap, const char *, msgid);
- v_message (FATAL, 0, msgid, ap);
+ v_message (MT_FATAL, 0, msgid, ap);
VA_CLOSE (ap);
exit (FATAL_EXIT_CODE);
}