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
This commit is contained in:
Bruce Momjian 2003-07-25 21:48:45 +00:00
parent 57748fc25d
commit ad73f6b86f
2 changed files with 11 additions and 9 deletions

View File

@ -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/help.c,v 1.74 2003/07/23 08:47:39 petere Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.75 2003/07/25 21:48:45 momjian Exp $
*/
#include "postgres_fe.h"
#include "common.h"
@ -163,7 +163,7 @@ slashUsage(unsigned short int pager)
{
FILE *output;
output = PageOutput(50, pager);
output = PageOutput(64, pager);
/* if you add/remove a line here, change the row count above */
@ -276,7 +276,7 @@ helpSQL(const char *topic, unsigned short int pager)
int items_per_column = (QL_HELP_COUNT + 2) / 3;
FILE *output;
output = PageOutput(items_per_column, pager);
output = PageOutput(items_per_column + 1, pager);
fputs(_("Available help:\n"), output);
@ -338,10 +338,10 @@ print_copyright(void)
{
puts(
"PostgreSQL Data Base Management System\n\n"
"Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group\n\n"
"Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group\n\n"
"This software is based on Postgres95, formerly known as Postgres, which\n"
"contains the following notice:\n\n"
"Portions Copyright(c) 1994 - 7 Regents of the University of California\n\n"
"Portions Copyright(c) 1994, Regents of the University of California\n\n"
"Permission to use, copy, modify, and distribute this software and its\n"
"documentation for any purpose, without fee, and without a written agreement\n"
"is hereby granted, provided that the above copyright notice and this paragraph\n"

View File

@ -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");