diff options
| author | Toby Goodwin <toby@paccrat.org> | 2018-03-17 18:36:15 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2018-03-17 18:36:15 +0000 |
| commit | 2dd0aa249c9bac4e5c616d1f386dc4271fdbab46 (patch) | |
| tree | 973fff29c8728ec9a1bf7f53a8b613a214c5c809 /main.c | |
| parent | 1128baa58acaff32e4538d5878b916fba091c574 (diff) | |
| parent | 54ccf74c675696318b697182573a86668fe36f50 (diff) | |
Merge branch 'master' into ifnot
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -6,17 +6,19 @@ #include "input.h" -bool dashdee, dashee, dashvee, dashex, dasheye, - dashen, dashpee, interactive; +bool dashdee, dashee, dasheye, dashell, dashen; +bool dashpee, dashoh, dashess, dashvee, dashex; +bool interactive; +static bool dashEYE; +char *dashsee[2]; pid_t rc_pid; -static bool dashEYE, dashell, dashoh, dashess; static void assigndefault(char *,...); static void checkfd(int, enum redirtype); extern int main(int argc, char *argv[], char *envp[]) { - char *dashsee[2], *dollarzero, *null[1]; + char *dollarzero, *null[1]; int c; initprint(); dashsee[0] = dashsee[1] = NULL; @@ -67,8 +69,10 @@ extern int main(int argc, char *argv[], char *envp[]) { } quitopts: argv += rc_optind; - /* use isatty() iff neither -i nor -I is set, and iff the input is not from a script or -c flags */ - if (!dasheye && !dashEYE && dashsee[0] == NULL && (dashess || *argv == NULL)) + /* use isatty() iff neither -i nor -I is set, and iff the input is not + * from a script or -c flags */ + if (!dasheye && !dashEYE && dashsee[0] == NULL && + (dashess || *argv == NULL)) interactive = isatty(0); if (!dashoh) { checkfd(0, rFrom); |