Change prompt generation to be more compatible with the advent430 branch.

This commit is contained in:
Eric S. Raymond 2023-03-22 17:09:14 -04:00
parent 1e05134b47
commit 5f7ce87040
79 changed files with 87 additions and 77 deletions

9
main.c
View file

@ -55,8 +55,13 @@ char *myreadline(const char *prompt)
* logfiles for testing purposes.
*/
/* Normal case - no script arguments */
if (settings.argc == 0)
return readline(prompt);
if (settings.argc == 0) {
char *ln = readline(prompt);
if (ln == NULL) {
fputs(prompt, stdout);
}
return ln;
}
char *buf = malloc(LINESIZE + 1);
for (;;) {