From f6689a328f07fe579d57c1a419fd8b53db7499c7 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 12 Jan 2000 19:36:36 +0000 Subject: Fixed a few "fixes" and bugs. Adjusted messages and options to GNU suggestions. --- src/bin/psql/mainloop.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/bin/psql/mainloop.c') 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 */ } -- cgit v1.2.3