bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43439: [PATCH] doprnt improvements


From: Paul Eggert
Subject: bug#43439: [PATCH] doprnt improvements
Date: Thu, 15 Oct 2020 10:58:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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.

Attachment: 0001-New-function-evsnprintf-to-speed-clean-up-doprnt.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]