diff options
| author | Toby Goodwin <toby@paccrat.org> | 2018-03-17 15:14:21 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2018-03-17 15:14:21 +0000 |
| commit | cccdab7ea2bb922413f02698ecc5969c00e7a7aa (patch) | |
| tree | 2d6291549e74bcf68fc7e46fc78be8ecd7cb8975 /main.c | |
| parent | 9c7ee8473a71303ab4cb51c9593089c07c224a22 (diff) | |
tidy up, test cases, document flag
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -6,9 +6,10 @@ #include "input.h" -bool dashdee, dashee, dashvee, dashex, dasheye, - dashen, dashpee, interactive; -bool dashEYE, dashell, dashoh, dashess; +bool dashdee, dashee, dasheye, dashell, dashen; +bool dashpee, dashoh, dashess, dashvee, dashex; +bool interactive; +static bool dashEYE; char *dashsee[2]; pid_t rc_pid; @@ -68,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); |