diff options
Diffstat (limited to 'src/bin/psql/mainloop.c')
-rw-r--r-- | src/bin/psql/mainloop.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c index 76da5417365..cb9232d7147 100644 --- a/src/bin/psql/mainloop.c +++ b/src/bin/psql/mainloop.c @@ -124,10 +124,7 @@ MainLoop(PsqlSettings *pset, FILE *source) } - /* Setting this will not have effect until next line. (Faster. - Also think about what happens if there is an error processing - _this_ command.) - */ + /* Setting this will not have effect until next line. */ die_on_error = GetVariableBool(pset->vars, "die_on_error"); /* @@ -143,7 +140,7 @@ MainLoop(PsqlSettings *pset, FILE *source) if (GetVariableBool(pset->vars, "echo") && !GetVariableBool(pset->vars, "quiet")) puts("EOF"); else if (pset->cur_cmd_interactive) - puts(""); /* just newline */ + putc('\n', stdout); /* just newline */ eof = true; continue; @@ -269,6 +266,7 @@ MainLoop(PsqlSettings *pset, FILE *source) free(line); line = new; + len = strlen(new); continue; /* reparse the just substituted */ } |