index ad57cae9a8e501f6b44bf59e4669ba17dbf7600d..b0cf7f5bdb1c6ee6c1151426b10494e0a3abd5cb 100644 (file)
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.105 2008年05月17日 21:40:44 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.106 2008年05月17日 23:34:44 momjian Exp $
*/
#include "postgres_fe.h"
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;
index a2dbc345d727bfab809a17da6a19c97f05afadde..efbd4b95282b73ad74cce912aeabb2327c313793 100644 (file)
* didn't really belong there.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-print.c,v 1.75 2008年01月01日 19:46:00 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-print.c,v 1.76 2008年05月17日 23:34:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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