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:25:32 -0800 Organization: At Home Message-ID: <200511272025.32395.bruce.korb@gmail.com> 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 1133210411 16902 80.91.229.2 (28 Nov 2005 20:40:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Nov 2005 20:40:11 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Nov 28 21:39:59 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EgpkW-00066M-QN for guile-devel@m.gmane.org; Mon, 28 Nov 2005 21:37:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EgpkV-0001eL-Kt for guile-devel@m.gmane.org; Mon, 28 Nov 2005 15:37:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Egaa7-0002E0-Rx for guile-devel@gnu.org; Sun, 27 Nov 2005 23:25:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Egaa6-0002DV-Nb for guile-devel@gnu.org; Sun, 27 Nov 2005 23:25:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Egaa6-0002DQ-J9 for guile-devel@gnu.org; Sun, 27 Nov 2005 23:25:34 -0500 Original-Received: from [66.249.82.200] (helo=xproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Egaa6-0007Er-Hx for guile-devel@gnu.org; Sun, 27 Nov 2005 23:25:34 -0500 Original-Received: by xproxy.gmail.com with SMTP id s8so2323701wxc for ; Sun, 27 Nov 2005 20:25:33 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:organization:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=AlNTqd7d8e7+DsoQ8evRHpDro0EWDkEmQ5QAh9M7OrhJQKApv4v2dKxGn5YqmO4aqdEPoA/2EyqNaxqGrB0nQbXeZAN0kB5WWRrFo7eBHuaGokZhJTanS9fVF//xb14CUc3ViHxrCg4O1RT/OzyLPEYDlqCCKS5DfyeZGr6WF24= Original-Received: by 10.70.42.3 with SMTP id p3mr9611241wxp; Sun, 27 Nov 2005 20:25:33 -0800 (PST) Original-Received: from ?192.168.1.4? ( [69.226.209.231]) by mx.gmail.com with ESMTP id h11sm1940204wxd.2005.11.27.20.25.33; Sun, 27 Nov 2005 20:25:33 -0800 (PST) Original-To: guile-devel@gnu.org User-Agent: KMail/1.7.1 Content-Disposition: inline X-Mailman-Approved-At: Mon, 28 Nov 2005 15:37:13 -0500 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:5423 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