diff options
author | Jim Blandy <jimb@red-bean.com> | 1997-05-15 02:02:40 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1997-05-15 02:02:40 +0000 |
commit | b377f53e56680c143c066ccb0aeec2b361fc1edd (patch) | |
tree | db330c929024db736c948dd9d2acc288b465fcd2 /libguile/strports.c | |
parent | 3a3e9e09b8df62fb0981aa22f876cc39ab680e74 (diff) | |
download | guile-b377f53e56680c143c066ccb0aeec2b361fc1edd.tar.gz |
* strports.c (scm_eval_string): New function.
(scm_eval_0str): Trivially re-implemented in terms of
scm_eval_string.
* strports.h (scm_eval_string): New extern decl.
Diffstat (limited to 'libguile/strports.c')
-rw-r--r-- | libguile/strports.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/libguile/strports.c b/libguile/strports.c index 34485f0b3..55ae2ed1e 100644 --- a/libguile/strports.c +++ b/libguile/strports.c @@ -254,12 +254,20 @@ SCM scm_eval_0str (expr) char *expr; { - SCM port = scm_mkstrport (SCM_MAKINUM (0), - scm_makfrom0str (expr), - SCM_OPN | SCM_RDNG, + return scm_eval_string (scm_makfrom0str (expr)); +} + + +SCM_PROC (s_eval_string, "eval-string", 1, 0, 0, scm_eval_string); + +SCM +scm_eval_string (string) + SCM string; +{ + SCM port = scm_mkstrport (SCM_MAKINUM (0), string, SCM_OPN | SCM_RDNG, "scm_eval_0str"); SCM form; - SCM ans = SCM_EOL; + SCM ans = SCM_UNSPECIFIED; /* Read expressions from that port; ignore the values. */ while ((form = scm_read (port)) != SCM_EOF_VAL) @@ -270,6 +278,7 @@ scm_eval_0str (expr) } + static int noop0 SCM_P ((SCM stream)); static int |