From db2534911403fe59b7c6f1b58bb77a63533d85fd Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Tue, 26 Mar 2024 11:19:01 -0700 Subject: [PATCH] (uxnasm) Removed setlocation --- src/uxnasm.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/uxnasm.c b/src/uxnasm.c index ce17e69..639280c 100644 --- a/src/uxnasm.c +++ b/src/uxnasm.c @@ -88,14 +88,6 @@ error_asm(const char *name) return 0; } -static char * -setlocation(char *name) -{ - p.location = name; - p.line = 0; - return name; -} - static Macro * findmacro(char *name) { @@ -302,9 +294,11 @@ static int doinclude(char *filename) { FILE *f; - int res; - if(!(f = fopen(setlocation(filename), "r"))) + int res = 0; + if(!(f = fopen(filename, "r"))) return error_top("Invalid source", filename); + p.location = filename; + p.line = 0; res = tokenize(f); fclose(f); return res;