]> thyrsus.com Git - vh.git/commitdiff
Tweak version string.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 7 Nov 1993 21:15:16 +0000 (21:15 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 7 Nov 1993 21:15:16 +0000 (21:15 +0000)
browse.c
screen.c
screen.h
vh.c

index e9ea07823e74d9baf6b8ff890a09051b3906a2d7..71d546212bea4ad2aad0215273ee1b0f5d61d645 100644 (file)
--- a/browse.c
+++ b/browse.c
@@ -113,7 +113,13 @@ typedef struct
 }
 strip;
 static strip panel[] = {{0, 8, TAB}, {11, 17, CTL('Q')}, {21, 27, CTL('C')}};
-#define PANELSTART     (COLS - 1 - strlen((cf==&vhi) ? IBANNER : TBANNER) + 1)
+
+/*
+ * Note: I had to descrement this by one to get around a wraparound bug in
+ * ncurses.  Doesn't seems to have had any visible effect on the SVr4
+ * version, but...
+ */
+#define PANELSTART     (COLS - 1 - strlen((cf==&vhi) ? IBANNER : TBANNER))
 
 #define NOREFS "No references on this page"
 #define NOSRCH "No previous search"
@@ -149,7 +155,7 @@ const static char BDLOOK[] =        "Lookup failed";
 
 const static char *help_screen[] =
 {
-"                          Jargon File Browser v. 1.5",
+"                          Jargon File Browser v. 1.6",
 "           Copyright 1991 by Raymond D. Gardner & Eric S. Raymond",
 "             All Rights Reserved; Free Redistribution Encouraged",
 "",
@@ -713,7 +719,7 @@ bool        cok;
     (void)noecho();
 #ifndef OLDCURSES
     (void)keypad(stdscr, TRUE);
-#endif /* BSD */
+#endif /* OLDCURSES */
 #endif /* CURSES */
 
 #ifdef ATT
@@ -1195,7 +1201,7 @@ linefwd:
                    mvaddstr(i, 0, linbuf);
                    /*
                     * This is actually faster, and creates less
-                    * flicker, than clearing the screen.
+                    * flicker, than clearing the line.
                     */
                    addstr(nblanks(COLS - strlen(linbuf)));
                }
index 5b90ba1c00a76142d308f5e82d660a75269a502e..8f7dd8c27d88bdf362246c09a371515ef19e30bb 100644 (file)
--- a/screen.c
+++ b/screen.c
@@ -327,10 +327,10 @@ int pn, fg, bg;
 
 #endif /* CURSES */
 
-#ifdef BSD
+#ifdef OLDCURSES
 /*******************************************************************
  *
- * Support for BSD, which is missing some stuff...
+ * Support for BSD curses, which is missing some stuff...
  *
  ******************************************************************/
 
@@ -393,7 +393,7 @@ unsigned char acs_map[] =
    /* ACS_LANTERN */   '#',    /* lantern symbol */
    /* ACS_BLOCK */     '#',    /* solid square block */
 };
-#endif /* BSD */
+#endif /* OLDCURSES */
 
 #ifdef MSDOS
 /*******************************************************************
@@ -1156,7 +1156,7 @@ unsigned char acs_map[] =
 };
 #endif /* MSDOS */
 
-#if !defined(CURSES) || defined(BSD) || defined(AMIGA)
+#if defined(OLDCURSES) || defined(AMIGA)
 /* character push queue */
 static chtype getchq[GQDEPTH];
 static int gqc = 0;
@@ -1189,6 +1189,6 @@ int egetch()
 {
     return(cgetch());
 }
-#endif /* !defined(CURSES) || defined(BSD) */
+#endif /* !defined(OLDCURSES) && !defined(AMIGA) */
 
 /* screen.c ends here */
index 3377e5f36951cba61213294b99ffce7cd491b030..70751f04d7dcc266944fb0bfb2fbe316f6f9e137 100644 (file)
--- a/screen.h
+++ b/screen.h
@@ -7,20 +7,17 @@
 #define MOUSE          /* generic mouse handing */
 #endif /* ATTMOUSE */
 
-#ifdef linux
-#undef BSD
-#endif /* linux */
-
-#ifdef BSD
+#if defined(BSD) && !defined(NCURSES)
 #define OLDCURSES
-#endif /* BSD */
+#endif /* defined(BSD) && !defined(NCURSES) */
 
-#ifdef CURSES
-#ifdef linux
+#ifdef NCURSES
 #include <ncurses.h>
 #else
 #include <curses.h>
-#endif /* linux */
+#endif
+
+#ifdef CURSES
 #else
 typedef        char bool;
 #define FALSE  0
diff --git a/vh.c b/vh.c
index 981cf2f947329fcc076a32758045a54f309a0ccf..9529a576a8a168795cf067253caca7949a0f86cf 100644 (file)
--- a/vh.c
+++ b/vh.c
@@ -987,6 +987,7 @@ char        *name, *path;
 {
     extern char        *getenv();
     char       *srch, *cp;
+    char       tmp[512];
 
     if ((srch = getenv("VHPATH")) == (char *)NULL)
        srch = VHPATH;
@@ -1003,11 +1004,12 @@ char    *name, *path;
 #define PATHSEP        "/"
 #endif /* MSDOS */
 
-    cp = strtok(srch, LISTSEP);
+    (void) strcpy(tmp, srch);
+    cp = strtok(tmp, LISTSEP);
     do {
        (void) strcpy(path, cp);
 #ifdef AMIGA
-if (path[strlen(path) - 1] != ':') { /* e.g. "DH0:" */
+       if (path[strlen(path) - 1] != ':') { /* e.g. "DH0:" */
 #endif
        if (path[strlen(path) - 1] != PATHSEP[0])
            (void) strcat(path, PATHSEP);