- * The TATTRs (temporary attributes) are generated on the fly, they can overlap
- * with characters but not with normal attributes.
+ * The TATTRs (temporary attributes) are generated on the fly, they
+ * can overlap with characters but not with normal attributes.
- * The LATTRs (line attributes) conflict with no others and only have one
- * value per line. But on area clears the LATTR cells are set to the erase_char
- * (or DEFAULT_ATTR + 'E')
+ * The LATTRs (line attributes) are an entirely disjoint space of
+ * flags.
/* Like Linux use the F000 page for direct to font. */
#define ATTR_OEMCP 0x0000F000UL /* OEM Codepage DTF */
/* Like Linux use the F000 page for direct to font. */
#define ATTR_OEMCP 0x0000F000UL /* OEM Codepage DTF */
-#define ATTR_NARROW 0x20000000UL
-#define ATTR_WIDE 0x10000000UL
-#define ATTR_BOLD 0x01000000UL
-#define ATTR_UNDER 0x02000000UL
-#define ATTR_REVERSE 0x04000000UL
-#define ATTR_BLINK 0x08000000UL
-#define ATTR_FGMASK 0x000F0000UL
-#define ATTR_BGMASK 0x00F00000UL
-#define ATTR_COLOURS 0x00FF0000UL
+#define ATTR_NARROW 0x80000000UL
+#define ATTR_WIDE 0x40000000UL
+#define ATTR_BOLD 0x04000000UL
+#define ATTR_UNDER 0x08000000UL
+#define ATTR_REVERSE 0x10000000UL
+#define ATTR_BLINK 0x20000000UL
+#define ATTR_FGMASK 0x001F0000UL
+#define ATTR_BGMASK 0x03E00000UL
+#define ATTR_COLOURS 0x03FF0000UL
#define ERASE_CHAR (ATTR_DEFAULT | ATTR_ASCII | ' ')
#define ATTR_MASK 0xFFFFFF00UL
#define CHAR_MASK 0x000000FFUL
#define ATTR_CUR_AND (~(ATTR_BOLD|ATTR_REVERSE|ATTR_BLINK|ATTR_COLOURS))
#define ERASE_CHAR (ATTR_DEFAULT | ATTR_ASCII | ' ')
#define ATTR_MASK 0xFFFFFF00UL
#define CHAR_MASK 0x000000FFUL
#define ATTR_CUR_AND (~(ATTR_BOLD|ATTR_REVERSE|ATTR_BLINK|ATTR_COLOURS))
typedef enum {
MBT_NOTHING,
MBT_LEFT, MBT_MIDDLE, MBT_RIGHT, /* `raw' button designations */
typedef enum {
MBT_NOTHING,
MBT_LEFT, MBT_MIDDLE, MBT_RIGHT, /* `raw' button designations */
int (*sendbuffer) (void *handle);
void (*size) (void *handle, int width, int height);
void (*special) (void *handle, Telnet_Special code);
int (*sendbuffer) (void *handle);
void (*size) (void *handle, int width, int height);
void (*special) (void *handle, Telnet_Special code);
Socket(*socket) (void *handle);
int (*exitcode) (void *handle);
int (*sendok) (void *handle);
Socket(*socket) (void *handle);
int (*exitcode) (void *handle);
int (*sendok) (void *handle);
* IMPORTANT POLICY POINT: everything in this structure which wants
* to be treated like an integer must be an actual, honest-to-
* goodness `int'. No enum-typed variables. This is because parts
* IMPORTANT POLICY POINT: everything in this structure which wants
* to be treated like an integer must be an actual, honest-to-
* goodness `int'. No enum-typed variables. This is because parts
int sshprot; /* use v1 or v2 when both available */
int ssh2_des_cbc; /* "des-cbc" nonstandard SSH2 cipher */
int try_tis_auth;
int sshprot; /* use v1 or v2 when both available */
int ssh2_des_cbc; /* "des-cbc" nonstandard SSH2 cipher */
int try_tis_auth;
int no_remote_wintitle; /* disable remote retitling */
int no_dbackspace; /* disable destructive backspace */
int no_remote_charset; /* disable remote charset config */
int no_remote_wintitle; /* disable remote retitling */
int no_dbackspace; /* disable destructive backspace */
int no_remote_charset; /* disable remote charset config */
int bellovl_n; /* number of bells to cause overload */
int bellovl_t; /* time interval for overload (seconds) */
int bellovl_s; /* period of silence to re-enable bell (s) */
int bellovl_n; /* number of bells to cause overload */
int bellovl_t; /* time interval for overload (seconds) */
int bellovl_s; /* period of silence to re-enable bell (s) */
/* port forwarding */
int lport_acceptall; /* accept conns from hosts other than localhost */
int rport_acceptall; /* same for remote forwarded ports (SSH2 only) */
/* port forwarding */
int lport_acceptall; /* accept conns from hosts other than localhost */
int rport_acceptall; /* same for remote forwarded ports (SSH2 only) */
- char portfwd[1024]; /* [LR]localport\thost:port\000[LR]localport\thost:port\000\000 */
+ /*
+ * The port forwarding string contains a number of
+ * NUL-terminated substrings, terminated in turn by an empty
+ * string (i.e. a second NUL immediately after the previous
+ * one). Each string can be of one of the following forms:
+ *
+ * [LR]localport\thost:port
+ * [LR]localaddr:localport\thost:port
+ * Dlocalport
+ * Dlocaladdr:localport
+ */
+ char portfwd[1024];
/* SSH bug compatibility modes */
int sshbug_ignore1, sshbug_plainpw1, sshbug_rsa1,
sshbug_hmac2, sshbug_derivekey2, sshbug_rsapad2,
/* SSH bug compatibility modes */
int sshbug_ignore1, sshbug_plainpw1, sshbug_rsa1,
sshbug_hmac2, sshbug_derivekey2, sshbug_rsapad2,
void do_cursor(Context, int, int, char *, int, unsigned long, int);
int char_width(Context ctx, int uc);
#ifdef OPTIMISE_SCROLL
void do_cursor(Context, int, int, char *, int, unsigned long, int);
int char_width(Context ctx, int uc);
#ifdef OPTIMISE_SCROLL
-void do_scroll(void *, int, int, int);
+void do_scroll(Context, int, int, int);
#endif
void set_title(void *frontend, char *);
void set_icon(void *frontend, char *);
#endif
void set_title(void *frontend, char *);
void set_icon(void *frontend, char *);
void request_paste(void *frontend);
void frontend_keypress(void *frontend);
void ldisc_update(void *frontend, int echo, int edit);
void request_paste(void *frontend);
void frontend_keypress(void *frontend);
void ldisc_update(void *frontend, int echo, int edit);
#define OPTIMISE_IS_SCROLL 1
void set_iconic(void *frontend, int iconic);
#define OPTIMISE_IS_SCROLL 1
void set_iconic(void *frontend, int iconic);
void save_open_settings(void *sesskey, int do_host, Config *cfg);
void load_settings(char *section, int do_host, Config * cfg);
void load_open_settings(void *sesskey, int do_host, Config *cfg);
void save_open_settings(void *sesskey, int do_host, Config *cfg);
void load_settings(char *section, int do_host, Config * cfg);
void load_open_settings(void *sesskey, int do_host, Config *cfg);
* (The integer one is expected to return `def' if it has no clear
* opinion of its own. This is because there's no integer value
* which I can reliably set aside to indicate `nil'. The string
* (The integer one is expected to return `def' if it has no clear
* opinion of its own. This is because there's no integer value
* which I can reliably set aside to indicate `nil'. The string
- * function is perfectly all right returning NULL, of course.)
+ * function is perfectly all right returning NULL, of course. The
+ * Filename and FontSpec functions are _not allowed_ to fail to
+ * return, since these defaults _must_ be per-platform.)
*/
char *platform_default_s(const char *name);
int platform_default_i(const char *name, int def);
*/
char *platform_default_s(const char *name);
int platform_default_i(const char *name, int def);
void term_copyall(Terminal *);
void term_reconfig(Terminal *, Config *);
void term_seen_key_event(Terminal *);
void term_copyall(Terminal *);
void term_reconfig(Terminal *, Config *);
void term_seen_key_event(Terminal *);
-int from_backend(void *, int is_stderr, char *data, int len);
+int term_data(Terminal *, int is_stderr, const char *data, int len);
void term_provide_resize_fn(Terminal *term,
void (*resize_fn)(void *, int, int),
void *resize_ctx);
void term_provide_resize_fn(Terminal *term,
void (*resize_fn)(void *, int, int),
void *resize_ctx);
wchar_t xlat_uskbd2cyrllic(int ch);
int check_compose(int first, int second);
int decode_codepage(char *cp_name);
wchar_t xlat_uskbd2cyrllic(int ch);
int check_compose(int first, int second);
int decode_codepage(char *cp_name);
void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
char *keystr, char *fingerprint);
void askcipher(void *frontend, char *ciphername, int cs);
void verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
char *keystr, char *fingerprint);
void askcipher(void *frontend, char *ciphername, int cs);
void cmdline_run_saved(Config *);
extern char *cmdline_password;
#define TOOLTYPE_FILETRANSFER 1
void cmdline_run_saved(Config *);
extern char *cmdline_password;
#define TOOLTYPE_FILETRANSFER 1
extern int cmdline_tooltype;
void cmdline_error(char *, ...);
/*
extern int cmdline_tooltype;
void cmdline_error(char *, ...);
/*
+ * Exports from config.c.
+ */
+struct controlbox;
+void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
+ int midsession, int protocol);
+
+/*
+/*
+ * Miscellaneous exports from the platform-specific code.
+ */
+Filename filename_from_str(const char *string);
+const char *filename_to_str(const Filename *fn);
+int filename_equal(Filename f1, Filename f2);
+int filename_is_null(Filename fn);
+