simon-git: putty (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun Jan 26 11:50:38 GMT 2025
TL;DR:
05a13d5c GetDlgItemText_alloc: avoid realloc loop.
da8241cf Remove test for, and fallback impl of, wmemchr.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2025-01-26 11:50:38
commit 05a13d5cf7bfb2422a85e7b8350192d201e2f89a
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=05a13d5cf7bfb2422a85e7b8350192d201e2f89a;hp=520fd3d8207b2f5327ff42d09a0a5fcce88acf05
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Jan 25 11:09:15 2025 +0000
GetDlgItemText_alloc: avoid realloc loop.
This rewrite, due to SATO Kentaro, uses GetWindowTextLength (which I
hadn't known about) to find the correct size to allocate the buffer
the first time, avoiding the need to keep growing it until a call to
GetDlgItemText doesn't have to truncate the result.
windows/utils/getdlgitemtext_alloc.c | 28 ++++++++++------------------
1 file changed, 10 insertions(+), 18 deletions(-)
commit da8241cff67d36e866efddc89ebc085bdb86c4d3
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=da8241cff67d36e866efddc89ebc085bdb86c4d3;hp=05a13d5cf7bfb2422a85e7b8350192d201e2f89a
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Jan 26 11:41:36 2025 +0000
Remove test for, and fallback impl of, wmemchr.
This was introduced in commit e7acb9f6968d482, as a side effect of
also wanting to call wmemchr to find a NUL wide character in the
buffer returned from GetDlgItemTextW. But the previous commit has
superseded that code, so now we don't use wmemchr in this code base
any more. Remove the machinery that provides it, saving a now-useless
cmake configure-time check.
cmake/cmake.h.in | 1 -
cmake/platforms/windows.cmake | 1 -
defs.h | 5 -----
windows/CMakeLists.txt | 3 ---
windows/utils/wmemchr.c | 15 ---------------
5 files changed, 25 deletions(-)
More information about the tartarus-commits
mailing list