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: I don't want to maintain this Date: Sun, 27 Nov 2005 20:27:14 -0800 Organization: GNU Message-ID: <200511272027.14818.bkorb@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1133152076 27848 80.91.229.2 (28 Nov 2005 04:27:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Nov 2005 04:27:56 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Nov 28 05:27:48 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Egabt-0006E4-LR for guile-devel@m.gmane.org; Mon, 28 Nov 2005 05:27:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Egabt-0002pC-2G for guile-devel@m.gmane.org; Sun, 27 Nov 2005 23:27:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Egabm-0002oC-Ru for guile-devel@gnu.org; Sun, 27 Nov 2005 23:27:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Egabm-0002nf-9b for guile-devel@gnu.org; Sun, 27 Nov 2005 23:27:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Egabm-0002nc-7H for guile-devel@gnu.org; Sun, 27 Nov 2005 23:27:18 -0500 Original-Received: from [207.115.57.60] (helo=ylpvm29.prodigy.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Egabm-0007aE-81 for guile-devel@gnu.org; Sun, 27 Nov 2005 23:27:18 -0500 Original-Received: from pimout3-ext.prodigy.net (pimout3-int.prodigy.net [207.115.4.218]) by ylpvm29.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id jAS4RUto030214 for ; Sun, 27 Nov 2005 23:27:30 -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 pimout3-ext.prodigy.net (8.13.4 outbound domainkey aix/8.13.4) with ESMTP id jAS4RGxF178168 for ; Sun, 27 Nov 2005 23:27:16 -0500 User-Agent: KMail/1.7.1 Original-To: guile-devel@gnu.org 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:5422 Archived-At: Hi all, The following function is disliked by me and disliked by Guile 1.7. It is a PITA to maintain, but it is compulsory until there is equivalent functionality available. It is crucially important that error messages point to the source file where the problem lies. More and more installations seem to have 1.7, but I still deal with 1.4. So, I use stuff like SCM_ROCHARS, except that it has been completely removed from the interface leaving me with hard errors. I've spent a day and a half trying to fix this stuff and it is very resistant to being fixed. 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. This is "The Right Way" for the interface and "The Wrong Way" for me. Can you please add this (or something similar) to your interface and reinstate SCM_ROCHARS et al. please? Thank you. Regards, Bruce SCM ag_scm_c_eval_string_from_file_line( tCC* pzExpr, tCC* pzFile, int line ) { SCM port; if (OPT_VALUE_TRACE >= TRACE_EVERYTHING) { fprintf( pfTrace, "eval from file %s line %d:\n%s\n", pzFile, line, pzExpr ); } { tSCC zEx[] = "eval-string-from-file-line"; SCM expr = scm_makfrom0str( pzExpr ); port = scm_mkstrport( SCM_INUM0, expr, SCM_OPN | SCM_RDNG, zEx ); } { static SCM file = SCM_UNDEFINED; scm_t_port* pt; if ( (file == SCM_UNDEFINED) || (strcmp( SCM_CHARS( file ), pzFile ) != 0) ) file = scm_makfrom0str( pzFile ); pt = SCM_PTAB_ENTRY(port); pt->line_number = line - 1; pt->file_name = file; } { SCM ans = SCM_UNSPECIFIED; /* Read expressions from that port; ignore the values. */ for (;;) { SCM form = scm_read( port ); if (SCM_EOF_OBJECT_P( form )) break; ans = scm_primitive_eval_x( form ); } return ans; } } P.S. Speaking of error messages: $ autogen --trace=every --trace-out=trace.log -L../autoopts opts.def ERROR: In procedure inexact?: ERROR: Wrong type argument in position 1: # Some deprecated features have been used. Set the environment variable GUILE_WARN_DEPRECATED to "detailed" and rerun the program to get more information. Set it to "no" to suppress this message. Scheme evaluation error. AutoGen ABEND-ing in template options on line 86 ============== trace.log ==================== == See the entry for "options line 86", below. == "suffix", "count", "dne" and "exist?" are all functions legally defined == and this all works with Guile 1.6. If I *ONLY* had a clue about what == was being said above ``In procedure inexact?:'' and == ``#''. It is just so nebulous. == eval from file options line 19: (define have-cb-procs (make-hash-table 31)) eval from file options line 20: (define is-ext-cb-proc (make-hash-table 31)) eval from file options line 21: (define cb-proc-name (make-hash-table 31)) eval from file options line 22: (define test-proc-name (make-hash-table 31)) eval from file options line 23: (define disable-name (make-hash-table 31)) eval from file options line 24: (define disable-prefix (make-hash-table 31)) eval from file options line 25: (define ifdef-ed (make-hash-table 31)) eval from file options line 26: (define extract-fmt "\n/* extracted from %s near line %d */\n") eval from file options line 28: (setenv "SHELL" "/bin/sh") Starting h template EXPR ( B) in options at line 78 eval from file options line 78: (dne " * " "/* ") Text (11) in options at line 78 CASE ( 1) in options at line 82 eval from file options line 82: (suffix) CASE string `h' COMPARE_FULL matched `h' EXPR ( B) in options at line 86 eval from file options line 86: (if (not (exist? "flag.name")) (error "No options have been defined" )) (if (> (count "flag") 100) (error (sprintf "%d options are too many - limit of 100" (count "flag")) )) eval from file autogen.c line 213: (if (> (string-length shell-cleanup) 0) (shell shell-cleanup) ) ------------------------------------------------------- _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel