File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.8 1996/07/28 06:54:15 scrappy Exp $
10
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.9 1996/07/31 02: 06:00 scrappy Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -887,7 +887,9 @@ PQprint(FILE *fout,
887
887
if (po -> pager && fout == stdout && isatty (fileno (stdout ))) {
888
888
/* try to pipe to the pager program if possible */
889
889
#ifdef TIOCGWINSZ
890
- if (ioctl (fileno (stdout ),TIOCGWINSZ ,& screen_size ) == -1 )
890
+ if (ioctl (fileno (stdout ),TIOCGWINSZ ,& screen_size ) == -1 ||
891
+ screen_size .ws_col == 0 ||
892
+ screen_size .ws_row == 0 )
891
893
{
892
894
#endif
893
895
screen_size .ws_row = 24 ;
@@ -897,6 +899,7 @@ PQprint(FILE *fout,
897
899
#endif
898
900
pagerenv = getenv ("PAGER" );
899
901
if (pagerenv != NULL &&
902
+ pagerenv [0 ] != '\0' &&
900
903
!po -> html3 &&
901
904
((po -> expanded &&
902
905
nTups * (nFields + 1 ) >= screen_size .ws_row ) ||
You can’t perform that action at this time.
0 commit comments