projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prevent another segfault. Oops.
[u/mdw/putty]
/
putty.h
diff --git
a/putty.h
b/putty.h
index
116e2a3
..
85e058a
100644
(file)
--- a/
putty.h
+++ b/
putty.h
@@
-92,17
+92,14
@@
typedef struct terminal_tag Terminal;
#define ATTR_CUR_AND (~(ATTR_BOLD|ATTR_REVERSE|ATTR_BLINK|ATTR_COLOURS))
#define ATTR_CUR_XOR 0x00BA0000UL
#define ATTR_CUR_AND (~(ATTR_BOLD|ATTR_REVERSE|ATTR_BLINK|ATTR_COLOURS))
#define ATTR_CUR_XOR 0x00BA0000UL
-GLOBAL int alt_pressed;
-
-GLOBAL int session_closed;
-
-GLOBAL int nsessions;
-GLOBAL char **sessions;
+struct sesslist {
+ int nsessions;
+ char **sessions;
+ char *buffer; /* so memory can be freed later */
+};
-GLOBAL int utf;
GLOBAL int dbcs_screenfont;
GLOBAL int font_codepage;
GLOBAL int dbcs_screenfont;
GLOBAL int font_codepage;
-GLOBAL int kbd_codepage;
GLOBAL int line_codepage;
GLOBAL wchar_t unitab_scoacs[256];
GLOBAL wchar_t unitab_line[256];
GLOBAL int line_codepage;
GLOBAL wchar_t unitab_scoacs[256];
GLOBAL wchar_t unitab_line[256];
@@
-377,16
+374,27
@@
struct config_tag {
* being run, _either_ because no remote command has been provided
* _or_ because the application is GUI and can't run non-
* interactively.
* being run, _either_ because no remote command has been provided
* _or_ because the application is GUI and can't run non-
* interactively.
+ *
+ * These flags describe the type of _application_ - they wouldn't
+ * vary between individual sessions - and so it's OK to have this
+ * variable be GLOBAL.
*/
#define FLAG_VERBOSE 0x0001
#define FLAG_STDERR 0x0002
#define FLAG_INTERACTIVE 0x0004
GLOBAL int flags;
*/
#define FLAG_VERBOSE 0x0001
#define FLAG_STDERR 0x0002
#define FLAG_INTERACTIVE 0x0004
GLOBAL int flags;
-GLOBAL Config cfg;
+/*
+ * Likewise, these two variables are set up when the application
+ * initialises, and inform all default-settings accesses after
+ * that.
+ */
GLOBAL int default_protocol;
GLOBAL int default_port;
GLOBAL int default_protocol;
GLOBAL int default_port;
+/* This variable, OTOH, needs to be made non-global ASAP. FIXME. */
+GLOBAL Config cfg;
+
struct RSAKey; /* be a little careful of scope */
/*
struct RSAKey; /* be a little careful of scope */
/*
@@
-447,7
+455,7
@@
void random_destroy_seed(void);
*/
void save_settings(char *section, int do_host, Config * cfg);
void load_settings(char *section, int do_host, Config * cfg);
*/
void save_settings(char *section, int do_host, Config * cfg);
void load_settings(char *section, int do_host, Config * cfg);
-void get_sesslist(int allocate);
+void get_sesslist(
struct sesslist *,
int allocate);
void do_defaults(char *, Config *);
void registry_cleanup(void);
void do_defaults(char *, Config *);
void registry_cleanup(void);
@@
-458,7
+466,7
@@
void registry_cleanup(void);
Terminal *term_init(void *frontend);
void term_size(Terminal *, int, int, int);
void term_out(Terminal *);
Terminal *term_init(void *frontend);
void term_size(Terminal *, int, int, int);
void term_out(Terminal *);
-void term_paint(Terminal *, Context, int, int, int, int);
+void term_paint(Terminal *, Context, int, int, int, int
, int
);
void term_scroll(Terminal *, int, int);
void term_pwron(Terminal *);
void term_clrsb(Terminal *);
void term_scroll(Terminal *, int, int);
void term_pwron(Terminal *);
void term_clrsb(Terminal *);