#include "putty.h" #include "storage.h" void gui_term_process_cmdline(Conf *conf, char *cmdline) { char *p; bool special_launchable_argument = false; settings_set_default_protocol(be_default_protocol); /* Find the appropriate default port. */ { const struct BackendVtable *vt = backend_vt_from_proto(be_default_protocol); settings_set_default_port(0); /* illegal */ if (vt) settings_set_default_port(vt->default_port); } conf_set_int(conf, CONF_logtype, LGTYP_NONE); do_defaults(NULL, conf); p = handle_restrict_acl_cmdline_prefix(cmdline); if (handle_special_sessionname_cmdline(p, conf)) { if (!conf_launchable(conf) && !do_config(conf)) { cleanup_exit(0); } special_launchable_argument = true; } else if (handle_special_filemapping_cmdline(p, conf)) { special_launchable_argument = true; } else if (!*p) { /* Do-nothing case for an empty command line - or rather, * for a command line that's empty _after_ we strip off * the &R prefix. */ } else { /* * Otherwise, break up the command line and deal with * it sensibly. */ int argc, i; char **argv; split_into_argv(cmdline, &argc, &argv, NULL); for (i = 0; i < argc; i++) { char *p = argv[i]; int ret; ret = cmdline_process_param(p, i+1