mirror of
https://github.com/mirror/make.git
synced 2025-02-11 20:31:19 +08:00
Undo last change; reverted to revision 1.22.
This commit is contained in:
parent
8f581d3bc0
commit
ac336f7a9c
20
commands.c
20
commands.c
@ -203,15 +203,27 @@ chop_commands (cmds)
|
|||||||
|
|
||||||
nlines = 5;
|
nlines = 5;
|
||||||
lines = (char **) xmalloc (5 * sizeof (char *));
|
lines = (char **) xmalloc (5 * sizeof (char *));
|
||||||
idx = strlen (cmds->commands) + 1;
|
|
||||||
p = (char *) alloca (idx);
|
|
||||||
bcopy (cmds->commands, p, idx);
|
|
||||||
idx = 0;
|
idx = 0;
|
||||||
|
p = cmds->commands;
|
||||||
while (*p != '\0')
|
while (*p != '\0')
|
||||||
{
|
{
|
||||||
char *end = find_char_unquote (p, '\n', 0);
|
char *end = p;
|
||||||
|
find_end:;
|
||||||
|
end = index (end, '\n');
|
||||||
if (end == 0)
|
if (end == 0)
|
||||||
end = p + strlen (p);
|
end = p + strlen (p);
|
||||||
|
else if (end > p && end[-1] == '\\')
|
||||||
|
{
|
||||||
|
int backslash = 1;
|
||||||
|
register char *b;
|
||||||
|
for (b = end - 2; b >= p && *b == '\\'; --b)
|
||||||
|
backslash = !backslash;
|
||||||
|
if (backslash)
|
||||||
|
{
|
||||||
|
++end;
|
||||||
|
goto find_end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (idx == nlines)
|
if (idx == nlines)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user