mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Formatting: normalise to put a space after condition keywords.
'if (thing)' is the local style here, not 'if(thing)'. Similarly with 'for' and 'while'.
This commit is contained in:
@ -254,7 +254,7 @@ int read_dupsession_data(Conf *conf, char *arg)
|
||||
}
|
||||
|
||||
static void help(FILE *fp) {
|
||||
if(fprintf(fp,
|
||||
if (fprintf(fp,
|
||||
"pterm option summary:\n"
|
||||
"\n"
|
||||
" --display DISPLAY Specify X display to use (note '--')\n"
|
||||
@ -282,8 +282,8 @@ static void help(FILE *fp) {
|
||||
|
||||
static void version(FILE *fp) {
|
||||
char *buildinfo_text = buildinfo("\n");
|
||||
if(fprintf(fp, "%s: %s\n%s\n", appname, ver, buildinfo_text) < 0 ||
|
||||
fflush(fp) < 0) {
|
||||
if (fprintf(fp, "%s: %s\n%s\n", appname, ver, buildinfo_text) < 0 ||
|
||||
fflush(fp) < 0) {
|
||||
perror("output error");
|
||||
exit(1);
|
||||
}
|
||||
@ -520,11 +520,11 @@ bool do_cmdline(int argc, char **argv, bool do_everything, Conf *conf)
|
||||
EXPECTS_ARG;
|
||||
provide_xrm_string(val, appname);
|
||||
|
||||
} else if(!strcmp(p, "-help") || !strcmp(p, "--help")) {
|
||||
} else if (!strcmp(p, "-help") || !strcmp(p, "--help")) {
|
||||
help(stdout);
|
||||
exit(0);
|
||||
|
||||
} else if(!strcmp(p, "-version") || !strcmp(p, "--version")) {
|
||||
} else if (!strcmp(p, "-version") || !strcmp(p, "--version")) {
|
||||
version(stdout);
|
||||
exit(0);
|
||||
|
||||
|
@ -149,7 +149,7 @@ static char *plink_get_ttymode(Seat *seat, const char *mode)
|
||||
do { \
|
||||
if (strcmp(mode, ourname) == 0) \
|
||||
return get_ttychar(&orig_termios, uxname); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
#define GET_BOOL(ourname, uxname, uxmemb, transform) \
|
||||
do { \
|
||||
if (strcmp(mode, ourname) == 0) { \
|
||||
|
@ -14,7 +14,7 @@ void block_signal(int sig, bool block_it)
|
||||
|
||||
sigemptyset(&ss);
|
||||
sigaddset(&ss, sig);
|
||||
if(sigprocmask(block_it ? SIG_BLOCK : SIG_UNBLOCK, &ss, 0) < 0) {
|
||||
if (sigprocmask(block_it ? SIG_BLOCK : SIG_UNBLOCK, &ss, 0) < 0) {
|
||||
perror("sigprocmask");
|
||||
exit(1);
|
||||
}
|
||||
|
@ -21,10 +21,10 @@ void (*putty_signal(int sig, void (*func)(int)))(int)
|
||||
struct sigaction old;
|
||||
|
||||
sa.sa_handler = func;
|
||||
if(sigemptyset(&sa.sa_mask) < 0)
|
||||
if (sigemptyset(&sa.sa_mask) < 0)
|
||||
return SIG_ERR;
|
||||
sa.sa_flags = SA_RESTART;
|
||||
if(sigaction(sig, &sa, &old) < 0)
|
||||
if (sigaction(sig, &sa, &old) < 0)
|
||||
return SIG_ERR;
|
||||
return old.sa_handler;
|
||||
}
|
||||
|
Reference in New Issue
Block a user