Browse code

Updated mkuxn-fast scripts

Andrew Alderwick authored on 02/08/2021 05:51:51
Showing 3 changed files
... ...
@@ -298,15 +298,11 @@ See etc/mkuxn-fast.moon for instructions.
298 298
       if l == '/* Stack */' then
299 299
         wanted = false
300 300
       end
301
-      if l:match('errors%[%]') then
302
-        _with_0:write('\n#ifndef NO_STACK_CHECKS\n')
303
-        wanted = true
304
-      end
305 301
       if wanted then
306 302
         _with_0:write(('%s\n'):format(l))
307 303
       end
308 304
       if l == '}' then
309
-        _with_0:write('#endif\n\n')
305
+        _with_0:write('\n')
310 306
         break
311 307
       end
312 308
       _continue_0 = true
... ...
@@ -323,8 +319,8 @@ int
323 319
 uxn_eval(Uxn *u, Uint16 vec)
324 320
 {
325 321
 	Uint8 instr;
326
-  if(u->dev[0].dat[0xf]) 
327
-    return 0;
322
+	if(u->dev[0].dat[0xf]) 
323
+		return 0;
328 324
 	u->ram.ptr = vec;
329 325
 	if(u->wst.ptr > 0xf8) u->wst.ptr = 0xf8;
330 326
 	while(u->ram.ptr) {
... ...
@@ -375,7 +371,7 @@ int
375 371
     if not l then
376 372
       break
377 373
     end
378
-    if l:match('^bootuxn') then
374
+    if l:match('^uxn_boot') then
379 375
       wanted = true
380 376
     end
381 377
     if wanted then
... ...
@@ -214,13 +214,10 @@ See etc/mkuxn-fast.moon for instructions.
214 214
 			continue
215 215
 		if l == '/* Stack */'
216 216
 			wanted = false
217
-		if l\match 'errors%[%]'
218
-			\write '\n#ifndef NO_STACK_CHECKS\n'
219
-			wanted = true
220 217
 		if wanted
221 218
 			\write '%s\n'\format l
222 219
 		if l == '}'
223
-			\write '#endif\n\n'
220
+			\write '\n'
224 221
 			break
225 222
 	\write [[
226 223
 /* clang-format on */
... ...
@@ -270,7 +267,7 @@ int
270 267
 		l = f\read '*l'
271 268
 		if not l
272 269
 			break
273
-		if l\match '^bootuxn'
270
+		if l\match '^uxn_boot'
274 271
 			wanted = true
275 272
 		if wanted
276 273
 			\write '%s\n'\format l
... ...
@@ -4045,5 +4045,6 @@ uxn_port(Uxn *u, Uint8 id, char *name, void (*talkfn)(Device *d, Uint8 b0, Uint8
4045 4045
 	d->u = u;
4046 4046
 	d->mem = u->ram.dat;
4047 4047
 	d->talk = talkfn;
4048
+	(void)name;
4048 4049
 	return d;
4049 4050
 }