Modified for Solaris 2

This commit is contained in:
ceriel
1993-11-10 12:57:16 +00:00
parent 964bf270ab
commit 91d270eb90
10 changed files with 130 additions and 38 deletions

View File

@@ -2,13 +2,12 @@
#include <stdio.h>
#include <assert.h>
#include <alloc.h>
#include "mach.h"
#ifdef __STDC__
#include <stdlib.h>
#include <string.h>
#else
extern char *malloc();
extern char *strcpy();
#endif
@@ -108,6 +107,12 @@ static struct cache_elt cache[CACHE_SIZE], *tos = 0;
static int c_count = 0;
static const_str_t s;
_PROTOTYPE(static void panic, (char*));
_PROTOTYPE(static void dump_cache, (File *stream));
_PROTOTYPE(static int cache_read, (int n, int i));
_PROTOTYPE(static void flush_part_cache, (int c, int r, int f, int d));
_PROTOTYPE(static void subst_reg, (reg_t, reg_t));
static void panic(s)
char *s;
{
@@ -824,8 +829,7 @@ char *s;
char *p;
enter("push_ext");
p = malloc(strlen(s)+1);
assert(p);
p = Malloc(strlen(s)+1);
INC_TOS;
tos->reg = reg_g0;
@@ -1282,7 +1286,7 @@ enter("dup_tos");
*tos = tos[-n];
if (tos->ext)
{
ext= malloc(strlen(tos->ext)+1);
ext= Malloc(strlen(tos->ext)+1);
strcpy(ext, tos->ext);
tos->ext= ext;
}