shithub: femtolisp

Download patch

ref: b81e574fb493d4354196d9e2a9adf8f76eab5e76
parent: 1a611fb29238402d52afca4b4f3c779c434afe84
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Nov 11 14:43:56 EST 2024

lessen the ridiculous amounts of parens in flisp.h

--- a/flisp.h
+++ b/flisp.h
@@ -85,12 +85,12 @@
 #define TAG_FWD UNBOUND
 #define tag(x) ((x) & 0x7)
 #define ptr(x) ((void*)((x) & (~(value_t)0x7)))
-#define tagptr(p, t) (((value_t)(p)) | (t))
-#define fixnum(x) ((value_t)((fixnum_t)(x))<<2)
-#define numval(x)  (((fixnum_t)(x))>>2)
+#define tagptr(p, t) ((value_t)(p) | (t))
+#define fixnum(x) ((value_t)(x)<<2)
+#define numval(x)  ((fixnum_t)(x)>>2)
 #define fits_bits(x, b) (((x)>>(b-1)) == 0 || (~((x)>>(b-1))) == 0) /* mag: UNUSED? */
 #define uintval(x) (((unsigned int)(x))>>3)
-#define builtin(n) tagptr((((int)n)<<3), TAG_FUNCTION)
+#define builtin(n) tagptr(((int)n<<3), TAG_FUNCTION)
 #define iscons(x) (tag(x) == TAG_CONS)
 #define issymbol(x) (tag(x) == TAG_SYM)
 #define isfixnum(x) (((x)&3) == TAG_NUM)