diff options
author | john haque <j.eh@mchsi.com> | 2011-08-20 08:28:02 -0500 |
---|---|---|
committer | john haque <j.eh@mchsi.com> | 2011-10-12 07:33:05 -0500 |
commit | 1fea520248b42ca995c8797698c60301ea42ffe9 (patch) | |
tree | 1aa80c13392c25aa6bf3eb931fec9c83a0621e25 /io.c | |
parent | f757e147f1ae8254669b3222bc24a39ee8ff9b8f (diff) | |
download | egawk-1fea520248b42ca995c8797698c60301ea42ffe9.tar.gz egawk-1fea520248b42ca995c8797698c60301ea42ffe9.tar.bz2 egawk-1fea520248b42ca995c8797698c60301ea42ffe9.zip |
Speed/memory performance improvements.
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -211,7 +211,7 @@ static int inetfile(const char *str, int *length, int *family); #endif static struct redirect *red_head = NULL; -static NODE *RS; +static NODE *RS = NULL; static Regexp *RS_re_yes_case; static Regexp *RS_re_no_case; static Regexp *RS_regexp; @@ -611,7 +611,7 @@ redirect(NODE *redir_exp, int redirtype, int *errflg) if (do_lint && (redir_exp->flags & STRCUR) == 0) lintwarn(_("expression in `%s' redirection only has numeric value"), what); - redir_exp = force_string(redir_exp); + redir_exp= force_string(redir_exp); str = redir_exp->stptr; if (str == NULL || *str == '\0') @@ -2531,7 +2531,7 @@ iop_alloc(int fd, const char *name, IOBUF *iop, int do_openhooks) #define set_RT_to_null() \ (void)(! do_traditional && (unref(RT_node->var_value), \ - RT_node->var_value = Nnull_string)) + RT_node->var_value = dupnode(Nnull_string))) #define set_RT(str, len) \ (void)(! do_traditional && (unref(RT_node->var_value), \ @@ -3147,8 +3147,7 @@ pty_vs_pipe(const char *command) #ifdef HAVE_TERMIOS_H char *full_index; size_t full_len; - NODE *val; - NODE *sub; + NODE *val, *sub; if (PROCINFO_node == NULL) return FALSE; |