Change prompt generation to be more compatible with the advent430 branch.
This commit is contained in:
parent
1e05134b47
commit
5f7ce87040
79 changed files with 87 additions and 77 deletions
9
main.c
9
main.c
|
@ -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 (;;) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue