Lines Matching refs:commandShell

295 static Shell *commandShell = &shells[DEFSHELL_INDEX]; /* this is the shell to  variable
743 if (!commandShell->hasErrCtl) { in JobPrintCommand()
757 commandShell->hasEchoCtl) { in JobPrintCommand()
758 DBPRINTF("%s\n", commandShell->echoOff); in JobPrintCommand()
760 if (commandShell->hasErrCtl) in JobPrintCommand()
767 if (commandShell->hasErrCtl) { in JobPrintCommand()
777 commandShell->hasEchoCtl) { in JobPrintCommand()
778 DBPRINTF("%s\n", commandShell->echoOff); in JobPrintCommand()
779 DBPRINTF("%s\n", commandShell->ignErr); in JobPrintCommand()
780 DBPRINTF("%s\n", commandShell->echoOn); in JobPrintCommand()
782 DBPRINTF("%s\n", commandShell->ignErr); in JobPrintCommand()
784 } else if (commandShell->ignErr && in JobPrintCommand()
785 (*commandShell->ignErr != '\0')) in JobPrintCommand()
798 if (commandShell->hasEchoCtl) { in JobPrintCommand()
799 DBPRINTF("%s\n", commandShell->echoOff); in JobPrintCommand()
801 DBPRINTF(commandShell->errCheck, escCmd); in JobPrintCommand()
805 DBPRINTF(commandShell->errCheck, escCmd); in JobPrintCommand()
808 cmdTemplate = commandShell->ignErr; in JobPrintCommand()
829 if (!commandShell->hasErrCtl && commandShell->errOut && in JobPrintCommand()
830 (*commandShell->errOut != '\0')) { in JobPrintCommand()
832 if (commandShell->hasEchoCtl) { in JobPrintCommand()
833 DBPRINTF("%s\n", commandShell->echoOff); in JobPrintCommand()
835 DBPRINTF(commandShell->errCheck, escCmd); in JobPrintCommand()
839 if ((escCmd[0] == commandShell->commentChar) || in JobPrintCommand()
841 cmdTemplate = commandShell->ignErr; in JobPrintCommand()
843 cmdTemplate = commandShell->errOut; in JobPrintCommand()
864 if (!shutUp && !(job->flags & JOB_SILENT) && commandShell->hasEchoCtl){ in JobPrintCommand()
865 DBPRINTF("%s\n", commandShell->echoOff); in JobPrintCommand()
868 DBPRINTF("%s\n", commandShell->errCheck); in JobPrintCommand()
870 if (shutUp && commandShell->hasEchoCtl) { in JobPrintCommand()
871 DBPRINTF("%s\n", commandShell->echoOn); in JobPrintCommand()
1448 if ((commandShell->exit && (*commandShell->exit != '-')) || in JobMakeArgv()
1449 (commandShell->echo && (*commandShell->echo != '-'))) in JobMakeArgv()
1459 (commandShell->exit ? commandShell->exit : "")), in JobMakeArgv()
1461 (commandShell->echo ? commandShell->echo : ""))); in JobMakeArgv()
1468 if (!(job->flags & JOB_IGNERR) && commandShell->exit) { in JobMakeArgv()
1469 argv[argc] = UNCONST(commandShell->exit); in JobMakeArgv()
1472 if (!(job->flags & JOB_SILENT) && commandShell->echo) { in JobMakeArgv()
1473 argv[argc] = UNCONST(commandShell->echo); in JobMakeArgv()
1702 if (commandShell->noPrint) { in JobOutput()
1703 ecp = Str_FindSubstring(cp, commandShell->noPrint); in JobOutput()
1720 cp = ecp + commandShell->noPLen; in JobOutput()
1731 ecp = Str_FindSubstring(cp, commandShell->noPrint); in JobOutput()
2132 shellName = commandShell->name; in Shell_Init()
2142 if (commandShell->exit == NULL) { in Shell_Init()
2143 commandShell->exit = ""; in Shell_Init()
2145 if (commandShell->echo == NULL) { in Shell_Init()
2146 commandShell->echo = ""; in Shell_Init()
2148 if (commandShell->hasErrCtl && *commandShell->exit) { in Shell_Init()
2150 strcmp(commandShell->exit, &shellErrFlag[1]) != 0) { in Shell_Init()
2155 int n = strlen(commandShell->exit) + 2; in Shell_Init()
2159 snprintf(shellErrFlag, n, "-%s", commandShell->exit); in Shell_Init()
2176 return commandShell->newline; in Shell_GetNewline()
2470 commandShell = sh; in Job_ParseShell()
2506 commandShell = sh; in Job_ParseShell()
2508 commandShell = bmake_malloc(sizeof(Shell)); in Job_ParseShell()
2509 *commandShell = newShell; in Job_ParseShell()
2515 if (commandShell->echoOn && commandShell->echoOff) { in Job_ParseShell()
2516 commandShell->hasEchoCtl = TRUE; in Job_ParseShell()
2519 if (!commandShell->hasErrCtl) { in Job_ParseShell()
2520 if (commandShell->errCheck == NULL) { in Job_ParseShell()
2521 commandShell->errCheck = ""; in Job_ParseShell()
2523 if (commandShell->ignErr == NULL) { in Job_ParseShell()
2524 commandShell->ignErr = "%s\n"; in Job_ParseShell()