Re: Minor pager corrections in print.c and help.c (psql)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Minor pager corrections in print.c and help.c (psql)
Date: 2003-07-25 21:48:42
Message-ID: 200307252148.h6PLmgW12587@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Patch applied. Thanks.

---------------------------------------------------------------------------

Greg Sabino Mullane wrote:
[ There is text before PGP section. ]
>
[ PGP not available, raw data follows ]
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> NotDashEscaped: You need GnuPG to verify this message
>
>
> 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")
>
>
> Index: print.c
>
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/print.c,v
> retrieving revision 1.39
> diff -c -r1.39 print.c
> *** print.c 12 Jun 2003 08:15:28 -0000 1.39
> --- print.c 27 Jun 2003 21:51:04 -0000
> ***************
> *** 1,7 ****
> /*
> * psql - the PostgreSQL interactive terminal
> *
> ! * Copyright 2000 by PostgreSQL Global Development Group
> *
> * $Header: /projects/cvsroot/pgsql-server/src/bin/psql/print.c,v 1.39 2003/06/12 08:15:28 momjian Exp $
> */
> --- 1,7 ----
> /*
> * psql - the PostgreSQL interactive terminal
> *
> ! * Copyright 2000-2003 by PostgreSQL Global Development Group
> *
> * $Header: /projects/cvsroot/pgsql-server/src/bin/psql/print.c,v 1.39 2003/06/12 08:15:28 momjian Exp $
> */
> ***************
> *** 1004,1010 ****
> struct winsize screen_size;
>
> result = ioctl(fileno(stdout), TIOCGWINSZ, &screen_size);
> ! if (result == -1 || lines > screen_size.ws_row || pager > 1)
> {
> #endif
> pagerprog = getenv("PAGER");
> --- 1004,1012 ----
> struct winsize screen_size;
>
> result = ioctl(fileno(stdout), TIOCGWINSZ, &screen_size);
> !
> ! /* >= accounts for a one-line prompt */
> ! if (result == -1 || lines >= screen_size.ws_row || pager > 1)
> {
> #endif
> pagerprog = getenv("PAGER");
> Index: help.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/help.c,v
> retrieving revision 1.73
> diff -c -r1.73 help.c
> *** help.c 11 Jun 2003 05:13:11 -0000 1.73
> --- help.c 27 Jun 2003 21:51:04 -0000
> ***************
> *** 1,7 ****
> /*
> * psql - the PostgreSQL interactive terminal
> *
> ! * Copyright 2000 by PostgreSQL Global Development Group
> *
> * $Header: /projects/cvsroot/pgsql-server/src/bin/psql/help.c,v 1.73 2003/06/11 05:13:11 momjian Exp $
> */
> --- 1,7 ----
> /*
> * psql - the PostgreSQL interactive terminal
> *
> ! * Copyright 2000-2003 by PostgreSQL Global Development Group
> *
> * $Header: /projects/cvsroot/pgsql-server/src/bin/psql/help.c,v 1.73 2003/06/11 05:13:11 momjian Exp $
> */
> ***************
> *** 163,169 ****
> {
> FILE *output;
>
> ! output = PageOutput(50, pager);
>
> /* if you add/remove a line here, change the row count above */
>
> --- 163,169 ----
> {
> FILE *output;
>
> ! output = PageOutput(64, pager);
>
> /* if you add/remove a line here, change the row count above */
>
> ***************
> *** 272,278 ****
> int items_per_column = (QL_HELP_COUNT + 2) / 3;
> FILE *output;
>
> ! output = PageOutput(items_per_column, pager);
>
> fputs(_("Available help:\n"), output);
>
> --- 272,278 ----
> int items_per_column = (QL_HELP_COUNT + 2) / 3;
> FILE *output;
>
> ! output = PageOutput(items_per_column + 1, pager);
>
> fputs(_("Available help:\n"), output);
>
> ***************
> *** 334,343 ****
> {
> puts(
> "PostgreSQL Data Base Management System\n\n"
> ! "Portions Copyright (c) 1996-2002, 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"
> "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"
> --- 334,343 ----
> {
> puts(
> "PostgreSQL Data Base Management System\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, 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"
>
>
>
>
>
> --
> Greg Sabino Mullane greg(at)turnstep(dot)com
> PGP Key: 0x14964AC8 200306271750
>
>
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Comment: http://www.turnstep.com/pgp.html
>
> iD8DBQE+/L1EvJuQZxSWSsgRAjvdAKDbwE5KoR8mNa8mA63CeYwO1OySGACdGErc
> HKYkVhGBAr7x1PpRtErjt9s=
> =buDA
> -----END PGP SIGNATURE-----
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
[ Decrypting message... End of raw data. ]

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Gavin Sherry 2003-07-26 13:31:11 updateable cursors
Previous Message Bruce Momjian 2003-07-25 20:12:24 Re: [PATCHES] Datetime patch