#include "read.h", to get prototype for scm_read.
* Makefile.in (strports.o): Update dependencies.
* strports.h: New prototype.
tags.h error.h __scm.h print.h \
options.h pairs.h list.h gc.h gsubr.h procs.h numbers.h \
symbols.h boolean.h strings.h vectors.h root.h ports.h async.h unif.h \
- eval.h strports.h strports.x
+ eval.h read.h strports.h strports.x
struct.o: struct.c _scm.h __scm.h scmconfig.h \
tags.h error.h __scm.h print.h \
options.h pairs.h list.h gc.h gsubr.h procs.h numbers.h \
#include "_scm.h"
#include "unif.h"
#include "eval.h"
+#include "read.h"
#include "strports.h"
}
+
+/* Given a null-terminated string EXPR containing Scheme program text,
+ evaluate it, and discard the result. */
+void
+scm_eval_0str (expr)
+ char *expr;
+{
+ SCM port = scm_mkstrport (SCM_MAKINUM (0),
+ scm_makfrom0str (expr),
+ SCM_OPN | SCM_RDNG,
+ "scm_eval_0str");
+ SCM form;
+
+ /* Read expressions from that port; ignore the values. */
+ while ((form = scm_read (port, SCM_BOOL_F, SCM_BOOL_F)) != SCM_EOF_VAL)
+ scm_eval_x (form);
+
+ scm_close_port (port);
+}
+
+
static int noop0 SCM_P ((SCM stream));
static int
extern SCM scm_call_with_output_string SCM_P ((SCM proc));
extern SCM scm_strprint_obj SCM_P ((SCM obj));
extern SCM scm_call_with_input_string SCM_P ((SCM str, SCM proc));
+extern void scm_eval_0str SCM_P ((char *expr));
extern void scm_init_strports SCM_P ((void));
#endif /* STRPORTSH */