commit 3cbbc6b
Devine Lu Linvega
·
2025-01-04 17:04:48 +0000 UTC
parent 6276d18
Muted warnings
2 files changed,
+10,
-4
+1,
-1
1@@ -30,7 +30,7 @@ WITH REGARD TO THIS SOFTWARE.
2 #define DEC(s) uxn.s.dat[--uxn.s.ptr]
3 #define JMP(i) pc = _2 ? i : pc + (Sint8)i;
4 #define PO1(o) o = _r ? DEC(rst) : DEC(wst);
5-#define PO2(o) o = _r ? DEC(rst) | DEC(rst) << 8 : DEC(wst) | DEC(wst) << 8;
6+#define PO2(o) { if(_r) o = DEC(rst), o |= DEC(rst) << 8; else o = DEC(wst), o |= DEC(wst) << 8; }
7 #define POx(o) { if(_2) PO2(o) else PO1(o) }
8 #define PU1(i) { if(_r) INC(rst) = i; else INC(wst) = i; }
9 #define RP1(i) { if(_r) INC(wst) = i; else INC(rst) = i; }
+9,
-3
1@@ -163,8 +163,10 @@ walkcomment(FILE *f, Context *ctx)
2 while(f && fread(&c, 1, 1, f)) {
3 if(c <= 0x20) {
4 if(c == 0xa) ctx->line++;
5- if(last == '(') depth++;
6- else if(last == ')' && --depth < 1) return 1;
7+ if(last == '(')
8+ depth++;
9+ else if(last == ')' && --depth < 1)
10+ return 1;
11 last = 0;
12 } else if(last <= 0x20)
13 last = c;
14@@ -367,7 +369,11 @@ parse(char *w, FILE *f, Context *ctx)
15 Item *m;
16 switch(w[0]) {
17 case 0x0: return 1;
18- case '(': if (w[1] <= 0x20) return walkcomment(f, ctx); else return error_asm("Invalid word");
19+ case '(':
20+ if(w[1] <= 0x20)
21+ return walkcomment(f, ctx);
22+ else
23+ return error_asm("Invalid word");
24 case '%': return makemacro(w + 1, f, ctx);
25 case '@': return makelabel(w + 1, 1, ctx);
26 case '&': return makelabel(w, 0, ctx);