[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GUILE] Clubie question re loading data.
From: |
Martin Grabmueller |
Subject: |
Re: [GUILE] Clubie question re loading data. |
Date: |
Thu, 25 Jan 2001 22:25:22 +0100 |
> From: "Bobby D. Bryant" <address@hidden>
> Date: Thu, 25 Jan 2001 14:43:50 -0600
>
> SCM gh_quote_file(char *fname)
>
> ...that parallels...
>
> SCM gh_eval_file(char *fname)
>
> ...except returns the contents of the file as an unintepreted object
> rather than evaluating the contents of the file and returning
> #<unspecified>.
The high level interface does not provide this functionality (I don't
know if there is a reason, or if it was forgotten), but as a
workaround, you can use
SCM scm_read (SCM port)
Of course you would have to create an input port for passing to the
function. This can be accomplished by calling
SCM scm_open_file (SCM filename, SCM modes)
with proper arguments, e.g:
Example ==============================================================
SCM port, expr;
port = scm_open_file (gh_str02scm ("config.scm"), gh_str02scm ("r"));
expr = scm_read (port);
scm_close_port (port);
gh_write (expr);
End Example ==========================================================
HTH,
'Martin
--
Martin Grabmueller address@hidden
http://www.pintus.de/mgrabmue/ address@hidden on EFnet