diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-07-25 21:48:45 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-07-25 21:48:45 +0000 |
commit | ad73f6b86fbd09800ecc8ea4d1b173a8e655cdb7 (patch) | |
tree | ccef1f43888bade93ecf15c9a84d70d13734ee7e /src/bin/psql/print.c | |
parent | 57748fc25d95d1daa8a251c01e9014361c36c1b2 (diff) |
Update copyrights to 2003.
print.c: Add one more line to pager calculation to account for the prompt.
help.c: Call PageOutput with correct number of lines within slashUsage
Add one to line count in helpSQL to account for "Available help:" line.
Make copyright match COPYRIGHT file. (Just "1994")
Greg Sabino Mullane
Diffstat (limited to 'src/bin/psql/print.c')
-rw-r--r-- | src/bin/psql/print.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c index 794953716b6..2f71aad9bc9 100644 --- a/src/bin/psql/print.c +++ b/src/bin/psql/print.c @@ -1,9 +1,9 @@ /* * psql - the PostgreSQL interactive terminal * - * Copyright 2000 by PostgreSQL Global Development Group + * Copyright 2000-2003 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.39 2003/06/12 08:15:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.40 2003/07/25 21:48:45 momjian Exp $ */ #include "postgres_fe.h" #include "common.h" @@ -1004,7 +1004,9 @@ PageOutput(int lines, unsigned short int pager) struct winsize screen_size; result = ioctl(fileno(stdout), TIOCGWINSZ, &screen_size); - if (result == -1 || lines > screen_size.ws_row || pager > 1) + + /* >= accounts for a one-line prompt */ + if (result == -1 || lines >= screen_size.ws_row || pager > 1) { #endif pagerprog = getenv("PAGER"); |