1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 11:32:48 -05:00

New header file 'defs.h'.

This centralises a few things that multiple header files were
previously defining, and were protecting against each other's
redefinition with ifdefs - small things like structs and typedefs. Now
all those things are in a defs.h which is by definition safe to
include _first_ (out of all the codebase-local headers) and only need
to be defined once.
This commit is contained in:
Simon Tatham
2018-05-24 08:59:01 +01:00
parent 58379aa5ab
commit 12b38ad9e1
7 changed files with 43 additions and 47 deletions

View File

@ -23,6 +23,8 @@
#include <stdint.h>
#endif
#include "defs.h"
#include "tree234.h"
#include "winhelp.h"
@ -132,8 +134,6 @@ struct FontSpec *fontspec_new(const char *name,
*
* (DECL_WINDOWS_FUNCTION works with both these variants.)
*/
#define TYPECHECK(to_check, to_return) \
(sizeof(to_check) ? to_return : to_return)
#define DECL_WINDOWS_FUNCTION(linkage, rettype, name, params) \
typedef rettype (WINAPI *t_##name) params; \
linkage t_##name p_##name
@ -164,13 +164,6 @@ struct FontSpec *fontspec_new(const char *name,
#endif
#endif
#ifndef DONE_TYPEDEFS
#define DONE_TYPEDEFS
typedef struct conf_tag Conf;
typedef struct backend_tag Backend;
typedef struct terminal_tag Terminal;
#endif
#define PUTTY_REG_POS "Software\\SimonTatham\\PuTTY"
#define PUTTY_REG_PARENT "Software\\SimonTatham"
#define PUTTY_REG_PARENT_CHILD "PuTTY"
@ -198,9 +191,6 @@ typedef struct terminal_tag Terminal;
typedef HDC Context;
typedef unsigned int uint32; /* int is 32-bits on Win32 and Win64. */
#define PUTTY_UINT32_DEFINED
#ifndef NO_GSSAPI
/*
* GSS-API stuff