(uxnasm) Removed unused buffer

This commit is contained in:
Devine Lu Linvega 2024-03-27 12:05:19 -07:00
parent f50e915e42
commit 4713261184
1 changed files with 35 additions and 35 deletions

View File

@ -112,11 +112,45 @@ walkcomment(FILE *f)
return 0; return 0;
} }
static int
walkmacro(Item *m)
{
char c, *contentptr = m->content, *cptr = token;
while((c = *contentptr++)) {
if(c < 0x21) {
*cptr++ = 0x00;
if(token[0] && !parse(token, NULL)) return 0;
cptr = token;
} else
*cptr++ = c;
}
return 1;
}
static int
walkfile(FILE *f)
{
char c, *cptr = token;
while(fread(&c, 1, 1, f)) {
if(c == 0xa) line++;
if(c < 0x21) {
*cptr++ = 0x00;
if(token[0] && !parse(token, f))
return 0;
cptr = token;
} else if(cptr - token < 0x3f)
*cptr++ = c;
else
return error_asm("Token too long");
}
return 1;
}
static int static int
makemacro(char *name, FILE *f) makemacro(char *name, FILE *f)
{ {
Item *m; Item *m;
char c, word[0x40]; char c;
if(!slen(name)) return error_asm("Macro is empty"); if(!slen(name)) return error_asm("Macro is empty");
if(findmacro(name)) return error_asm("Macro is duplicate"); if(findmacro(name)) return error_asm("Macro is duplicate");
if(sihx(name)) return error_asm("Macro is hex number"); if(sihx(name)) return error_asm("Macro is hex number");
@ -229,40 +263,6 @@ writehex(char *w)
return 0; return 0;
} }
static int
walkmacro(Item *m)
{
char c, *contentptr = m->content, *cptr = token;
while((c = *contentptr++)) {
if(c < 0x21) {
*cptr++ = 0x00;
if(token[0] && !parse(token, NULL)) return 0;
cptr = token;
} else
*cptr++ = c;
}
return 1;
}
static int
walkfile(FILE *f)
{
char c, *cptr = token;
while(fread(&c, 1, 1, f)) {
if(c == 0xa) line++;
if(c < 0x21) {
*cptr++ = 0x00;
if(token[0] && !parse(token, f))
return 0;
cptr = token;
} else if(cptr - token < 0x3f)
*cptr++ = c;
else
return error_asm("Token too long");
}
return 1;
}
static int static int
makeinclude(char *filename) makeinclude(char *filename)
{ {