From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.lisp.guile.bugs Subject: another symbol-printing fix Date: Mon, 01 Dec 2003 19:45:40 -0500 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary_(ID_uXfWGFG/Z4Pl0fmAajFtiw)" X-Trace: sea.gmane.org 1070337304 17745 80.91.224.253 (2 Dec 2003 03:55:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2003 03:55:04 +0000 (UTC) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Dec 02 04:55:01 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AR1cr-0001Pp-00 for ; Tue, 02 Dec 2003 04:55:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AR2Yw-0006j8-2P for guile-bugs@m.gmane.org; Mon, 01 Dec 2003 23:55:02 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AR0ut-0007cg-RE for bug-guile@gnu.org; Mon, 01 Dec 2003 22:09:35 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AR03M-0007am-Fn for bug-guile@gnu.org; Mon, 01 Dec 2003 21:14:47 -0500 Original-Received: from [129.22.104.62] (helo=lewis.CNS.CWRU.Edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AQzdG-0003dq-I6 for bug-guile@gnu.org; Mon, 01 Dec 2003 20:47:18 -0500 Original-Received: from conversion-daemon.smtp-b.cwru.edu by smtp-b.cwru.edu (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) id <0HP800201SR1S2@smtp-b.cwru.edu> for bug-guile@gnu.org; Mon, 01 Dec 2003 19:45:41 -0500 (EST) Original-Received: from multivac.cwru.edu (multivac.ITS.CWRU.Edu [129.22.114.26]) by smtp-b.cwru.edu (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with SMTP id <0HP8000SSSS5U5@smtp-b.cwru.edu> for bug-guile@gnu.org; Mon, 01 Dec 2003 19:45:41 -0500 (EST) Original-Received: (qmail 28576 invoked by uid 500); Tue, 02 Dec 2003 00:46:03 +0000 Original-To: bug-guile@gnu.org Mail-followup-to: bug-guile@gnu.org Mail-Copies-To: nobody User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) Original-Lines: 16 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GUILE, GNU's Ubiquitous Extension Language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.bugs:1014 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:1014 --Boundary_(ID_uXfWGFG/Z4Pl0fmAajFtiw) Content-type: TEXT/PLAIN Content-transfer-encoding: 7BIT Squashing more bugs for weird symbol names. * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#, and #{.}# specially. This is still not complete, though. There are still problem cases like #{0.0}#, #{-i}#, etc. Rather than trying to duplicate all the number-detection logic from scm_lreadr, maybe it would be best to handle just the few non-numeric special cases, and then try scm_i_mem2number(); if that returns non-#f, treat the symbol name as weird. I'll work on a patch. paul --Boundary_(ID_uXfWGFG/Z4Pl0fmAajFtiw) Content-type: text/x-patch; NAME=print-symbol-special.patch Content-transfer-encoding: 7BIT Content-disposition: attachment; filename=print-symbol-special.patch Index: guile-core/libguile/print.c =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/print.c,v retrieving revision 1.157 diff -u -r1.157 print.c --- guile-core/libguile/print.c 30 Nov 2003 00:57:14 -0000 1.157 +++ guile-core/libguile/print.c 2 Dec 2003 00:39:33 -0000 @@ -324,7 +324,8 @@ * name we've looked at so far. */ int all_digits = 1; - if (len == 0 || str[0] == '\'' || str[0] == ':' || str[len-1] == ':') + if (len == 0 || str[0] == '\'' || str[0] == '`' || str[0] == ',' || + str[0] == ':' || str[len-1] == ':' || (str[0] == '.' && len == 1)) { scm_lfwrite ("#{", 2, port); weird = 1; --Boundary_(ID_uXfWGFG/Z4Pl0fmAajFtiw) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://mail.gnu.org/mailman/listinfo/bug-guile --Boundary_(ID_uXfWGFG/Z4Pl0fmAajFtiw)--