bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Improve “missing separator” error when reading spaces


From: Edward Welbourne
Subject: Re: [PATCH] Improve “missing separator” error when reading spaces
Date: Mon, 21 Nov 2016 15:00:46 +0000

Michael Stapelberg's patch: <patch>

diff --git a/read.c b/read.c
index b870aa8..3c67e55 100644
--- a/read.c
+++ b/read.c
@@ -1122,6 +1122,8 @@ eval (struct ebuffer *ebuf, int set_default)
                one of the most common bugs found in makefiles...  */
             if (cmd_prefix == '\t' && strneq (line, "        ", 8))
               O (fatal, fstart, _("missing separator (did you mean TAB instead 
of 8 spaces?)"));
+            else if (cmd_prefix == '\t' && strneq (line, " ", 1))
+              O (fatal, fstart, _("missing separator (expected TAB, found 
SPACE)"));
             else
               O (fatal, fstart, _("missing separator"));
           }
--
2.9.3

</patch>
Rather than strneq (line, " ", 1), I suggest isspace(line[0]),

        Eddy.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]