mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 18:07:59 +00:00
14203bc54f
If the function name (or expression) in a function call or declaration is itself so long that even the first argument doesn't fit after it on the same line, or if that would leave so little space that it would be silly to try to wrap all the run-on lines into a tall thin column, then I used to do this ludicrously_long_function_name (arg1, arg2, arg3); and now prefer this ludicrously_long_function_name( arg1, arg2, arg3); I picked up the habit from Python, where the latter idiom is required by Python's syntactic significance of newlines (you can write the former if you use a backslash-continuation, but pretty much everyone seems to agree that that's much uglier). But I've found it works well in C as well: it makes it more obvious that the previous line is incomplete, it gives you a tiny bit more space to wrap the following lines into (the old idiom indents the _third_ line one space beyond the second), and I generally turn out to agree with the knock-on indentation decisions made by at least Emacs if you do it in the middle of a complex expression. Plus, of course, using the _same_ idiom between C and Python means less state-switching. So, while I'm making annoying indentation changes in general, this seems like a good time to dig out all the cases of the old idiom in this code, and switch them over to the new. |
||
---|---|---|
.. | ||
agent_mutex_name.c | ||
agent_named_pipe_name.c | ||
arm_arch_queries.c | ||
aux_match_opt.c | ||
centre_window.c | ||
cryptoapi.c | ||
defaults.c | ||
dll_hijacking_protection.c | ||
dputs.c | ||
escape_registry_key.c | ||
filename.c | ||
fontspec.c | ||
get_system_dir.c | ||
get_username.c | ||
getdlgitemtext_alloc.c | ||
interprocess_mutex.c | ||
is_console_handle.c | ||
load_system32_dll.c | ||
ltime.c | ||
make_spr_sw_abort_winerror.c | ||
makedlgitemborderless.c | ||
message_box.c | ||
minefield.c | ||
open_for_write_would_lose_data.c | ||
pgp_fingerprints_msgbox.c | ||
platform_get_x_display.c | ||
registry.c | ||
request_file.c | ||
screenshot.c | ||
security.c | ||
shinydialogbox.c | ||
split_into_argv.c | ||
strtoumax.c | ||
version.c | ||
win_strerror.c |