ref: dec4eac694f6aec70d0c1a0ace5be36875611c87
parent: 931d8e8f9730acac11f9f58084351789fdda1482
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed May 17 22:50:53 EDT 2023
turn symchar into a define
--- a/flisp.c
+++ b/flisp.c
@@ -345,8 +345,6 @@
// print ----------------------------------------------------------------------
//static int isnumtok(char *tok, value_t *pval);
-//static inline int symchar(char c);
-extern inline int symchar(char c);
//#include "print.c"
--- a/read.c
+++ b/read.c
@@ -84,18 +84,6 @@
#define F value2c(ios_t*, readstate->source)
-// defines which characters are ordinary symbol characters.
-// exceptions are '.', which is an ordinary symbol character
-// unless it's the only character in the symbol, and '#', which is
-// an ordinary symbol character unless it's the first character.
-//inline int
-//symchar(char c)
-//{-// //static char *special = "()[]'\";`,\\| \a\b\f\n\r\t\v";
-// char *special = "()[]'\";`,\\| \a\b\f\n\r\t\v";
-// return !strchr(special, c);
-//}
-
int
isnumtok_base(char *tok, value_t *pval, int base)
{--- a/read.h
+++ b/read.h
@@ -9,13 +9,8 @@
// exceptions are '.', which is an ordinary symbol character
// unless it's the only character in the symbol, and '#', which is
// an ordinary symbol character unless it's the first character.
-inline int
-symchar(char c)
-{- //static char *special = "()[]'\";`,\\| \a\b\f\n\r\t\v";
- char *special = "()[]'\";`,\\| \a\b\f\n\r\t\v";
- return !strchr(special, c);
-}
+#define symchar(c) (!strchr(symspecials, (c)))
+static char symspecials[] = "()[]'\";`,\\| \a\b\f\n\r\t\v";
#endif
--
⑨