From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts Date: Sat, 09 Apr 2011 12:39:59 -0700 Organization: UCLA Computer Science Department Message-ID: <4DA0B60F.6010909@cs.ucla.edu> References: <4D9CC60D.2090301@cs.ucla.edu> <4D9D68D8.6060200@cs.ucla.edu> <8339ltvrok.fsf@gnu.org> <4D9E21FB.70802@cs.ucla.edu> <83vcypt8zf.fsf@gnu.org> <4D9F9B74.6050908@cs.ucla.edu> <83d3kvubzp.fsf@gnu.org> <4DA0A448.7000203@cs.ucla.edu> <83tye7s2cf.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1302379676 11352 80.91.229.12 (9 Apr 2011 20:07:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 9 Apr 2011 20:07:56 +0000 (UTC) Cc: 8435@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 09 22:07:52 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q8eRi-0003la-O7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Apr 2011 22:07:50 +0200 Original-Received: from localhost ([127.0.0.1]:33461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8eRi-0004zN-2m for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Apr 2011 16:07:50 -0400 Original-Received: from [140.186.70.92] (port=55366 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8eRE-0004g9-E2 for bug-gnu-emacs@gnu.org; Sat, 09 Apr 2011 16:07:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q8eRD-0004pD-Gn for bug-gnu-emacs@gnu.org; Sat, 09 Apr 2011 16:07:20 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q8eRD-0004p9-CZ for bug-gnu-emacs@gnu.org; Sat, 09 Apr 2011 16:07:19 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q8e1m-0002kI-DI; Sat, 09 Apr 2011 15:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Apr 2011 19:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8435 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8435-submit@debbugs.gnu.org id=B8435.130237800810489 (code B ref 8435); Sat, 09 Apr 2011 19:41:02 +0000 Original-Received: (at 8435) by debbugs.gnu.org; 9 Apr 2011 19:40:08 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q8e0t-0002j8-Bi for submit@debbugs.gnu.org; Sat, 09 Apr 2011 15:40:07 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q8e0r-0002ic-VI for 8435@debbugs.gnu.org; Sat, 09 Apr 2011 15:40:06 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 4946239E80F5; Sat, 9 Apr 2011 12:40:00 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l1tHaSnSuY+K; Sat, 9 Apr 2011 12:39:59 -0700 (PDT) Original-Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id E5E1539E80B1; Sat, 9 Apr 2011 12:39:59 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9 In-Reply-To: <83tye7s2cf.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 09 Apr 2011 15:41:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45718 Archived-At: On 04/09/2011 11:32 AM, Eli Zaretskii wrote: > I don't think line count is a compelling argument in favor of the > change. It's certainly good evidence that the change will simplify Emacs maintainance overall. It's not often that we can fix multiple bugs like this by removing over 250 lines of source code. > we now have to solve those problems in users of that function Yes, that's a disadvantage, but it's a minor one; only a 17 lines of code are affected. And there is a real advantage to sticking with a stable, widely-used standard interface like vsnprintf, as this makes it easier on code readers who are not expert in Emacs internals. As Emacs evolves, if we find that more lines of code are affected, then the tradeoffs will change. If that happens, it shouldn't be hard to come up with a doprnt replacement that uses vsnprintf internally and that also handles multibyte character truncation and non-8-bit codepoints. But given Emacs's current use of doprnt, this would be overkill and would add complexity: it would save 17 lines in doprnt's callers but require considerably more than 17 lines to implement.