char id[NCPS];
struct sym *sp;
struct tsym *tp;
- int r, v;
+ int r = 0, v;
c = getnb();
/*
if (ctype[c] & DIGIT) {
esp->e_mode = S_USER;
jp = ip;
- while (ctype[*jp] & RAD10) {
+ while (ctype[(unsigned char)(*jp)] & RAD10) {
jp++;
}
if (*jp == '$') {
if (*p1++ != *p2++)
return (0);
#else
- if (ccase[*p1++] != ccase[*p2++])
+ if (ccase[(unsigned char)(*p1++)] != ccase[(unsigned char)(*p2++)])
return (0);
#endif
#if CASE_SENSITIVE
h += *p++;
#else
- h += ccase[*p++];
+ h += ccase[(unsigned char)(*p++)];
#endif
} while (--n);
addr(esp)
register struct expr *esp;
{
- register int c, mode, indx;
+ register int c, mode = 0, indx;
if ((c = getnb()) == '#') {
expr(esp, 0);
esp->e_mode = S_INDM;
}
if (indx) {
- esp->e_mode = mode + indx&0xFF;
+ esp->e_mode = (mode + indx)&0xFF;
esp->e_base.e_ap = NULL;
}
if ((c = getnb()) != RTIND)
}
#else
while (*ptr && *str) {
- if (ccase[*ptr] != ccase[*str])
+ if (ccase[(unsigned char)(*ptr)] != ccase[(unsigned char)(*str)])
break;
ptr++;
str++;
}
- if (ccase[*ptr] == ccase[*str]) {
+ if (ccase[(unsigned char)(*ptr)] == ccase[(unsigned char)(*str)]) {
ip = ptr;
return(1);
}
clean:
$(MAKE) -C z80 clean
-
# dummy install target to prevent warnings
install:
/*
* File types
*/
+#define F_INV 0 /* invalid */
#define F_STD 1 /* stdin */
#define F_LNK 2 /* File.lnk */
#define F_REL 3 /* File.rel */
/* lkihx.c */
extern VOID ihx();
+
+/* lkgb.h */
+VOID gb(int in);
+VOID gg(int in);
+
return(symval(sp));
}
}
+ /* Shouldn't get here. */
+ return 0;
}
/*)Function int digit(c, r)
register struct areax *oxp;
register int i, j;
int nmsym;
- Addr_T a0, ai, aj;
+ Addr_T a0, ai = 0, aj = 0;
struct sym *sp;
struct sym **p;
int i;
for (i=0; i<n; i++) {
- if ((ctype[*str++] & rdx) == 0)
+ if ((ctype[(unsigned char)(*str++)] & rdx) == 0)
return(0);
}
return(1);
#include <string.h>
//#include <alloc.h>
#include "aslink.h"
+#include <stdlib.h>
#ifndef SDK_VERSION_STRING
#define SDK_VERSION_STRING "3.0.0"
}
}
}
- if (startp->f_type == NULL)
+ if (startp->f_type == F_INV)
usage();
if (startp->f_type == F_LNK && startp->f_idp == NULL)
usage();
break;
if (pflag && sfp != stdin)
fprintf(stdout, "%s\n", ip);
- if (*ip == NULL || parse())
+ if (*ip == '\0' || parse())
break;
}
if (sfp)
}
}
lkexit(lkerr);
+
+ /* Never get here. */
+ return 0;
}
/*)Function VOID lkexit(i)
#endif /* MLH_MAP */
#ifdef SDK
+/* PENDING */
+VOID lstareatosym(struct area *xp);
+
VOID sym()
{
/*
while(get() != '"')
;
} else if(c == 'P' || c == 'p') {
- unsigned int addr;
- unsigned char value;
patch *p = patches;
patches = (patch *)malloc(sizeof(patch));
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
//#include <alloc.h>
+#include <ctype.h>
#include "aslink.h"
/*)Module lkrloc.c
register int mode;
register Addr_T reli, relv;
int aindex, rindex, rtp, error;
- Addr_T r, rtbase, rtofst, paga, pags, pc;
+ Addr_T r, rtbase, rtofst, paga = 0, pags = 0, pc;
struct areax **a;
struct sym **s;
}
fprintf(stderr, "Header symbol list overflow\n");
lkexit(1);
+
/* Never reached */
+ return 0;
}
/*)Function sym * lkpsym(id,f)
if (*p1++ != *p2++)
return (0);
#else
- if (ccase[*p1++] != ccase[*p2++])
+ if (ccase[(unsigned char)(*p1++)] != ccase[(unsigned char)(*p2++)])
return (0);
#endif
#if CASE_SENSITIVE
h += *p++;
#else
- h += ccase[*p++];
+ h += ccase[(unsigned char)(*p++)];
#endif
} while (--n);