#include <stdio.h>
#include <setjmp.h>
#include <string.h>
-#include <alloc.h>
+
#include "asm.h"
/*)Module asexpr.c
*
* asexpr.c contains the following functions:
* VOID abscheck()
- * addr_t absexpr()
+ * Addr_T absexpr()
* VOID clrexpr()
* int digit()
* VOID expr()
register struct expr *esp;
int n;
{
- register int c, d, p;
+ register int c, p;
struct area *ap;
struct expr re;
unget(c);
}
-/*)Function addr_t absexpr()
+/*)Function Addr_T absexpr()
*
* The function absexpr() evaluates an expression, verifies it
* is absolute (i.e. not position dependent or relocatable), and
* a 'r' error is reported.
*/
-addr_t
+Addr_T
absexpr()
{
struct expr e;
char id[NCPS];
struct sym *sp;
struct tsym *tp;
- int r, v;
+ int r = 0, v;
c = getnb();
/*
if (c == '-') {
expr(esp, 100);
abscheck(esp);
- esp->e_addr = -esp->e_addr;
+ esp->e_addr = 0 - esp->e_addr;
return;
}
if (c == '~') {
if (ctype[c] & DIGIT) {
esp->e_mode = S_USER;
jp = ip;
- while (ctype[*jp] & RAD10) {
+ while (ctype[(unsigned char)(*jp)] & RAD10) {
jp++;
}
if (*jp == '$') {