From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bruce Korb Newsgroups: gmane.lisp.guile.devel Subject: Re: I don't want to maintain this Date: Tue, 29 Nov 2005 12:14:36 -0800 Organization: At Home Message-ID: <200511291214.37104.bruce.korb@gmail.com> References: <200511272025.32395.bruce.korb@gmail.com> <8764qbuawp.fsf@laas.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1133324875 24637 80.91.229.2 (30 Nov 2005 04:27:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2005 04:27:55 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Nov 30 05:27:52 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EhJXw-00064W-Pb for guile-devel@m.gmane.org; Wed, 30 Nov 2005 05:26:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhJXw-0001UP-7S for guile-devel@m.gmane.org; Tue, 29 Nov 2005 23:26:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EhJXs-0001Tc-Vh for guile-devel@gnu.org; Tue, 29 Nov 2005 23:26:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EhJXr-0001Rh-Ds for guile-devel@gnu.org; Tue, 29 Nov 2005 23:26:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhJXr-0001RX-Ae for guile-devel@gnu.org; Tue, 29 Nov 2005 23:26:15 -0500 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_ARCFOUR_SHA:16) (Exim 4.34) id 1EhJXr-0008LX-9h for guile-devel@gnu.org; Tue, 29 Nov 2005 23:26:15 -0500 Original-Received: from [207.115.57.74] (helo=ylpvm43.prodigy.net) by mx20.gnu.org with esmtp (Exim 4.34) id 1EhBsP-0003pT-0B for guile-devel@gnu.org; Tue, 29 Nov 2005 15:14:57 -0500 Original-Received: from pimout1-ext.prodigy.net (pimout1-int.prodigy.net [207.115.5.65]) by ylpvm43.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id jATKEu2C000636 for ; Tue, 29 Nov 2005 15:14:56 -0500 X-ORBL: [69.226.209.231] Original-Received: from [192.168.1.4] (adsl-69-226-209-231.dsl.pltn13.pacbell.net [69.226.209.231]) by pimout1-ext.prodigy.net (8.13.4 outbound domainkey aix/8.13.4) with ESMTP id jATKEdwi166446; Tue, 29 Nov 2005 15:14:51 -0500 Original-To: Ludovic =?iso-8859-1?q?Court=E8s?= User-Agent: KMail/1.7.1 In-Reply-To: <8764qbuawp.fsf@laas.fr> Content-Disposition: inline X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5425 Archived-At: On Tuesday 29 November 2005 12:16 am, Ludovic Court=E8s wrote: > Hi, >=20 > Bruce Korb writes: >=20 > > 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=20 > > number. >=20 > 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 =3D "(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 =3D scm_c_eval_string( buf ); Would that work? Your help is _surely_ appreciated!! Thank you. Kind regards, Bruce _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel