}
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"
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",
"",
(void)noecho();
#ifndef OLDCURSES
(void)keypad(stdscr, TRUE);
-#endif /* BSD */
+#endif /* OLDCURSES */
#endif /* CURSES */
#ifdef ATT
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)));
}
#endif /* CURSES */
-#ifdef BSD
+#ifdef OLDCURSES
/*******************************************************************
*
- * Support for BSD, which is missing some stuff...
+ * Support for BSD curses, which is missing some stuff...
*
******************************************************************/
/* ACS_LANTERN */ '#', /* lantern symbol */
/* ACS_BLOCK */ '#', /* solid square block */
};
-#endif /* BSD */
+#endif /* OLDCURSES */
#ifdef MSDOS
/*******************************************************************
};
#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;
{
return(cgetch());
}
-#endif /* !defined(CURSES) || defined(BSD) */
+#endif /* !defined(OLDCURSES) && !defined(AMIGA) */
/* screen.c ends here */
#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
{
extern char *getenv();
char *srch, *cp;
+ char tmp[512];
if ((srch = getenv("VHPATH")) == (char *)NULL)
srch = VHPATH;
#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);