mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
examples: bistromathic: when quitting, close the current line
When the user ctrl-d the line, we left the cursor not at col 0. Let's fix that. This revealed a few short-comings in the testing framework. * examples/test (run): Also display the diffs. And support -n. * examples/c/bistromathic/bistromathic.test * examples/c/bistromathic/parse.y
This commit is contained in:
@@ -543,7 +543,11 @@ int main (int argc, char const* argv[])
|
||||
{
|
||||
char *line = readline ("> ");
|
||||
if (!line)
|
||||
return 0;
|
||||
{
|
||||
// Finish the line started by the prompt.
|
||||
putchar ('\n');
|
||||
break;
|
||||
}
|
||||
if (*line)
|
||||
add_history (line);
|
||||
process_line (&lloc, line);
|
||||
|
||||
Reference in New Issue
Block a user