before is would return success and the empty string. IMO this makes `-batch'
much more useful; before, utilities such as Plink in `-batch' mode would
attempt to plough on using empty strings for usernames, passwords, and so on.
git-svn-id: svn://svn.tartarus.org/sgt/putty@4832
cda61777-01e9-0310-a592-
d414129be87e
if (console_batch_mode) {
if (maxlen > 0)
str[0] = '\0';
+ return 0;
} else {
tcgetattr(0, &oldmode);
newmode = oldmode;
if (is_pw)
fputs("\n", stdout);
+
+ return 1;
}
- return 1;
}
void frontend_keypress(void *handle)
if (console_batch_mode) {
if (maxlen > 0)
str[0] = '\0';
+ return 0;
} else {
hin = GetStdHandle(STD_INPUT_HANDLE);
hout = GetStdHandle(STD_OUTPUT_HANDLE);
if (is_pw)
WriteFile(hout, "\r\n", 2, &i, NULL);
+ return 1;
}
- return 1;
}
void frontend_keypress(void *handle)