mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 09:12:24 +00:00
Various cleanups, mostly Mac-related.
[originally from svn r45]
This commit is contained in:
parent
45bf5aa9eb
commit
f192c33a67
44
putty.h
44
putty.h
@ -3,15 +3,16 @@
|
|||||||
|
|
||||||
#define PUTTY_REG_POS "Software\\SimonTatham\\PuTTY"
|
#define PUTTY_REG_POS "Software\\SimonTatham\\PuTTY"
|
||||||
|
|
||||||
/*
|
#ifdef macintosh
|
||||||
* Global variables. Most modules declare these `extern', but
|
#include <MacTypes.h>
|
||||||
* window.c will do `#define PUTTY_DO_GLOBALS' before including this
|
typedef UInt32 DWORD;
|
||||||
* module, and so will get them properly defined.
|
#endif /* macintosh */
|
||||||
*/
|
|
||||||
#ifdef PUTTY_DO_GLOBALS
|
#ifndef TRUE
|
||||||
#define GLOBAL
|
#define TRUE 1
|
||||||
#else
|
#endif
|
||||||
#define GLOBAL extern
|
#ifndef FALSE
|
||||||
|
#define FALSE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ATTR_ACTCURS 0x80000000UL /* active cursor (block) */
|
#define ATTR_ACTCURS 0x80000000UL /* active cursor (block) */
|
||||||
@ -39,9 +40,25 @@
|
|||||||
#define ATTR_MASK 0xFFFFFF00UL
|
#define ATTR_MASK 0xFFFFFF00UL
|
||||||
#define CHAR_MASK 0x000000FFUL
|
#define CHAR_MASK 0x000000FFUL
|
||||||
|
|
||||||
|
#ifdef macintosh
|
||||||
|
typedef void *Context; /* Temporarily until I work out what it should really be */
|
||||||
|
#else /* not macintosh */
|
||||||
typedef HDC Context;
|
typedef HDC Context;
|
||||||
|
#endif /* not macintosh */
|
||||||
|
|
||||||
#define SEL_NL { 13, 10 }
|
#define SEL_NL { 13, 10 }
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Global variables. Most modules declare these `extern', but
|
||||||
|
* window.c will do `#define PUTTY_DO_GLOBALS' before including this
|
||||||
|
* module, and so will get them properly defined.
|
||||||
|
*/
|
||||||
|
#ifdef PUTTY_DO_GLOBALS
|
||||||
|
#define GLOBAL
|
||||||
|
#else
|
||||||
|
#define GLOBAL extern
|
||||||
|
#endif
|
||||||
|
|
||||||
GLOBAL int rows, cols, savelines;
|
GLOBAL int rows, cols, savelines;
|
||||||
|
|
||||||
GLOBAL int font_width, font_height;
|
GLOBAL int font_width, font_height;
|
||||||
@ -80,8 +97,13 @@ typedef enum {
|
|||||||
} VT_Mode;
|
} VT_Mode;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
#ifdef macintosh
|
||||||
|
char *(*init) (char *host, int port, char **realhost);
|
||||||
|
int (*msg)(void);
|
||||||
|
#else /* not macintosh */
|
||||||
char *(*init) (HWND hwnd, char *host, int port, char **realhost);
|
char *(*init) (HWND hwnd, char *host, int port, char **realhost);
|
||||||
int (*msg) (WPARAM wParam, LPARAM lParam);
|
int (*msg) (WPARAM wParam, LPARAM lParam);
|
||||||
|
#endif /* not macintosh */
|
||||||
void (*send) (char *buf, int len);
|
void (*send) (char *buf, int len);
|
||||||
void (*size) (void);
|
void (*size) (void);
|
||||||
void (*special) (Telnet_Special code);
|
void (*special) (Telnet_Special code);
|
||||||
@ -146,7 +168,7 @@ void palette_reset (void);
|
|||||||
void write_clip (void *, int);
|
void write_clip (void *, int);
|
||||||
void get_clip (void **, int *);
|
void get_clip (void **, int *);
|
||||||
void optimised_move (int, int, int);
|
void optimised_move (int, int, int);
|
||||||
void fatalbox (char *, ...);
|
void fatalbox (const char *, ...);
|
||||||
void beep (void);
|
void beep (void);
|
||||||
#define OPTIMISE_IS_SCROLL 1
|
#define OPTIMISE_IS_SCROLL 1
|
||||||
|
|
||||||
@ -158,6 +180,7 @@ void noise_get_light(void (*func) (void *, int));
|
|||||||
void noise_ultralight(DWORD data);
|
void noise_ultralight(DWORD data);
|
||||||
void random_save_seed(void);
|
void random_save_seed(void);
|
||||||
|
|
||||||
|
#ifndef macintosh
|
||||||
/*
|
/*
|
||||||
* Exports from windlg.c.
|
* Exports from windlg.c.
|
||||||
*/
|
*/
|
||||||
@ -168,6 +191,7 @@ void lognegot (char *);
|
|||||||
void shownegot (HWND);
|
void shownegot (HWND);
|
||||||
void showabout (HWND);
|
void showabout (HWND);
|
||||||
void verify_ssh_host_key(char *host, struct RSAKey *key);
|
void verify_ssh_host_key(char *host, struct RSAKey *key);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Exports from terminal.c.
|
* Exports from terminal.c.
|
||||||
|
Loading…
Reference in New Issue
Block a user