From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Lisp reader bug Date: Fri, 04 Apr 2003 17:53:39 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200304041124.UAA08985@etlken.m17n.org> <5xwuiab37d.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1049472044 21573 80.91.224.249 (4 Apr 2003 16:00:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 4 Apr 2003 16:00:44 +0000 (UTC) Cc: Kenichi Handa Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 04 18:00:39 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 191Tbq-0005aC-00 for ; Fri, 04 Apr 2003 18:00:06 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 191Tdx-0002T2-00 for ; Fri, 04 Apr 2003 18:02:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 191Taa-0005Np-05 for emacs-devel@quimby.gnus.org; Fri, 04 Apr 2003 10:58:48 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 191TZB-0004dP-00 for emacs-devel@gnu.org; Fri, 04 Apr 2003 10:57:21 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 191TWF-0002DQ-00 for emacs-devel@gnu.org; Fri, 04 Apr 2003 10:54:19 -0500 Original-Received: from ns.suse.de ([213.95.15.193] helo=Cantor.suse.de) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 191TVe-0001yR-00 for emacs-devel@gnu.org; Fri, 04 Apr 2003 10:53:42 -0500 Original-Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id B868714AC8; Fri, 4 Apr 2003 17:53:41 +0200 (MEST) Original-To: storm@cua.dk (Kim F. Storm) X-Yow: QUIET!! I'm being CREATIVE!! Is it GREAT yet? It's s'posed to SMOKEY THE BEAR... In-Reply-To: <5xwuiab37d.fsf@kfs2.cua.dk> (Kim F. Storm's message of "04 Apr 2003 19:08:22 +0200") User-Agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.3.50 (gnu/linux) Original-cc: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12900 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12900 storm@cua.dk (Kim F. Storm) writes: |> Kenichi Handa writes: |> |> > Emacs of CVS HEAD has a bug in Lisp reader. For instance, |> > |> > (read (format "'%c" (decode-char 'ucs #x102))) |> > => (quote ) |> > |> > I'm not sure, but perhaps this change is the cause. |> > |> > 2003-02-18 Kim F. Storm |> > |> > * lread.c (read1): Fix last change. |> > "`" is not always special. Allow "?" after a character constant. |> > |> > This change adds codes something like this (total 4 places): |> > |> > || index ("\"';([#?", next_next_char) |> > |> > but, it seems that `index' doesn't work well if the second |> > arg is greater than 0xFF. Actually, if I change such lines |> > to: |> > |> > || (next_next_char < 0x100 && index ("\"';([#?", next_next_char)) |> > |> > the bug disappears. |> > |> > Kim, could you take a look at this problem? |> |> I'm not aware of that limitation in `index' (it is not documented), The POSIX standard says that index shall be equivalen to strchr, and the C standard says that strchr converts its second argument to char before the comparison. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."