diff options
Diffstat (limited to 'mixlib/mix_vm_command.c')
-rw-r--r-- | mixlib/mix_vm_command.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/mixlib/mix_vm_command.c b/mixlib/mix_vm_command.c index e9e3751..dd0bb2d 100644 --- a/mixlib/mix_vm_command.c +++ b/mixlib/mix_vm_command.c @@ -258,7 +258,7 @@ mix_vm_cmd_dispatcher_new (FILE *out_fd, /* output messages file */ mix_vm_cmd_dispatcher_t *result = NULL; int k; - g_return_val_if_fail (out_fd && err_fd, NULL); + /* g_return_val_if_fail (out_fd && err_fd, NULL); */ result = g_new (mix_vm_cmd_dispatcher_t, 1); result->result = TRUE; @@ -364,6 +364,30 @@ mix_vm_cmd_dispatcher_delete (mix_vm_cmd_dispatcher_t *dis) g_free (dis); } +/* set/get out/error streams */ +FILE * /* old output stream */ +mix_vm_cmd_dispatcher_set_out_stream (mix_vm_cmd_dispatcher_t *dis, FILE *out) +{ + FILE *old = NULL; + g_return_val_if_fail (dis != NULL, old); + old = dis->out; + dis->out = out; + dis->dump->channel = out; + return old; +} + +FILE * /* old error stream */ +mix_vm_cmd_dispatcher_set_error_stream (mix_vm_cmd_dispatcher_t *dis, + FILE *err) +{ + FILE *old = NULL; + g_return_val_if_fail (dis != NULL, old); + old = dis->err; + dis->err = err; + return old; +} + + /* set editor and compiler templates */ void mix_vm_cmd_dispatcher_set_editor (mix_vm_cmd_dispatcher_t *dis, |