X-Git-Url: http://git.hcoop.net/bpt/guile.git/blobdiff_plain/deca31e1736a487104ecde76df8b55be18c1ef65..7b4e5a7ae3b9ef029e3720c2efdee94815b31d79:/libguile/strports.c diff --git a/libguile/strports.c b/libguile/strports.c index 34485f0b3..d4a5720c2 100644 --- a/libguile/strports.c +++ b/libguile/strports.c @@ -12,7 +12,8 @@ * * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA * * As a special exception, the Free Software Foundation gives permission * for additional uses of the text contained in its release of GUILE. @@ -36,8 +37,7 @@ * * If you write modifications of your own for GUILE, it is your choice * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - */ + * If you do not wish that, delete this exception notice. */ #include @@ -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