fix Unix build with DEF_PAGER defined

Eliminate a couple of compile warnings produced when DEF_PAGER is
defined:  unixmain.c: g.catmore=DEF_PAGER; wintty.c: fd=open(...).

Override its use when DLB is also defined since an external pager
could access 'license' but not 'history', 'opthelp', &c when those
are in the dlb container file.

In the commented out value for DEF_PAGER, show a viable value for
the default configuration these days.
This commit is contained in:
PatR
2021-10-05 01:11:24 -07:00
parent 013f3770d1
commit ccfddd47de
4 changed files with 23 additions and 6 deletions

View File

@@ -220,7 +220,8 @@ main(int argc, char *argv[])
#endif
#ifdef DEF_PAGER
if (!(g.catmore = nh_getenv("HACKPAGER"))
if (!(g.catmore = nh_getenv("NETHACKPAGER"))
&& !(g.catmore = nh_getenv("HACKPAGER"))
&& !(g.catmore = nh_getenv("PAGER")))
g.catmore = DEF_PAGER;
#endif