From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: Re: Gnus crash Date: Mon, 20 Jan 2003 09:19:11 +0900 (JST) Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200301200019.JAA16129@etlken.m17n.org> References: <200301170220.LAA12538@etlken.m17n.org> NNTP-Posting-Host: main.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 1043022149 21433 80.91.224.249 (20 Jan 2003 00:22:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 20 Jan 2003 00:22:29 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18aPhs-0005ZY-00 for ; Mon, 20 Jan 2003 01:22:28 +0100 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 18aPgQ-0002Ip-02 for gnu-bug-gnu-emacs@m.gmane.org; Sun, 19 Jan 2003 19:20:58 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18aPfk-0001kq-00 for bug-gnu-emacs@gnu.org; Sun, 19 Jan 2003 19:20:16 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18aPf6-0000OW-00 for bug-gnu-emacs@gnu.org; Sun, 19 Jan 2003 19:19:37 -0500 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18aPeq-0008M4-00 for bug-gnu-emacs@gnu.org; Sun, 19 Jan 2003 19:19:20 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h0K0JCk15652; Mon, 20 Jan 2003 09:19:13 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h0K0JBR00876; Mon, 20 Jan 2003 09:19:11 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id JAA16129; Mon, 20 Jan 2003 09:19:11 +0900 (JST) Original-To: emufer@terra.es In-reply-to: (emufer@terra.es) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4256 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4256 In article , "Eduardo =?iso-8859-1?q?Mu=F1oz?=" writes: > Kenichi Handa writes: >> Thank you for the report. This bug was already fixed in the >> CVS HEAD by the attached patch. Eduardo, could you please >> try the attached patch? > I only have emacs-21.2 source here and the patch doesn't > match the file editfns.c. Strange. The patch should be applied to 21.2 source too. Anyway, I made a new patch for 21.2. Please try again. > Would be helpfull to download and build the current CVS > version of emacs? It will be helpfull, but please note that it contains lots of new features that are not yet fully tested. --- Ken'ichi HANDA handa@m17n.org --- editfns.c.orig Thu Mar 14 04:52:17 2002 +++ editfns.c Mon Jan 20 09:11:03 2003 @@ -3169,6 +3169,7 @@ if (*format++ == '%') { int thissize = 0; + int actual_width = 0; unsigned char *this_format_start = format - 1; int field_width, precision; @@ -3249,6 +3250,7 @@ if (*format != 's' && *format != 'S') error ("Format specifier doesn't match argument type"); thissize = CONVERTED_BYTE_SIZE (multibyte, args[n]); + actual_width = lisp_string_width (args[n], -1, NULL, NULL); } /* Would get MPV otherwise, since Lisp_Int's `point' to low memory. */ else if (INTEGERP (args[n]) && *format != 's') @@ -3302,7 +3304,7 @@ goto string; } - thissize = max (field_width, thissize); + thissize += max (0, field_width - actual_width); total += thissize + 4; }