Formerly job.c.~96~

This commit is contained in:
Roland McGrath 1993-02-05 22:31:29 +00:00
parent d870f4df8c
commit 580e2a7391

16
job.c
View File

@ -430,17 +430,15 @@ start_job_command (child)
{ {
static int bad_stdin = -1; static int bad_stdin = -1;
register char *p; register char *p;
char noprint = 0, recursive; int flags = child->file->cmds->lines_flags[child->command_line - 1];
char **argv; char **argv;
recursive = child->file->cmds->lines_recurse[child->command_line - 1];
p = child->command_ptr; p = child->command_ptr;
child->noerror = 0; child->noerror = flags & COMMANDS_NOERROR;
while (*p != '\0') while (*p != '\0')
{ {
if (*p == '@') if (*p == '@')
noprint = 1; flags |= COMMANDS_SILENT;
else if (*p == '-') else if (*p == '-')
child->noerror = 1; child->noerror = 1;
else if (!isblank (*p) && *p != '+') else if (!isblank (*p) && *p != '+')
@ -449,7 +447,7 @@ start_job_command (child)
} }
/* If -q was given, just say that updating `failed'. */ /* If -q was given, just say that updating `failed'. */
if (question_flag && !recursive) if (question_flag && !(flags & COMMANDS_RECURSE))
goto error; goto error;
/* There may be some preceding whitespace left if there /* There may be some preceding whitespace left if there
@ -470,7 +468,7 @@ start_job_command (child)
} }
} }
if (touch_flag && !recursive) if (touch_flag && !(flags & COMMANDS_RECURSE))
{ {
/* Go on to the next command. It might be the recursive one. /* Go on to the next command. It might be the recursive one.
We construct ARGV only to find the end of the command line. */ We construct ARGV only to find the end of the command line. */
@ -489,7 +487,7 @@ start_job_command (child)
/* Print out the command. */ /* Print out the command. */
if (just_print_flag || (!noprint && !silent_flag)) if (just_print_flag || (!(flags & COMMANDS_SILENT) && !silent_flag))
puts (p); puts (p);
/* Tell update_goal_chain that a command has been started on behalf of /* Tell update_goal_chain that a command has been started on behalf of
@ -503,7 +501,7 @@ start_job_command (child)
/* If -n was given, recurse to get the next line in the sequence. */ /* If -n was given, recurse to get the next line in the sequence. */
if (just_print_flag && !recursive) if (just_print_flag && !(flags & COMMANDS_RECURSE))
{ {
free (argv[0]); free (argv[0]);
free ((char *) argv); free ((char *) argv);