X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/edd0cb8aef57080ae884e06731a7892ca8cdba44..aef05b788c268d43559a0183d1efe9c458724b94:/cmdline.c diff --git a/cmdline.c b/cmdline.c index 112463c3..e8343427 100644 --- a/cmdline.c +++ b/cmdline.c @@ -1,3 +1,8 @@ +/* + * cmdline.c - command-line parsing shared between many of the + * PuTTY applications + */ + #include #include #include @@ -291,6 +296,19 @@ int cmdline_process_param(char *p, char *value, int need_save, Config *cfg) cmdline_password = value; } + if (!strcmp(p, "-agent") || !strcmp(p, "-pagent") || + !strcmp(p, "-pageant")) { + RETURN(1); + UNAVAILABLE_IN(TOOLTYPE_NONNETWORK); + cfg->tryagent = TRUE; + } + if (!strcmp(p, "-noagent") || !strcmp(p, "-nopagent") || + !strcmp(p, "-nopageant")) { + RETURN(1); + UNAVAILABLE_IN(TOOLTYPE_NONNETWORK); + cfg->tryagent = FALSE; + } + if (!strcmp(p, "-A")) { RETURN(1); UNAVAILABLE_IN(TOOLTYPE_FILETRANSFER | TOOLTYPE_NONNETWORK);