From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: struct.el -- a package to encode/decode binary data Date: Fri, 22 Mar 2002 10:25:39 +0900 (JST) Sender: emacs-devel-admin@gnu.org Message-ID: <200203220125.KAA09137@etlken.m17n.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1016760472 15293 127.0.0.1 (22 Mar 2002 01:27:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 22 Mar 2002 01:27:52 +0000 (UTC) Cc: eliz@is.elta.co.il, monnier+gnu/emacs@RUM.cs.yale.edu, storm@cua.dk, emacs-devel@gnu.org Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16oDqS-0003yY-00 for ; Fri, 22 Mar 2002 02:27:52 +0100 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16oDwu-0004Zr-00 for ; Fri, 22 Mar 2002 02:34:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16oDqJ-0000gm-00; Thu, 21 Mar 2002 20:27:43 -0500 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 16oDoP-0000ZM-00 for ; Thu, 21 Mar 2002 20:25:45 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6/3.7W-20010518204228) with ESMTP id g2M1Pdw25282; Fri, 22 Mar 2002 10:25:39 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.3/3.7W-20010823150639) with ESMTP id g2M1PdM10925; Fri, 22 Mar 2002 10:25:39 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id KAA09137; Fri, 22 Mar 2002 10:25:39 +0900 (JST) Original-To: monnier+gnu/emacs@RUM.cs.yale.edu In-Reply-To: "monnier+gnu/emacs@RUM.cs.yale.edu"'s message of Thu, 21 Mar 2002 20:05:09 -0500 User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.1.30 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2111 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2111 "Stefan Monnier" writes: > But now that I think about it, if 160-255 can be an eight-bit-graphic > character, how does the code does with "backward-char" ? > Looking at DEC_POS in charset.h I see that we do > while (p > p_min && !CHAR_HEAD_P (*p)) p--; Please don't skip the following four lines: len = pend + 1 - p; \ PARSE_MULTIBYTE_SEQ (p, len, bytes); \ if (bytes == len) \ pos_byte -= len - 1; \ which handles the above case. When we at last reach a char-head, PARSE_MULTIBYTE_SEQ checks how long the byte sequence should be. We update pos_byte only if the length is the same as what we decreased. --- Ken'ichi HANDA handa@etl.go.jp _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel