mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Add the -log option, which activates full session logging. Should be
handy next time I need to debug any weird terminal problems... [originally from svn r2050]
This commit is contained in:
parent
f4597fe4ee
commit
1d65d8ae5f
14
unix/pterm.c
14
unix/pterm.c
@ -59,8 +59,10 @@ void ldisc_update(int echo, int edit)
|
||||
int askappend(char *filename)
|
||||
{
|
||||
/*
|
||||
* FIXME: for the moment we just wipe the log file. Since I
|
||||
* haven't yet enabled logging, this shouldn't matter yet!
|
||||
* Logging in an xterm-alike is liable to be something you only
|
||||
* do at serious diagnostic need. Hence, I'm going to take the
|
||||
* easy option for now and assume we always want to overwrite
|
||||
* log files. I can always make it properly configurable later.
|
||||
*/
|
||||
return 2;
|
||||
}
|
||||
@ -1253,6 +1255,14 @@ int main(int argc, char **argv)
|
||||
} else
|
||||
err = 1, fprintf(stderr, "pterm: -T expects an argument\n");
|
||||
}
|
||||
if (!strcmp(p, "-log")) {
|
||||
if (--argc > 0) {
|
||||
strncpy(cfg.logfilename, *++argv, sizeof(cfg.logfilename));
|
||||
cfg.logfilename[sizeof(cfg.logfilename)-1] = '\0';
|
||||
cfg.logtype = LGTYP_DEBUG;
|
||||
} else
|
||||
err = 1, fprintf(stderr, "pterm: -log expects an argument\n");
|
||||
}
|
||||
if (!strcmp(p, "-hide")) {
|
||||
cfg.hide_mouseptr = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user