X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fpterm.c;h=b9c88fb122b567a965e3625b2e6ec5f9bab37b1a;hb=6b362191f1a2c6897e7b7bfa80beec1cd1f722fd;hp=cf52ec38b51b81f0fe4439c516aeec164c8bf875;hpb=082cf832c535a1c447e8a29551e6601626d44510;p=PuTTY.git diff --git a/unix/pterm.c b/unix/pterm.c index cf52ec38..b9c88fb1 100644 --- a/unix/pterm.c +++ b/unix/pterm.c @@ -166,7 +166,7 @@ int from_backend(void *frontend, int is_stderr, const char *data, int len) return term_data(inst->term, is_stderr, data, len); } -void logevent(void *frontend, char *string) +void logevent(void *frontend, const char *string) { struct gui_data *inst = (struct gui_data *)frontend; @@ -2116,6 +2116,17 @@ int do_cmdline(int argc, char **argv, int do_everything, char *p = *++argv; int ret; + /* + * Shameless cheating. Debian requires all X terminal + * emulators to support `-T title'; but + * cmdline_process_param will eat -T (it means no-pty) and + * complain that pterm doesn't support it. So, in pterm + * only, we convert -T into -title. + */ + if ((cmdline_tooltype & TOOLTYPE_NONNETWORK) && + !strcmp(p, "-T")) + p = "-title"; + ret = cmdline_process_param(p, (argc > 1 ? argv[1] : NULL), do_everything ? 1 : -1, cfg); @@ -3075,7 +3086,8 @@ int pt_main(int argc, char **argv) inst->back = select_backend(&inst->cfg); { - char *realhost, *error; + char *realhost; + const char *error; error = inst->back->init((void *)inst, &inst->backhandle, &inst->cfg, inst->cfg.host, inst->cfg.port,