]> diplodocus.org Git - nmh/commitdiff
sbr/mf.c: Remove QUOTE macro, use its '\\' definition instead.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 20 Aug 2017 10:56:55 +0000 (11:56 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 20 Aug 2017 10:56:55 +0000 (11:56 +0100)
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.

sbr/mf.c

index cf5b6d81f077c2a5c33830fc442b8ccc03ff5a27..190827cab7a7860c6e8e6195ffc8a5424521d313 100644 (file)
--- 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;