#include "alloc.h"
#include "error.h"
#include "filename.h"
+#include "getline.h"
#include "hash.h"
#include "pool.h"
#include "str.h"
#include "version.h"
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
int font_number_to_index (int);
int space_index;
static int
font_msg (int class, const char *format,...)
{
+ struct error error;
va_list args;
+ error.class = class;
+ err_location (&error.where);
+ error.title = _("installation error: Groff font error: ");
+
va_start (args, format);
- tmsg (class, format, args, _("installation error: Groff font error: "));
+ err_vmsg (&error, format, args);
va_end (args);
return 0;
static void
scan_badchars (char *line, int len)
{
- unsigned char *cp = line;
+ char *cp = line;
/* Same bad characters as Groff. */
static unsigned char badchars[32] =
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
- for (; len--; cp++)
- if (badchars[*cp >> 3] & (1 << (*cp & 7)))
- {
- font_msg (SE, _("Bad character \\%3o."), *cp);
- *cp = ' ';
- }
+ for (; len--; cp++)
+ {
+ int c = (unsigned char) *cp;
+ if (badchars[c >> 3] & (1 << (c & 7)))
+ {
+ font_msg (SE, _("Bad character \\%3o."), *cp);
+ *cp = ' ';
+ }
+ }
}
\f
/* Character name hashing. */