1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-31 10:42:50 -05:00

Formatting: remove spurious spaces in 'type * var'.

I think a lot of these were inserted by a prior run through GNU indent
many years ago. I noticed in a more recent experiment that that tool
doesn't always correctly distinguish which instances of 'id * id' are
pointer variable declarations and which are multiplications, so it
spaces some of the former as if they were the latter.
This commit is contained in:
Simon Tatham 2022-08-03 20:48:46 +01:00
parent 14203bc54f
commit 4b8dc56284
11 changed files with 52 additions and 52 deletions

View File

@ -234,7 +234,7 @@ static const uint32_t sbox3[] = {
#define ROUND(n) ( xL ^= P[n], t = xL, xL = F(xL) ^ xR, xR = t )
static void blowfish_encrypt(uint32_t xL, uint32_t xR, uint32_t *output,
BlowfishContext * ctx)
BlowfishContext *ctx)
{
uint32_t *S0 = ctx->S0;
uint32_t *S1 = ctx->S1;
@ -267,7 +267,7 @@ static void blowfish_encrypt(uint32_t xL, uint32_t xR, uint32_t *output,
}
static void blowfish_decrypt(uint32_t xL, uint32_t xR, uint32_t *output,
BlowfishContext * ctx)
BlowfishContext *ctx)
{
uint32_t *S0 = ctx->S0;
uint32_t *S1 = ctx->S1;
@ -300,7 +300,7 @@ static void blowfish_decrypt(uint32_t xL, uint32_t xR, uint32_t *output,
}
static void blowfish_lsb_encrypt_cbc(unsigned char *blk, int len,
BlowfishContext * ctx)
BlowfishContext *ctx)
{
uint32_t xL, xR, out[2], iv0, iv1;
@ -327,7 +327,7 @@ static void blowfish_lsb_encrypt_cbc(unsigned char *blk, int len,
ctx->iv1 = iv1;
}
void blowfish_lsb_encrypt_ecb(void *vblk, int len, BlowfishContext * ctx)
void blowfish_lsb_encrypt_ecb(void *vblk, int len, BlowfishContext *ctx)
{
unsigned char *blk = (unsigned char *)vblk;
uint32_t xL, xR, out[2];
@ -346,7 +346,7 @@ void blowfish_lsb_encrypt_ecb(void *vblk, int len, BlowfishContext * ctx)
}
static void blowfish_lsb_decrypt_cbc(unsigned char *blk, int len,
BlowfishContext * ctx)
BlowfishContext *ctx)
{
uint32_t xL, xR, out[2], iv0, iv1;
@ -374,7 +374,7 @@ static void blowfish_lsb_decrypt_cbc(unsigned char *blk, int len,
}
static void blowfish_msb_encrypt_cbc(unsigned char *blk, int len,
BlowfishContext * ctx)
BlowfishContext *ctx)
{
uint32_t xL, xR, out[2], iv0, iv1;
@ -402,7 +402,7 @@ static void blowfish_msb_encrypt_cbc(unsigned char *blk, int len,
}
static void blowfish_msb_decrypt_cbc(unsigned char *blk, int len,
BlowfishContext * ctx)
BlowfishContext *ctx)
{
uint32_t xL, xR, out[2], iv0, iv1;
@ -430,7 +430,7 @@ static void blowfish_msb_decrypt_cbc(unsigned char *blk, int len,
}
static void blowfish_msb_sdctr(unsigned char *blk, int len,
BlowfishContext * ctx)
BlowfishContext *ctx)
{
uint32_t b[2], iv0, iv1, tmp;
@ -471,7 +471,7 @@ void blowfish_initkey(BlowfishContext *ctx)
}
}
void blowfish_expandkey(BlowfishContext * ctx,
void blowfish_expandkey(BlowfishContext *ctx,
const void *vkey, short keybytes,
const void *vsalt, short saltbytes)
{

View File

@ -178,7 +178,7 @@ static void sk_proxy_set_frozen (Socket *s, bool is_frozen)
sk_set_frozen(ps->sub_socket, is_frozen);
}
static const char * sk_proxy_socket_error (Socket *s)
static const char *sk_proxy_socket_error (Socket *s)
{
ProxySocket *ps = container_of(s, ProxySocket, sock);
if (ps->error != NULL || ps->sub_socket == NULL) {

View File

@ -2209,7 +2209,7 @@ char *term_get_ttymode(Terminal *term, const char *mode);
SeatPromptResult term_get_userpass_input(Terminal *term, prompts_t *p);
void term_set_trust_status(Terminal *term, bool trusted);
void term_keyinput(Terminal *, int codepage, const void *buf, int len);
void term_keyinputw(Terminal *, const wchar_t * widebuf, int len);
void term_keyinputw(Terminal *, const wchar_t *widebuf, int len);
void term_get_cursor_position(Terminal *term, int *x, int *y);
void term_setup_window_titles(Terminal *term, const char *title_hostname);
void term_notify_minimised(Terminal *term, bool minimised);
@ -2478,7 +2478,7 @@ int check_compose(int first, int second);
int decode_codepage(const char *cp_name);
const char *cp_enumerate (int index);
const char *cp_name(int codepage);
void get_unitab(int codepage, wchar_t * unitab, int ftype);
void get_unitab(int codepage, wchar_t *unitab, int ftype);
/*
* Exports from wcwidth.c

View File

@ -53,9 +53,9 @@ typedef struct gss_channel_bindings_struct {
gss_buffer_desc application_data;
} *gss_channel_bindings_t;
typedef void * gss_ctx_id_t;
typedef void * gss_name_t;
typedef void * gss_cred_id_t;
typedef void *gss_ctx_id_t;
typedef void *gss_name_t;
typedef void *gss_cred_id_t;
typedef OM_uint32 gss_qop_t;
typedef int gss_cred_usage_t;

View File

@ -54,8 +54,8 @@ struct LZ77InternalContext;
struct LZ77Context {
struct LZ77InternalContext *ictx;
void *userdata;
void (*literal) (struct LZ77Context * ctx, unsigned char c);
void (*match) (struct LZ77Context * ctx, int distance, int len);
void (*literal) (struct LZ77Context *ctx, unsigned char c);
void (*match) (struct LZ77Context *ctx, int distance, int len);
};
/*

View File

@ -2341,7 +2341,7 @@ void term_provide_backend(Terminal *term, Backend *backend)
* If only the top line has content, returns 0.
* If no lines have content, return -1.
*/
static int find_last_nonempty_line(Terminal * term, tree234 * screen)
static int find_last_nonempty_line(Terminal *term, tree234 *screen)
{
int i;
for (i = count234(screen) - 1; i >= 0; i--) {

View File

@ -45,13 +45,13 @@ tree234 *newtree234(cmpfn234 cmp);
/*
* Free a 2-3-4 tree (not including freeing the elements).
*/
void freetree234(tree234 * t);
void freetree234(tree234 *t);
/*
* Add an element e to a sorted 2-3-4 tree t. Returns e on success,
* or if an existing element compares equal, returns that.
*/
void *add234(tree234 * t, void *e);
void *add234(tree234 *t, void *e);
/*
* Add an element e to an unsorted 2-3-4 tree t. Returns e on
@ -61,7 +61,7 @@ void *add234(tree234 * t, void *e);
* Index range can be from 0 to the tree's current element count,
* inclusive.
*/
void *addpos234(tree234 * t, void *e, int index);
void *addpos234(tree234 *t, void *e, int index);
/*
* Look up the element at a given numeric index in a 2-3-4 tree.
@ -81,7 +81,7 @@ void *addpos234(tree234 * t, void *e, int index);
* consume(p);
* }
*/
void *index234(tree234 * t, int index);
void *index234(tree234 *t, int index);
/*
* Find an element e in a sorted 2-3-4 tree t. Returns NULL if not
@ -126,10 +126,10 @@ void *index234(tree234 * t, int index);
enum {
REL234_EQ, REL234_LT, REL234_LE, REL234_GT, REL234_GE
};
void *find234(tree234 * t, void *e, cmpfn234 cmp);
void *findrel234(tree234 * t, void *e, cmpfn234 cmp, int relation);
void *findpos234(tree234 * t, void *e, cmpfn234 cmp, int *index);
void *findrelpos234(tree234 * t, void *e, cmpfn234 cmp, int relation,
void *find234(tree234 *t, void *e, cmpfn234 cmp);
void *findrel234(tree234 *t, void *e, cmpfn234 cmp, int relation);
void *findpos234(tree234 *t, void *e, cmpfn234 cmp, int *index);
void *findrelpos234(tree234 *t, void *e, cmpfn234 cmp, int relation,
int *index);
/*
@ -184,12 +184,12 @@ void search234_step(search234_state *state, int direction);
* is out of range (delpos234) or the element is already not in the
* tree (del234) then they return NULL.
*/
void *del234(tree234 * t, void *e);
void *delpos234(tree234 * t, int index);
void *del234(tree234 *t, void *e);
void *delpos234(tree234 *t, int index);
/*
* Return the total element count of a tree234.
*/
int count234(tree234 * t);
int count234(tree234 *t);
#endif /* TREE234_H */

View File

@ -73,7 +73,7 @@ tree234 *newtree234(cmpfn234 cmp)
/*
* Free a 2-3-4 tree (not including freeing the elements).
*/
static void freenode234(node234 * n)
static void freenode234(node234 *n)
{
if (!n)
return;
@ -84,7 +84,7 @@ static void freenode234(node234 * n)
sfree(n);
}
void freetree234(tree234 * t)
void freetree234(tree234 *t)
{
freenode234(t->root);
sfree(t);
@ -93,7 +93,7 @@ void freetree234(tree234 * t)
/*
* Internal function to count a node.
*/
static int countnode234(node234 * n)
static int countnode234(node234 *n)
{
int count = 0;
int i;
@ -122,7 +122,7 @@ static int elements234(node234 *n)
/*
* Count the elements in a tree.
*/
int count234(tree234 * t)
int count234(tree234 *t)
{
if (t->root)
return countnode234(t->root);
@ -134,7 +134,7 @@ int count234(tree234 * t)
* Add an element e to a 2-3-4 tree t. Returns e on success, or if
* an existing element compares equal, returns that.
*/
static void *add234_internal(tree234 * t, void *e, int index)
static void *add234_internal(tree234 *t, void *e, int index)
{
node234 *n, **np, *left, *right;
void *orig_e = e;
@ -463,14 +463,14 @@ static void *add234_internal(tree234 * t, void *e, int index)
return orig_e;
}
void *add234(tree234 * t, void *e)
void *add234(tree234 *t, void *e)
{
if (!t->cmp) /* tree is unsorted */
return NULL;
return add234_internal(t, e, -1);
}
void *addpos234(tree234 * t, void *e, int index)
void *addpos234(tree234 *t, void *e, int index)
{
if (index < 0 || /* index out of range */
t->cmp) /* tree is sorted */
@ -483,7 +483,7 @@ void *addpos234(tree234 * t, void *e, int index)
* Look up the element at a given numeric index in a 2-3-4 tree.
* Returns NULL if the index is out of range.
*/
void *index234(tree234 * t, int index)
void *index234(tree234 *t, int index)
{
node234 *n;
@ -523,7 +523,7 @@ void *index234(tree234 * t, int index)
* as NULL, in which case the compare function from the tree proper
* will be used.
*/
void *findrelpos234(tree234 * t, void *e, cmpfn234 cmp,
void *findrelpos234(tree234 *t, void *e, cmpfn234 cmp,
int relation, int *index)
{
search234_state ss;
@ -598,15 +598,15 @@ void *findrelpos234(tree234 * t, void *e, cmpfn234 cmp,
*index = ss.index;
return toret;
}
void *find234(tree234 * t, void *e, cmpfn234 cmp)
void *find234(tree234 *t, void *e, cmpfn234 cmp)
{
return findrelpos234(t, e, cmp, REL234_EQ, NULL);
}
void *findrel234(tree234 * t, void *e, cmpfn234 cmp, int relation)
void *findrel234(tree234 *t, void *e, cmpfn234 cmp, int relation)
{
return findrelpos234(t, e, cmp, relation, NULL);
}
void *findpos234(tree234 * t, void *e, cmpfn234 cmp, int *index)
void *findpos234(tree234 *t, void *e, cmpfn234 cmp, int *index)
{
return findrelpos234(t, e, cmp, REL234_EQ, index);
}
@ -686,7 +686,7 @@ void search234_step(search234_state *state, int direction)
* Delete an element e in a 2-3-4 tree. Does not free the element,
* merely removes all links to it from the tree nodes.
*/
static void *delpos234_internal(tree234 * t, int index)
static void *delpos234_internal(tree234 *t, int index)
{
node234 *n;
void *retval;
@ -1024,13 +1024,13 @@ static void *delpos234_internal(tree234 * t, int index)
}
}
}
void *delpos234(tree234 * t, int index)
void *delpos234(tree234 *t, int index)
{
if (index < 0 || index >= countnode234(t->root))
return NULL;
return delpos234_internal(t, index);
}
void *del234(tree234 * t, void *e)
void *del234(tree234 *t, void *e)
{
int index;
if (!findrelpos234(t, e, NULL, REL234_EQ, &index))
@ -1095,7 +1095,7 @@ typedef struct {
int elemcount;
} chkctx;
int chknode(chkctx * ctx, int level, node234 * node,
int chknode(chkctx *ctx, int level, node234 *node,
void *lowbound, void *highbound)
{
int nkids, nelems;

View File

@ -220,8 +220,8 @@ DECL_WINDOWS_FUNCTION(static, int, getaddrinfo,
const struct addrinfo *hints, struct addrinfo **res));
DECL_WINDOWS_FUNCTION(static, void, freeaddrinfo, (struct addrinfo *res));
DECL_WINDOWS_FUNCTION(static, int, getnameinfo,
(const struct sockaddr FAR * sa, socklen_t salen,
char FAR * host, DWORD hostlen, char FAR * serv,
(const struct sockaddr FAR *sa, socklen_t salen,
char FAR *host, DWORD hostlen, char FAR *serv,
DWORD servlen, int flags));
DECL_WINDOWS_FUNCTION(static, int, WSAAddressToStringA,
(LPSOCKADDR, DWORD, LPWSAPROTOCOL_INFO,

View File

@ -435,7 +435,7 @@ static const struct cp_list_item cp_list[] = {
{0, 0}
};
static void link_font(WCHAR * line_tbl, WCHAR * font_tbl, WCHAR attr);
static void link_font(WCHAR *line_tbl, WCHAR *font_tbl, WCHAR attr);
/*
* We keep a collection of reverse mappings from Unicode back to code pages,
@ -689,7 +689,7 @@ void init_ucs(Conf *conf, struct unicode_data *ucsdata)
}
}
static void link_font(WCHAR * line_tbl, WCHAR * font_tbl, WCHAR attr)
static void link_font(WCHAR *line_tbl, WCHAR *font_tbl, WCHAR attr)
{
int font_index, line_index, i;
for (line_index = 0; line_index < 256; line_index++) {
@ -1200,7 +1200,7 @@ const char *cp_enumerate(int index)
return cp_list[index].name;
}
void get_unitab(int codepage, wchar_t * unitab, int ftype)
void get_unitab(int codepage, wchar_t *unitab, int ftype)
{
char tbuf[4];
int i, max = 256, flg = MB_ERR_INVALID_CHARS;

View File

@ -122,7 +122,7 @@ static int prev_rows, prev_cols;
static void flash_window(int mode);
static void sys_cursor_update(void);
static bool get_fullscreen_rect(RECT * ss);
static bool get_fullscreen_rect(RECT *ss);
static int caret_x = -1, caret_y = -1;
@ -5743,7 +5743,7 @@ static bool is_full_screen()
/* Get the rect/size of a full screen window using the nearest available
* monitor in multimon systems; default to something sensible if only
* one monitor is present. */
static bool get_fullscreen_rect(RECT * ss)
static bool get_fullscreen_rect(RECT *ss)
{
#if defined(MONITOR_DEFAULTTONEAREST) && !defined(NO_MULTIMON)
if (p_GetMonitorInfoA && p_MonitorFromWindow) {