aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-07-04 05:41:05 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-07-04 05:41:05 +0300
commit414cd1eccff2d6d6415e1f65ac2e51e7c1b33890 (patch)
treeec23aa620134a1c949840c1c9e3294ba89a83a43 /io.c
parent093f27aa0d53494c257cf16a57b01ad43f70cdff (diff)
parentff4e0706c5ee5dffd69168ebd0ff5f53e474d048 (diff)
downloadegawk-414cd1eccff2d6d6415e1f65ac2e51e7c1b33890.tar.gz
egawk-414cd1eccff2d6d6415e1f65ac2e51e7c1b33890.tar.bz2
egawk-414cd1eccff2d6d6415e1f65ac2e51e7c1b33890.zip
Merge branch 'master' into feature/cmake
Diffstat (limited to 'io.c')
-rw-r--r--io.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/io.c b/io.c
index db903fd7..b9bce694 100644
--- a/io.c
+++ b/io.c
@@ -785,7 +785,7 @@ redirect_string(const char *str, size_t explen, bool not_string,
cant_happen();
}
if (do_lint && not_string)
- lintwarn(_("expression in `%s' redirection only has numeric value"),
+ lintwarn(_("expression in `%s' redirection is a number"),
what);
if (str == NULL || *str == '\0')
@@ -1083,7 +1083,7 @@ redirect_string(const char *str, size_t explen, bool not_string,
struct redirect *
redirect(NODE *redir_exp, int redirtype, int *errflg, bool failure_fatal)
{
- bool not_string = ((redir_exp->flags & STRCUR) == 0);
+ bool not_string = ((fixtype(redir_exp)->flags & STRING) == 0);
redir_exp = force_string(redir_exp);
return redirect_string(redir_exp->stptr, redir_exp->stlen, not_string,
@@ -3895,14 +3895,8 @@ pty_vs_pipe(const char *command)
* in_PROCINFO function now checks that for us.
*/
val = in_PROCINFO(command, "pty", NULL);
- if (val) {
- if ((val->flags & MAYBE_NUM) != 0)
- (void) force_number(val);
- if ((val->flags & NUMBER) != 0)
- return ! iszero(val);
- else
- return (val->stlen != 0);
- }
+ if (val)
+ return boolval(val);
#endif /* HAVE_TERMIOS_H */
return false;
}