summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2009-09-28 23:08:49 +0000
committerPaul Smith <psmith@gnu.org>2009-09-28 23:08:49 +0000
commitf907a4d90c895f04ee7497a5f1b58ad1fd3cddb5 (patch)
treeaf19406bf81da1ad0fa78609d1195c959e31af0a /job.c
parentf5891a26d8d3ed87b059856650b2bdb0c7ea355e (diff)
downloadgunmake-f907a4d90c895f04ee7497a5f1b58ad1fd3cddb5.tar.gz
- Update manual description for pattern rule search algorithm
- Add new "-all" flag to the test suite to run tests that don't pass yet - Add some non-passing tests - Fix from Andreas Buening for OS/2.
Diffstat (limited to 'job.c')
-rw-r--r--job.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/job.c b/job.c
index b3fef25..54e17c4 100644
--- a/job.c
+++ b/job.c
@@ -2845,8 +2845,11 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
char *p = new_line;
char *q = new_line;
memcpy (new_line, line, line_len + 1);
- /* replace all backslash-newline combination and also following tabs */
- while (*q != '\0')
+ /* Replace all backslash-newline combination and also following tabs.
+ Important: stop at the first '\n' because that's what the loop above
+ did. The next line starting at restp[0] will be executed during the
+ next call of this function. */
+ while (*q != '\0' && *q != '\n')
{
if (q[0] == '\\' && q[1] == '\n')
q += 2; /* remove '\\' and '\n' */