projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed some unnecessary #include directives
[pspp]
/
src
/
groff-font.c
diff --git
a/src/groff-font.c
b/src/groff-font.c
index 9427089d3009f330e1e5997a6c59aab56583862e..e5811ef40de411a824d048d2d77b6a030e969f66 100644
(file)
--- a/
src/groff-font.c
+++ b/
src/groff-font.c
@@
-28,11
+28,15
@@
#include "alloc.h"
#include "error.h"
#include "filename.h"
#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 "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;
int font_number_to_index (int);
int space_index;
@@
-388,10
+392,15
@@
lose:
static int
font_msg (int class, const char *format,...)
{
static int
font_msg (int class, const char *format,...)
{
+ struct error error;
va_list args;
va_list args;
+ error.class = class;
+ err_location (&error.where);
+ error.title = _("installation error: Groff font error: ");
+
va_start (args, format);
va_start (args, format);
-
tmsg (class, format, args, _("installation error: Groff font error: ")
);
+
err_vmsg (&error, format, args
);
va_end (args);
return 0;
va_end (args);
return 0;
@@
-402,7
+411,7
@@
font_msg (int class, const char *format,...)
static void
scan_badchars (char *line, int len)
{
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] =
/* Same bad characters as Groff. */
static unsigned char badchars[32] =
@@
-413,12
+422,15
@@
scan_badchars (char *line, int len)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
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. */
}
\f
/* Character name hashing. */