mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
e0a76971cc
The idea of these is that they centralise the common idiom along the lines of if (logical_array_len >= physical_array_size) { physical_array_size = logical_array_len * 5 / 4 + 256; array = sresize(array, physical_array_size, ElementType); } which happens at a zillion call sites throughout this code base, with different random choices of the geometric factor and additive constant, sometimes forgetting them completely, and generally doing a lot of repeated work. The new macro sgrowarray(array,size,n) has the semantics: here are the array pointer and its physical size for you to modify, now please ensure that the nth element exists, so I can write into it. And sgrowarrayn(array,size,n,m) is the same except that it ensures that the array has size at least n+m (so sgrowarray is just the special case where m=1). Now that this is a single centralised implementation that will be used everywhere, I've also gone to more effort in the implementation, with careful overflow checks that would have been painful to put at all the previous call sites. This commit also switches over every use of sresize(), apart from a few where I really didn't think it would gain anything. A consequence of that is that a lot of array-size variables have to have their types changed to size_t, because the macros require that (they address-take the size to pass to the underlying function). |
||
---|---|---|
.. | ||
installer.wxs | ||
msiplatform.py | ||
pageant.ico | ||
pageant.mft | ||
pageant.rc | ||
pageants.ico | ||
plink.rc | ||
pscp.ico | ||
pscp.rc | ||
psftp.rc | ||
putty.ico | ||
putty.iss | ||
putty.mft | ||
putty.rc | ||
puttycfg.ico | ||
puttygen.ico | ||
puttygen.mft | ||
puttygen.rc | ||
puttyins.ico | ||
puttytel.mft | ||
puttytel.rc | ||
rcstuff.h | ||
README-msi.txt | ||
README.txt | ||
sizetip.c | ||
version.rc2 | ||
website.url | ||
win_res.h | ||
win_res.rc2 | ||
wincapi.c | ||
wincapi.h | ||
wincfg.c | ||
wincons.c | ||
winctrls.c | ||
windefs.c | ||
windlg.c | ||
window.c | ||
wingss.c | ||
winhandl.c | ||
winhelp.c | ||
winhelp.h | ||
winhsock.c | ||
winjump.c | ||
winmisc.c | ||
winmiscs.c | ||
winnet.c | ||
winnoise.c | ||
winnojmp.c | ||
winnpc.c | ||
winnps.c | ||
winpgen.c | ||
winpgnt.c | ||
winpgntc.c | ||
winplink.c | ||
winprint.c | ||
winproxy.c | ||
winsecur.c | ||
winsecur.h | ||
winser.c | ||
winsftp.c | ||
winshare.c | ||
winstore.c | ||
winstuff.h | ||
wintime.c | ||
winucs.c | ||
winutils.c | ||
winx11.c |
PuTTY README ============ This is the README file for the PuTTY installer distribution. If you're reading this, you've probably just run our installer and installed PuTTY on your system. What should I do next? ---------------------- If you want to use PuTTY to connect to other computers, or use PSFTP to transfer files, you should just be able to run them from the Start menu. If you want to use the command-line-only file transfer utility PSCP, you will probably want to put the PuTTY installation directory on your PATH. On Windows 7 and similar versions, you can do this at Control Panel > System and Security > System > Advanced system settings > Environment Variables. Some versions of Windows will refuse to run HTML Help files (.CHM) if they are installed on a network drive. If you have installed PuTTY on a network drive, you might want to check that the help file works properly. If not, see http://support.microsoft.com/kb/896054 for information on how to solve this problem. What do I do if it doesn't work? -------------------------------- The PuTTY home web site is https://www.chiark.greenend.org.uk/~sgtatham/putty/ Here you will find our list of known bugs and pending feature requests. If your problem is not listed in there, or in the FAQ, or in the manuals, read the Feedback page to find out how to report bugs to us. PLEASE read the Feedback page carefully: it is there to save you time as well as us. Do not send us one-line bug reports telling us `it doesn't work'.