summaryrefslogtreecommitdiff
path: root/Build/source/utils/t1utils/t1disasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/t1utils/t1disasm.c')
-rw-r--r--Build/source/utils/t1utils/t1disasm.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/Build/source/utils/t1utils/t1disasm.c b/Build/source/utils/t1utils/t1disasm.c
index 21dc659cb01..39fc977669f 100644
--- a/Build/source/utils/t1utils/t1disasm.c
+++ b/Build/source/utils/t1utils/t1disasm.c
@@ -84,8 +84,7 @@ static uint16_t cr_default = 4330;
static uint16_t er_default = 55665;
static int error_count = 0;
-void fatal_error(const char *message, ...);
-void error(const char *message, ...);
+
/* If the line contains an entry of the form `/lenIV <num>' then set the global
lenIV to <num>. This indicates the number of random bytes at the beginning
@@ -313,7 +312,7 @@ static int save_len = 0;
static int save_cap = 0;
static void
-append_save(unsigned char *line, int len)
+append_save(const unsigned char *line, int len)
{
if (save_len + len >= save_cap) {
unsigned char *new_save;
@@ -333,11 +332,11 @@ append_save(unsigned char *line, int len)
/* 23.Feb.2004 - use 'memstr', not strstr, because the strings input to
eexec_line aren't null terminated! Reported by Werner Lemberg. */
-static const char *
-oog_memstr(const char *line, int line_len, const char *pattern, int pattern_len)
+static const unsigned char *
+oog_memstr(const unsigned char *line, int line_len, const char *pattern, int pattern_len)
{
- const char *try;
- const char *last = line + line_len - pattern_len + 1;
+ const unsigned char *try;
+ const unsigned char *last = line + line_len - pattern_len + 1;
while (line < last
&& (try = memchr(line, (unsigned char)*pattern, last - line))) {
if (memcmp(try, pattern, pattern_len) == 0)
@@ -433,7 +432,8 @@ eexec_line(unsigned char *line, int line_len)
badly: a charstring definition follows "/Charstrings ... begin", ON THE
SAME LINE. */
{
- const char *CharStrings = oog_memstr(line, line_len, "/CharStrings ", 13);
+ const char *CharStrings = (const char *)
+ oog_memstr(line, line_len, "/CharStrings ", 13);
int crap, n;
char should_be_slash = 0;
if (CharStrings
@@ -479,8 +479,10 @@ disasm_output_ascii(char *line, int len)
in_eexec = 0;
/* if we came from a binary section, we need to process that too */
- if (was_in_eexec > 0)
- eexec_line("", 0);
+ if (was_in_eexec > 0) {
+ unsigned char zero = 0;
+ eexec_line(&zero, 0);
+ }
/* if we just came from the "ASCII part" of an eexec section, we need to
process the saved lines */