diff options
author | john haque <j.eh@mchsi.com> | 2011-08-21 05:54:38 -0500 |
---|---|---|
committer | john haque <j.eh@mchsi.com> | 2011-10-12 07:46:07 -0500 |
commit | f0866c5197ee0c01fd1ded16e364cbe612c271be (patch) | |
tree | bece1471f69606eea216154b2d7a480cd90c0a20 /builtin.c | |
parent | 1fea520248b42ca995c8797698c60301ea42ffe9 (diff) | |
download | egawk-f0866c5197ee0c01fd1ded16e364cbe612c271be.tar.gz egawk-f0866c5197ee0c01fd1ded16e364cbe612c271be.tar.bz2 egawk-f0866c5197ee0c01fd1ded16e364cbe612c271be.zip |
Add a test file, cleanup code and update doc.
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1348,7 +1348,7 @@ out2: _("too many arguments supplied for format string")); } bchunk(s0, s1 - s0); - r = make_str_node(obuf, obufout - obuf); + r = make_str_node(obuf, obufout - obuf, ALREADY_MALLOCED); obuf = NULL; out: { @@ -1612,7 +1612,7 @@ do_substr(int nargs) wp++; } *cp = '\0'; - r = make_str_node(substr, cp - substr); + r = make_str_node(substr, cp - substr, ALREADY_MALLOCED); } #else r = make_string(t1->stptr + indx, length); @@ -2724,7 +2724,7 @@ done: if (matches > 0) { /* return the result string */ DEREF(t); - return make_str_node(buf, textlen); + return make_str_node(buf, textlen, ALREADY_MALLOCED); } /* return the original string */ @@ -2736,7 +2736,7 @@ done: DEREF(t); else if (matches > 0) { unref(*lhs); - *lhs = make_str_node(buf, textlen); + *lhs = make_str_node(buf, textlen, ALREADY_MALLOCED); } return make_number((AWKNUM) matches); |