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:
@@ -838,7 +838,7 @@ struct instance_globals {
|
||||
int locknum; /* max num of simultaneous users */
|
||||
#endif
|
||||
#ifdef DEF_PAGER
|
||||
char *catmore; /* default pager */
|
||||
const char *catmore; /* external pager; from getenv() or DEF_PAGER */
|
||||
#endif
|
||||
#ifdef MICRO
|
||||
char levels[PATHLEN]; /* where levels are */
|
||||
|
||||
@@ -93,10 +93,12 @@
|
||||
/*
|
||||
* Define DEF_PAGER as your default pager, e.g. "/bin/cat" or "/usr/ucb/more"
|
||||
* If defined, it can be overridden by the environment variable PAGER.
|
||||
* Hack will use its internal pager if DEF_PAGER is not defined.
|
||||
* (This might be preferable for security reasons.)
|
||||
* NetHack will use its internal pager if DEF_PAGER is not defined _or_
|
||||
* if DLB is defined since an external pager won't know how to access the
|
||||
* contents of the dlb container file.
|
||||
* (Note: leaving DEF_PAGER undefined is preferable for security reasons.)
|
||||
*/
|
||||
/* #define DEF_PAGER ".../mydir/mypager" */
|
||||
/* #define DEF_PAGER "/usr/bin/less" */
|
||||
|
||||
/*
|
||||
* Define PORT_HELP to be the name of the port-specfic help file.
|
||||
|
||||
Reference in New Issue
Block a user