Config structure like plink does at one point. (I'm almost tempted to
say this is where a copy constructor would be handy :-/ )
[originally from svn r1025]
strncpy(cfg.host, p, sizeof(cfg.host)-1);
cfg.host[sizeof(cfg.host)-1] = '\0';
cfg.port = default_port;
strncpy(cfg.host, p, sizeof(cfg.host)-1);
cfg.host[sizeof(cfg.host)-1] = '\0';
cfg.port = default_port;
+ cfg.remote_cmd_ptr = cfg.remote_cmd;
+ }
} else {
*r++ = '\0';
strncpy(cfg.username, p, sizeof(cfg.username)-1);
} else {
*r++ = '\0';
strncpy(cfg.username, p, sizeof(cfg.username)-1);