Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ad73f6b

Browse files
committed
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
1 parent 57748fc commit ad73f6b

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/bin/psql/help.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*
22
* psql - the PostgreSQL interactive terminal
33
*
4-
* Copyright 2000 by PostgreSQL Global Development Group
4+
* Copyright 2000-2003 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.74 2003/07/23 08:47:39 petere Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.75 2003/07/25 21:48:45 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "common.h"
@@ -163,7 +163,7 @@ slashUsage(unsigned short int pager)
163163
{
164164
FILE *output;
165165

166-
output = PageOutput(50, pager);
166+
output = PageOutput(64, pager);
167167

168168
/* if you add/remove a line here, change the row count above */
169169

@@ -276,7 +276,7 @@ helpSQL(const char *topic, unsigned short int pager)
276276
int items_per_column = (QL_HELP_COUNT + 2) / 3;
277277
FILE *output;
278278

279-
output = PageOutput(items_per_column, pager);
279+
output = PageOutput(items_per_column + 1, pager);
280280

281281
fputs(_("Available help:\n"), output);
282282

@@ -338,10 +338,10 @@ print_copyright(void)
338338
{
339339
puts(
340340
"PostgreSQL Data Base Management System\n\n"
341-
"Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group\n\n"
341+
"Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group\n\n"
342342
"This software is based on Postgres95, formerly known as Postgres, which\n"
343343
"contains the following notice:\n\n"
344-
"Portions Copyright(c) 1994 - 7 Regents of the University of California\n\n"
344+
"Portions Copyright(c) 1994, Regents of the University of California\n\n"
345345
"Permission to use, copy, modify, and distribute this software and its\n"
346346
"documentation for any purpose, without fee, and without a written agreement\n"
347347
"is hereby granted, provided that the above copyright notice and this paragraph\n"

src/bin/psql/print.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*
22
* psql - the PostgreSQL interactive terminal
33
*
4-
* Copyright 2000 by PostgreSQL Global Development Group
4+
* Copyright 2000-2003 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.39 2003/06/12 08:15:28 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.40 2003/07/25 21:48:45 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "common.h"
@@ -1004,7 +1004,9 @@ PageOutput(int lines, unsigned short int pager)
10041004
struct winsize screen_size;
10051005

10061006
result = ioctl(fileno(stdout), TIOCGWINSZ, &screen_size);
1007-
if (result == -1 || lines > screen_size.ws_row || pager > 1)
1007+
1008+
/* >= accounts for a one-line prompt */
1009+
if (result == -1 || lines >= screen_size.ws_row || pager > 1)
10081010
{
10091011
#endif
10101012
pagerprog = getenv("PAGER");

0 commit comments

Comments
 (0)