[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I don't want to maintain this
From: |
Bruce Korb |
Subject: |
Re: I don't want to maintain this |
Date: |
Tue, 29 Nov 2005 12:14:36 -0800 |
User-agent: |
KMail/1.7.1 |
On Tuesday 29 November 2005 12:16 am, Ludovic Courtès wrote:
> Hi,
>
> Bruce Korb <address@hidden> writes:
>
> > Grumble, grumble. Anyway, this belongs in your code. We argued about this
> > before and someone said, "well, you could do it in any of several ways,
> > so we won't do it at all." This function is entirely equivalent to
> > "scm_c_eval_string" except that error results show file name and line
> > number.
>
> Sorry if I'm just re-stating what you were already answered: Can't you
> implement this as a small Scheme procedure? Something along the lines
> of:
Hi Ludovic,
*I* certainly cannot. And I do not understand the usage of the "file"
argument. What I am doing is extracting Scheme code from an encompassing
template and handing it off for evaluation. My program is reading the
file, not Guile. When I hand off the the string for evaluation, I hand
it to that ugly thing that I do not want to maintain. I do this in
exactly the same way as one would with scm_c_eval_string, except I have
the additional parameters file name and line number. Perhaps I could
wrap my strings in something like this:
char* fmt =
"(read-enable 'positions)
(format #t \"evaluating `~a' from ~a:~a:~a~%%\"
sexp (port-filename (current-input-port))
(source-property sexp \"%s\")
(source-property sexp %d))
(begin
%s
)";
and use it thus:
sprintf( buf, fmt, filename, linenum, script );
result = scm_c_eval_string( buf );
Would that work?
Your help is _surely_ appreciated!! Thank you.
Kind regards, Bruce
- I don't want to maintain this, Bruce Korb, 2005/11/27
- I don't want to maintain this, Bruce Korb, 2005/11/28
- Re: I don't want to maintain this, Ludovic Courtès, 2005/11/29
- Re: I don't want to maintain this,
Bruce Korb <=
- Re: I don't want to maintain this, Ludovic Courtès, 2005/11/30
- Re: I don't want to maintain this, Bruce Korb, 2005/11/30
- Re: I don't want to maintain this, Ludovic Courtès, 2005/11/30
- Re: I don't want to maintain this, Bruce Korb, 2005/11/30
- Getting source location information, Ludovic Courtès, 2005/11/30
- Re: Getting source location information, Bruce Korb, 2005/11/30
- Re: Getting source location information, Ludovic Courtès, 2005/11/30
- Re: Getting source location information, Bruce Korb, 2005/11/30
- Re: Getting source location information, Ludovic Courtès, 2005/11/30
- Re: Getting source location information, Rob Browning, 2005/11/30