mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-05-28 23:34:49 -05:00

They were there to work around that annoying feature of VS's preprocessor when it expands __VA_ARGS__ into the argument list of another macro. But I've just thought of a workaround that I can apply in testcrypt.c itself, so that those parens don't have to appear in every function definition in the header file. The trick is, instead of writing destination_macro(__VA_ARGS__) you instead write JUXTAPOSE(destination_macro, (__VA_ARGS__)) where JUXTAPOSE is defined to be a macro that simply expands its two arguments next to each other: #define JUXTAPOSE(first, second) first second This works because the arguments to JUXTAPOSE get macro-expanded _before_ passing them to JUXTAPOSE itself - the same reason that the standard tricks with STR_INNER and CAT_INNER work (as seen in defs.h here). So this defuses the magic behaviour of commas expanded from __VA_ARGS__, and causes the destination macro to get all its arguments in the expected places again.
This is the README for PuTTY, a free Windows and Unix Telnet and SSH client. PuTTY is built using CMake <https://cmake.org/>. To compile in the simplest way (on any of Linux, Windows or Mac), run these commands in the source directory: cmake . cmake --build . Documentation (in various formats including Windows Help and Unix `man' pages) is built from the Halibut (`.but') files in the `doc' subdirectory using `doc/Makefile'. If you aren't using one of our source snapshots, you'll need to do this yourself. Halibut can be found at <https://www.chiark.greenend.org.uk/~sgtatham/halibut/>. The PuTTY home web site is https://www.chiark.greenend.org.uk/~sgtatham/putty/ If you want to send bug reports or feature requests, please read the Feedback section of the web site before doing so. Sending one-line reports saying `it doesn't work' will waste your time as much as ours. See the file LICENCE for the licence conditions.
Description
Languages
C
89.7%
Python
8%
Perl
0.9%
CMake
0.8%
Shell
0.4%
Other
0.1%