diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | match.c | 2 |
2 files changed, 10 insertions, 0 deletions
@@ -1,5 +1,13 @@ 2012-03-26 Kaz Kylheku <kaz@kylheku.com> + * match.c (v_output): Bugfix: we should flush the stream + after each @(output) block. Otherwise if output blocks + that go to standard output are interleaved with output blocks + which pipe to some command which then goes to standard out, + the output won't be in the proper order. + +2012-03-26 Kaz Kylheku <kaz@kylheku.com> + * eval.c (eval_init): New intrinsic num-str registered. * filter.c (tonumber_k, tointeger_k, tofloat_k, hextoint_k): @@ -3009,6 +3009,7 @@ static val v_output(match_files_ctx *c) uw_env_begin; uw_set_match_context(cons(c->spec, c->bindings)); do_output(c->bindings, specs, filter, stream); + flush_stream(stream); uw_env_end; { @@ -3049,6 +3050,7 @@ static val v_output(match_files_ctx *c) uw_env_begin; uw_set_match_context(cons(c->spec, c->bindings)); do_output(c->bindings, specs, filter, stream); + flush_stream(stream); uw_env_end; close_stream(stream, t); } |