GNU bug report logs - #43439
[PATCH] doprnt improvements

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Wed, 16 Sep 2020 01:52:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 43439 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 43439 <at> debbugs.gnu.org
Subject: Re: bug#43439: [PATCH] doprnt improvements
Date: Thu, 15 Oct 2020 10:58:49 -0700
[Message part 1 (text/plain, inline)]
On 9/18/20 12:30 AM, Eli Zaretskii wrote:

> How about ... we modify doprint to exit when either it finds
> NUL or reaches the character specified by FORMAT_END?  This will allow
> us to keep some of the feature, and I think the amount of changes will
> be smaller.  It should also not be much slower than what you propose.

Better yet, let's leave doprnt's API unchanged, and add a function evsnprintf 
(named by analogy from esprintf) whose API is like C vsnprintf but which does 
formatting the Emacs way. We can avoid duplication of code by implementing 
doprnt in terms of evsnprintf. This fixes the performance issue with current 
Emacs, and avoids the need for evsnprintf having to check for both NULs and 
FORMAT_END etc. Updated patch attached.
[0001-New-function-evsnprintf-to-speed-clean-up-doprnt.patch (text/x-patch, attachment)]

This bug report was last modified 4 years and 208 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.