projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Just like under Windows, cleanup_exit() shouldn't need to check
[u/mdw/putty]
/
window.c
diff --git
a/window.c
b/window.c
index
78cb1e0
..
ebf554e
100644
(file)
--- a/
window.c
+++ b/
window.c
@@
-87,7
+87,6
@@
static void init_fonts(int, int);
static void another_font(int);
static void deinit_fonts(void);
static void set_input_locale(HKL);
static void another_font(int);
static void deinit_fonts(void);
static void set_input_locale(HKL);
-static int do_mouse_wheel_msg(UINT message, WPARAM wParam, LPARAM lParam);
static int is_full_screen(void);
static void make_full_screen(void);
static int is_full_screen(void);
static void make_full_screen(void);
@@
-330,7
+329,8
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
char *p = argv[i];
int ret;
char *p = argv[i];
int ret;
- ret = cmdline_process_param(p, i+1<argc?argv[i+1]:NULL, 1);
+ ret = cmdline_process_param(p, i+1<argc?argv[i+1]:NULL,
+ 1, &cfg);
if (ret == -2) {
cmdline_error("option \"%s\" requires an argument", p);
} else if (ret == 2) {
if (ret == -2) {
cmdline_error("option \"%s\" requires an argument", p);
} else if (ret == 2) {
@@
-366,7
+366,7
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
* argument, so that it will be deferred
* until it's a good moment to run it.
*/
* argument, so that it will be deferred
* until it's a good moment to run it.
*/
- int ret = cmdline_process_param("-P", p, 1);
+ int ret = cmdline_process_param("-P", p, 1
, &cfg
);
assert(ret == 2);
} else if (!strncmp(q, "telnet:", 7)) {
/*
assert(ret == 2);
} else if (!strncmp(q, "telnet:", 7)) {
/*
@@
-406,11
+406,13
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
cfg.host[sizeof(cfg.host) - 1] = '\0';
got_host = 1;
}
cfg.host[sizeof(cfg.host) - 1] = '\0';
got_host = 1;
}
+ } else {
+ cmdline_error("unknown option \"%s\"", p);
}
}
}
}
}
}
- cmdline_run_saved();
+ cmdline_run_saved(
&cfg
);
if (!*cfg.host && !do_config()) {
WSACleanup();
if (!*cfg.host && !do_config()) {
WSACleanup();
@@
-504,7
+506,7
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
hwnd = NULL;
hwnd = NULL;
- term = term_init(NULL);
+ term = term_init(
&cfg,
NULL);
logctx = log_init(NULL);
term_provide_logctx(term, logctx);
logctx = log_init(NULL);
term_provide_logctx(term, logctx);
@@
-613,7
+615,7
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
char msg[1024], *title;
char *realhost;
char msg[1024], *title;
char *realhost;
- error = back->init((void *)term, &backhandle,
+ error = back->init((void *)term, &backhandle,
&cfg,
cfg.host, cfg.port, &realhost, cfg.tcp_nodelay);
back->provide_logctx(backhandle, logctx);
if (error) {
cfg.host, cfg.port, &realhost, cfg.tcp_nodelay);
back->provide_logctx(backhandle, logctx);
if (error) {
@@
-642,7
+644,7
@@
int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
/*
* Set up a line discipline.
*/
/*
* Set up a line discipline.
*/
- ldisc = ldisc_create(term, back, backhandle, NULL);
+ ldisc = ldisc_create(
&cfg,
term, back, backhandle, NULL);
session_closed = FALSE;
session_closed = FALSE;
@@
-1777,8
+1779,11
@@
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
cfgtopalette();
init_palette();
cfgtopalette();
init_palette();
- /* Give terminal a heads-up on miscellaneous stuff */
- term_reconfig(term);
+ /* Pass new config data to the terminal */
+ term_reconfig(term, &cfg);
+
+ /* Pass new config data to the back end */
+ back->reconfig(back, &cfg);
/* Screen size changed ? */
if (cfg.height != prev_cfg.height ||
/* Screen size changed ? */
if (cfg.height != prev_cfg.height ||
@@
-2997,7
+3002,7
@@
void do_cursor(Context ctx, int x, int y, char *text, int len,
/* This function gets the actual width of a character in the normal font.
*/
/* This function gets the actual width of a character in the normal font.
*/
-int
CharW
idth(Context ctx, int uc) {
+int
char_w
idth(Context ctx, int uc) {
HDC hdc = ctx;
int ibuf = 0;
HDC hdc = ctx;
int ibuf = 0;