mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 11:32:48 -05:00
Formatting: normalise back to 4-space indentation.
In several pieces of development recently I've run across the occasional code block in the middle of a function which suddenly switched to 2-space indent from this code base's usual 4. I decided I was tired of it, so I ran the whole code base through a re-indenter, which made a huge mess, and then manually sifted out the changes that actually made sense from that pass. Indeed, this caught quite a few large sections with 2-space indent level, a couple with 8, and a handful of even weirder things like 3 spaces or 12. This commit fixes them all.
This commit is contained in:
@ -431,8 +431,8 @@ static SeatPromptResult sshproxy_confirm_ssh_host_key(
|
||||
}
|
||||
|
||||
static SeatPromptResult sshproxy_confirm_weak_crypto_primitive(
|
||||
Seat *seat, const char *algtype, const char *algname,
|
||||
void (*callback)(void *ctx, SeatPromptResult result), void *ctx)
|
||||
Seat *seat, const char *algtype, const char *algname,
|
||||
void (*callback)(void *ctx, SeatPromptResult result), void *ctx)
|
||||
{
|
||||
SshProxy *sp = container_of(seat, SshProxy, seat);
|
||||
|
||||
@ -457,8 +457,8 @@ static SeatPromptResult sshproxy_confirm_weak_crypto_primitive(
|
||||
}
|
||||
|
||||
static SeatPromptResult sshproxy_confirm_weak_cached_hostkey(
|
||||
Seat *seat, const char *algname, const char *betteralgs,
|
||||
void (*callback)(void *ctx, SeatPromptResult result), void *ctx)
|
||||
Seat *seat, const char *algname, const char *betteralgs,
|
||||
void (*callback)(void *ctx, SeatPromptResult result), void *ctx)
|
||||
{
|
||||
SshProxy *sp = container_of(seat, SshProxy, seat);
|
||||
|
||||
|
@ -85,31 +85,31 @@ char *format_telnet_command(SockAddr *addr, int port, Conf *conf,
|
||||
int i = 0;
|
||||
|
||||
for (;;) {
|
||||
eo++;
|
||||
if (fmt[eo] >= '0' && fmt[eo] <= '9')
|
||||
v += fmt[eo] - '0';
|
||||
else if (fmt[eo] >= 'a' && fmt[eo] <= 'f')
|
||||
v += fmt[eo] - 'a' + 10;
|
||||
else if (fmt[eo] >= 'A' && fmt[eo] <= 'F')
|
||||
v += fmt[eo] - 'A' + 10;
|
||||
else {
|
||||
/* non hex character, so we abort and just
|
||||
* send the whole thing unescaped (including \x)
|
||||
*/
|
||||
put_byte(buf, '\\');
|
||||
eo = so + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
/* we only extract two hex characters */
|
||||
if (i == 1) {
|
||||
put_byte(buf, v);
|
||||
eo++;
|
||||
break;
|
||||
}
|
||||
if (fmt[eo] >= '0' && fmt[eo] <= '9')
|
||||
v += fmt[eo] - '0';
|
||||
else if (fmt[eo] >= 'a' && fmt[eo] <= 'f')
|
||||
v += fmt[eo] - 'a' + 10;
|
||||
else if (fmt[eo] >= 'A' && fmt[eo] <= 'F')
|
||||
v += fmt[eo] - 'A' + 10;
|
||||
else {
|
||||
/* non hex character, so we abort and just
|
||||
* send the whole thing unescaped (including \x)
|
||||
*/
|
||||
put_byte(buf, '\\');
|
||||
eo = so + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
i++;
|
||||
v <<= 4;
|
||||
/* we only extract two hex characters */
|
||||
if (i == 1) {
|
||||
put_byte(buf, v);
|
||||
eo++;
|
||||
break;
|
||||
}
|
||||
|
||||
i++;
|
||||
v <<= 4;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user