I'm not sure whether anybody still cares about this, but currently it is
not possible to read the help files within hack(6). The patch below does
fix this issue and additionally enables the external parser for viewing
the help files, as specified in the man page.

Index: config.h
===================================================================
RCS file: /cvs/src/games/hack/config.h,v
retrieving revision 1.8
diff -u -r1.8 config.h
--- config.h    19 May 2003 06:30:56 -0000      1.8
+++ config.h    8 Mar 2011 01:16:32 -0000
@@ -93,6 +93,7 @@
  * (This might be preferable for security reasons.)
  * #define DEF_PAGER   ".../mydir/mypager"
  */
+#define        DEF_PAGER       _PATH_PAGER
 
 /*
  * If you define MAIL, then the player will be notified of new mail
Index: hack.pager.c
===================================================================
RCS file: /cvs/src/games/hack/hack.pager.c,v
retrieving revision 1.18
diff -u -r1.18 hack.pager.c
--- hack.pager.c        27 Oct 2009 23:59:25 -0000      1.18
+++ hack.pager.c        8 Mar 2011 01:16:33 -0000
@@ -145,7 +145,7 @@
        while (fgets(bufr, CO, fp) && (!strip || *bufr == '\t') &&
            !got_intrup) {
                bufr[strcspn(bufr, "\n")] = '\0';
-               if (*bufr == '\0' || page_line(bufr+strip)) {
+               if (page_line(bufr+strip)) {
                        set_pager(2);
                        goto ret;
                }
Index: pathnames.h
===================================================================
RCS file: /cvs/src/games/hack/pathnames.h,v
retrieving revision 1.3
diff -u -r1.3 pathnames.h
--- pathnames.h 3 Jun 2003 03:01:40 -0000       1.3
+++ pathnames.h 8 Mar 2011 01:16:33 -0000
@@ -33,6 +33,7 @@
  */
 
 #define        _PATH_MAIL      "/usr/bin/mail"
+#define        _PATH_PAGER     "/usr/bin/more"
 #define        _PATH_QUEST     "/var/games/questdir"
 #define        _PATH_HACK      "/var/games/hackdir"
 

-- 
Simon Nicolussi, <[email protected]>
http://homepage.uibk.ac.at/~csag9583/

Reply via email to