1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 09:27:59 +00:00

Remove some redundant utility macros.

ATOFFSET in dialog.h became obsolete when the old 'struct Config' gave
way to the new Conf, because its only use was to identify fields in
struct Config for the generic control handlers to update.

And lenof in ssh.h is redundant because there's also a copy in misc.h.
(Which is already included _everywhere_ that lenof is used - I didn't
even need to add any instances of #include "misc.h" after removing the
copy in ssh.h.)
This commit is contained in:
Simon Tatham 2018-09-13 12:33:26 +01:00
parent 08b43c0cca
commit fc375c0b6a
2 changed files with 0 additions and 13 deletions

View File

@ -2,12 +2,6 @@
* Exports and types from dialog.c.
*/
/*
* This will come in handy for generic control handlers. Anyone
* knows how to make this more portable, let me know :-)
*/
#define ATOFFSET(data, offset) ( (void *) ( (char *)(data) + (offset) ) )
/*
* This is the big union which defines a single control, of any
* type.

7
ssh.h
View File

@ -190,13 +190,6 @@ void share_setup_x11_channel(ssh_sharing_connstate *cs, share_channel *chan,
Frontend *ssh_get_frontend(Ssh ssh);
/*
* Useful thing.
*/
#ifndef lenof
#define lenof(x) ( (sizeof((x))) / (sizeof(*(x))))
#endif
#define SSH_CIPHER_IDEA 1
#define SSH_CIPHER_DES 2
#define SSH_CIPHER_3DES 3