From: Ralph Corderoy Date: Sun, 20 Aug 2017 10:56:55 +0000 (+0100) Subject: sbr/mf.c: Remove QUOTE macro, use its '\\' definition instead. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/a341943063abbdbcacdfa6a932093e1b42f71bd6?hp=dc7efebe09e15e0e9e8a7821602c5052f00ef9b9 sbr/mf.c: Remove QUOTE macro, use its '\\' definition instead. The name suggests a quote character, not the backslash as an escape character that quotes what comes after it. It's easier to read '\\' and instantly know what's meant. --- diff --git a/sbr/mf.c b/sbr/mf.c index cf5b6d81..190827ca 100644 --- a/sbr/mf.c +++ b/sbr/mf.c @@ -90,8 +90,6 @@ isat (const char *p) * */ -#define QUOTE '\\' - #define LX_END 0 #define LX_ERR 1 #define LX_ATOM 2 @@ -120,7 +118,7 @@ static struct specials special[] = { { '@', LX_AT }, { '(', LX_ERR }, { ')', LX_ERR }, - { QUOTE, LX_ERR }, + { '\\', LX_ERR }, { '"', LX_ERR }, { '[', LX_ERR }, { ']', LX_ERR }, @@ -590,7 +588,7 @@ my_lex (char *buffer) case 0: cp = NULL; return (last_lex = LX_ERR); - case QUOTE: + case '\\': ADDCHR(c); if ((c = *cp++) == 0) { cp = NULL; @@ -622,7 +620,7 @@ my_lex (char *buffer) case 0: cp = NULL; return (last_lex = LX_ERR); - case QUOTE: + case '\\': ADDCHR(c); if ((c = *cp++) == 0) { cp = NULL; @@ -646,7 +644,7 @@ my_lex (char *buffer) case 0: cp = NULL; return (last_lex = LX_ERR); - case QUOTE: + case '\\': ADDCHR(c); if ((c = *cp++) == 0) { cp = NULL;