X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/839f10dbef33ef2982689a05f8305690aba92734..f33ba69e92f389f5884eae5a586858a629a5260b:/putty.h diff --git a/putty.h b/putty.h index cb58a459..b12429f5 100644 --- a/putty.h +++ b/putty.h @@ -224,7 +224,8 @@ enum { /* * Proxy types. */ - PROXY_NONE, PROXY_HTTP, PROXY_SOCKS, PROXY_TELNET + PROXY_NONE, PROXY_SOCKS4, PROXY_SOCKS5, + PROXY_HTTP, PROXY_TELNET, PROXY_CMD }; enum { @@ -242,7 +243,7 @@ enum { enum { /* Bell settings (cfg.beep) */ - BELL_DISABLED, BELL_DEFAULT, BELL_VISUAL, BELL_WAVEFILE + BELL_DISABLED, BELL_DEFAULT, BELL_VISUAL, BELL_WAVEFILE, BELL_PCSPEAKER }; enum { @@ -266,8 +267,10 @@ enum { }; struct backend_tag { - char *(*init) (void *frontend_handle, void **backend_handle, Config *cfg, - char *host, int port, char **realhost, int nodelay); + const char *(*init) (void *frontend_handle, void **backend_handle, + Config *cfg, + char *host, int port, char **realhost, int nodelay, + int keepalive); void (*free) (void *handle); /* back->reconfig() passes in a replacement configuration. */ void (*reconfig) (void *handle, Config *cfg); @@ -327,6 +330,7 @@ struct config_tag { int warn_on_close; int ping_interval; /* in seconds */ int tcp_nodelay; + int tcp_keepalives; /* Proxy options */ char proxy_exclude_list[512]; int proxy_dns; @@ -334,10 +338,9 @@ struct config_tag { int proxy_type; char proxy_host[512]; int proxy_port; - char proxy_username[32]; - char proxy_password[32]; + char proxy_username[128]; + char proxy_password[128]; char proxy_telnet_command[512]; - int proxy_socks_version; /* SSH options */ char remote_cmd[512]; char remote_cmd2[512]; /* fallback if the first fails @@ -427,7 +430,10 @@ struct config_tag { int window_border; char answerback[256]; char printer[128]; + int arabicshaping; + int bidi; /* Colour options */ + int system_colour; int try_palette; int bold_colour; unsigned char colours[22][3]; @@ -469,6 +475,7 @@ struct config_tag { int stamp_utmp; int login_shell; int scrollbar_on_left; + int shadowbold; FontSpec boldfont; FontSpec widefont; FontSpec wideboldfont; @@ -492,6 +499,10 @@ struct config_tag { * 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. + * + * Note that additional flags may be defined in platform-specific + * headers. It's probably best if those ones start from 0x1000, to + * avoid collision. */ #define FLAG_VERBOSE 0x0001 #define FLAG_STDERR 0x0002 @@ -506,6 +517,11 @@ GLOBAL int flags; GLOBAL int default_protocol; GLOBAL int default_port; +/* + * This is set TRUE by cmdline.c iff a session is loaded with "-load". + */ +GLOBAL int loaded_session; + struct RSAKey; /* be a little careful of scope */ /* @@ -639,7 +655,8 @@ void log_reconfig(void *logctx, Config *cfg); void logfopen(void *logctx); void logfclose(void *logctx); void logtraffic(void *logctx, unsigned char c, int logmode); -void log_eventlog(void *logctx, char *string); +void logflush(void *logctx); +void log_eventlog(void *logctx, const char *string); enum { PKT_INCOMING, PKT_OUTGOING }; void log_packet(void *logctx, int direction, int type, char *texttype, void *data, int len); @@ -774,7 +791,7 @@ int wc_unescape(char *output, const char *wildcard); /* * Exports from windlg.c */ -void logevent(void *frontend, char *); +void logevent(void *frontend, const char *); 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); @@ -787,6 +804,7 @@ int askappend(void *frontend, Filename filename); extern int console_batch_mode; int console_get_line(const char *prompt, char *str, int maxlen, int is_pw); void console_provide_logctx(void *logctx); +int is_interactive(void); /* * Exports from printing.c. @@ -807,6 +825,7 @@ void printer_finish_job(printer_job *); */ int cmdline_process_param(char *, char *, int, Config *); void cmdline_run_saved(Config *); +void cmdline_cleanup(void); extern char *cmdline_password; #define TOOLTYPE_FILETRANSFER 1 #define TOOLTYPE_NONNETWORK 2 @@ -822,6 +841,16 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist, int midsession, int protocol); /* + * Exports from minibidi.c. + */ +typedef struct bidi_char { + wchar_t origwc, wc; + unsigned short index; +} bidi_char; +int do_bidi(bidi_char *line, int count); +int do_shape(bidi_char *line, bidi_char *to, int count); + +/* * X11 auth mechanisms we know about. */ enum { @@ -839,5 +868,7 @@ 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); +char *get_username(void); /* return value needs freeing */ +char *get_random_data(int bytes); /* used in cmdgen.c */ #endif