From: Eric S. Raymond Date: Sat, 6 May 1995 07:33:29 +0000 (+0000) Subject: Version 1.8. Works under Linux again. X-Git-Tag: 1.7 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=a65f5d66a36f1038198533ddc4d3688b8a018dc8;p=vh.git Version 1.8. Works under Linux again. --- diff --git a/Makefile b/Makefile index 53ee4bd..4e1ecfe 100644 --- a/Makefile +++ b/Makefile @@ -14,12 +14,13 @@ # 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 @@ -34,13 +35,6 @@ LDFLAGS = -s $(LIBS) # 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 diff --git a/READ.ME b/READ.ME index 3118958..15f44c1 100644 --- a/READ.ME +++ b/READ.ME @@ -1,11 +1,11 @@ - 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. @@ -182,6 +182,8 @@ get_dialogue() and message() functions; see browse.c for models. 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) diff --git a/browse.c b/browse.c index 71d5462..ca05c2d 100644 --- a/browse.c +++ b/browse.c @@ -1326,6 +1326,16 @@ char **argv; 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]) diff --git a/screen.h b/screen.h index 158a3ca..738e2ed 100644 --- a/screen.h +++ b/screen.h @@ -11,13 +11,8 @@ #define OLDCURSES #endif /* defined(BSD) && !defined(NCURSES) */ -#ifdef NCURSES -#include -#else +#if defined(CURSES) || defined(NCURSES) #include -#endif - -#ifdef CURSES #else typedef char bool; #define FALSE 0