#define WCHAR wchar_t
#define BYTE unsigned char
+GLOBAL void *logctx;
+
/* Things pty.c needs from pterm.c */
char *get_x_display(void *frontend);
int font_dimension(void *frontend, int which);/* 0 for width, 1 for height */
void logevent(void *frontend, char *string)
{
+ log_eventlog(logctx, string);
}
int console_get_line(const char *prompt, char *str,
int i, skcount, sksize, socketstate;
int connopen;
int exitcode;
- void *logctx;
void *ldisc;
ssh_get_line = console_get_line;
continue;
} else if (!strcmp(p, "-batch")) {
console_batch_mode = 1;
+ } else if (!strcmp(p, "-o")) {
+ if (argc <= 1)
+ fprintf(stderr,
+ "plink: option \"-o\" requires an argument\n");
+ else
+ --argc, provide_xrm_string(*++argv);
}
} else if (*p) {
if (!*cfg.host) {
char *q = p;
+
+ do_defaults(NULL, &cfg);
+
/*
* If the hostname starts with "telnet:", set the
* protocol to Telnet and process the string as a
/*
* Start up the connection.
*/
+ logctx = log_init(NULL);
{
char *error;
char *realhost;
fprintf(stderr, "Unable to open connection:\n%s\n", error);
return 1;
}
- logctx = log_init(NULL);
back->provide_logctx(backhandle, logctx);
ldisc = ldisc_create(NULL, back, backhandle, NULL);
sfree(realhost);