# If you're using Borland Turbo-C under MS-DOS, see TurboMake
#
-# Try these for any system using ncurses
-SYSTYPE = -DUNIX -DNCURSES
-INCDIR = -I/usr/local/include
-CFLAGS = -O $(SYSTYPE) $(INCDIR)
-LIBS = -L/usr/local/lib -lncurses
-LDFLAGS = -s $(LIBS)
+# Flags for Linux. You *must* use the ncurses package for this, it
+# won't work with the curses that comes with the gcc libs.
+SYSTYPE=-DUNIX -DNCURSES
+#CFLAGS = -O6 -fomit-frame-pointer $(SYSTYPE)
+CFLAGS = -g $(SYSTYPE)
+LDFLAGS = # -s
+LIBS = -lncurses
# Flags for System V Release 4 using native curses
# SYSTYPE=-DUNIX -DCURSES -DATT #-DSCROLLBAR -DATTMOUSE -DPOPUP
# LDFLAGS = -s
# LIBS = -lcurses
-# Try these for Linux. You *must* use the ncurses package for this, it
-# won't work with the curses that comes with the gcc libs.
-# SYSTYPE=-DUNIX -DNCURSES -DBSD
-# CFLAGS = -O6 -fomit-frame-pointer $(SYSTYPE)
-# LDFLAGS = -s
-# LIBS = -lncurses
-
# Try these for SunOS 4.1
# SYSTYPE=-DUNIX -DCURSES -DATT -DSCROLLBAR
# CC=/usr/5bin/cc
- VH, version 1.7
+ VH, version 1.8
NOTE FROM ESR: VH is still being maintained, but I suggest that you use
HTML markup and lynx instead. For most purposes, VH is now obsolete; I
will probably cease actively maintaining it soon. See my freeware collection
page, accessible from
- http://www.thyrsus.com/~esr/home.html
+ http://www.ccil.org/~esr/home.html
for the latest update on its status.
Release 1.4 adds a new -f option for extracting lists of entries.
Release 1.5 makes cursor positioning a bit more intuitive.
Release 1.6 fixes some minor bugs and moves the main port to ncurses.
+Release 1.7 added the HTML obsolescence comment.
+Release 1.8 was updated for curses 1.9.1b, which uses curses.h, not ncurses.h.
Have fun!
Eric Raymond = eric@snark.thyrsus.com (UNIX)
bool forcemono = FALSE, atrandom = FALSE;
execname = argv[0];
+
+#ifdef UNIX
+ /*
+ * Weird! It seems bash under linux passes in a full pathname, even if
+ * argv[0] was relative! Foil this.
+ */
+ if ((dbname = strrchr(execname, '/')) != (char *)NULL)
+ execname = dbname + 1;
+#endif /* UNIX */
+
while ((++argv, --argc) && *argv[0] == '-')
for (i = 1; argv[0][i]; i++)
switch(argv[0][i])
#define OLDCURSES
#endif /* defined(BSD) && !defined(NCURSES) */
-#ifdef NCURSES
-#include <ncurses.h>
-#else
+#if defined(CURSES) || defined(NCURSES)
#include <curses.h>
-#endif
-
-#ifdef CURSES
#else
typedef char bool;
#define FALSE 0