summaryrefslogtreecommitdiffhomepage
path: root/mixlib
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-08-22 00:42:13 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-08-22 00:42:13 +0000
commit61a86ec81a14231915b2aeb5706dca13bf897ca2 (patch)
treeede5022a57a1bb57a576f9845ee48a6c18012eee /mixlib
parent24a852d8a28cd404d3afd43786cfef012a03d6f3 (diff)
downloadmdk-61a86ec81a14231915b2aeb5706dca13bf897ca2.tar.gz
mdk-61a86ec81a14231915b2aeb5706dca13bf897ca2.tar.bz2
mixguile: first version
Diffstat (limited to 'mixlib')
-rw-r--r--mixlib/mix_vm_command.c26
-rw-r--r--mixlib/mix_vm_command.h8
2 files changed, 33 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,
diff --git a/mixlib/mix_vm_command.h b/mixlib/mix_vm_command.h
index 5d5ebca..4603f78 100644
--- a/mixlib/mix_vm_command.h
+++ b/mixlib/mix_vm_command.h
@@ -118,6 +118,14 @@ mix_vm_cmd_dispatcher_new_with_config (FILE *out, FILE *err,
extern void
mix_vm_cmd_dispatcher_delete (mix_vm_cmd_dispatcher_t *dis);
+/* set/get out/error streams */
+extern FILE * /* old output stream */
+mix_vm_cmd_dispatcher_set_out_stream (mix_vm_cmd_dispatcher_t *dis,
+ FILE *out);
+
+extern FILE * /* old error stream */
+mix_vm_cmd_dispatcher_set_error_stream (mix_vm_cmd_dispatcher_t *dis,
+ FILE *err);
/* set editor and compiler templates */
extern void