~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tidy up Simon's FontSpec abstraction.
[sgt/putty]
/
plink.c
diff --git
a/plink.c
b/plink.c
index
63d30c4
..
7bd1f90
100644
(file)
--- a/
plink.c
+++ b/
plink.c
@@
-69,6
+69,7
@@
WSAEVENT netevent;
static Backend *back;
static void *backhandle;
static Backend *back;
static void *backhandle;
+static Config cfg;
int term_ldisc(Terminal *term, int mode)
{
int term_ldisc(Terminal *term, int mode)
{
@@
-294,7
+295,8
@@
int main(int argc, char **argv)
while (--argc) {
char *p = *++argv;
if (*p == '-') {
while (--argc) {
char *p = *++argv;
if (*p == '-') {
- int ret = cmdline_process_param(p, (argc > 1 ? argv[1] : NULL), 1);
+ int ret = cmdline_process_param(p, (argc > 1 ? argv[1] : NULL),
+ 1, &cfg);
if (ret == -2) {
fprintf(stderr,
"plink: option \"%s\" requires an argument\n", p);
if (ret == -2) {
fprintf(stderr,
"plink: option \"%s\" requires an argument\n", p);
@@
-460,7
+462,7
@@
int main(int argc, char **argv)
/*
* Perform command-line overrides on session configuration.
*/
/*
* Perform command-line overrides on session configuration.
*/
- cmdline_run_saved();
+ cmdline_run_saved(
&cfg
);
/*
* Trim a colon suffix off the hostname if it's there.
/*
* Trim a colon suffix off the hostname if it's there.
@@
-538,14
+540,15
@@
int main(int argc, char **argv)
int nodelay = cfg.tcp_nodelay &&
(GetFileType(GetStdHandle(STD_INPUT_HANDLE)) == FILE_TYPE_CHAR);
int nodelay = cfg.tcp_nodelay &&
(GetFileType(GetStdHandle(STD_INPUT_HANDLE)) == FILE_TYPE_CHAR);
- error = back->init(NULL, &backhandle, cfg.host, cfg.port,
+ error = back->init(NULL, &backhandle,
&cfg,
cfg.host, cfg.port,
&realhost, nodelay);
if (error) {
fprintf(stderr, "Unable to open connection:\n%s", error);
return 1;
}
&realhost, nodelay);
if (error) {
fprintf(stderr, "Unable to open connection:\n%s", error);
return 1;
}
- logctx = log_init(NULL);
+ logctx = log_init(NULL
, &cfg
);
back->provide_logctx(backhandle, logctx);
back->provide_logctx(backhandle, logctx);
+ console_provide_logctx(logctx);
sfree(realhost);
}
connopen = 1;
sfree(realhost);
}
connopen = 1;