From cd1036d3305170af71cd38025e6c3d48e5f94ffe Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 17 May 2008 23:34:44 +0000 Subject: [PATCH] Use isatty() test for pager on Win32; not sure why it was disabled for that platform. --- src/bin/psql/print.c | 8 +------- src/interfaces/libpq/fe-print.c | 9 ++------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c index 1a7ed64bcd..dcd1a10069 100644 --- a/src/bin/psql/print.c +++ b/src/bin/psql/print.c @@ -1912,13 +1912,7 @@ FILE * PageOutput(int lines, unsigned short int pager) { /* check whether we need / can / are supposed to use pager */ - if (pager -#ifndef WIN32 - && - isatty(fileno(stdin)) && - isatty(fileno(stdout)) -#endif - ) + if (pager && isatty(fileno(stdin)) && isatty(fileno(stdout))) { const char *pagerprog; FILE *pagerpipe; diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c index 77c0d1d6d5..7fe1b5d8e3 100644 --- a/src/interfaces/libpq/fe-print.c +++ b/src/interfaces/libpq/fe-print.c @@ -147,13 +147,8 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po) if (fout == NULL) fout = stdout; - if (po->pager && fout == stdout -#ifndef WIN32 - && - isatty(fileno(stdin)) && - isatty(fileno(stdout)) -#endif - ) + if (po->pager && fout == stdout && isatty(fileno(stdin)) && + isatty(fileno(stdout))) { /* * If we think there'll be more than one screen of output, try to -- 2.39.5