From 666d3684656a5157b23c3b7c4a10c07e27c9adaf Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 7 Nov 1993 21:15:16 +0000 Subject: [PATCH] Tweak version string. --- browse.c | 14 ++++++++++---- screen.c | 10 +++++----- screen.h | 15 ++++++--------- vh.c | 6 ++++-- 4 files changed, 25 insertions(+), 20 deletions(-) diff --git a/browse.c b/browse.c index e9ea078..71d5462 100644 --- 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))); } diff --git a/screen.c b/screen.c index 5b90ba1..8f7dd8c 100644 --- 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 */ diff --git a/screen.h b/screen.h index 3377e5f..70751f0 100644 --- 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 #else #include -#endif /* linux */ +#endif + +#ifdef CURSES #else typedef char bool; #define FALSE 0 diff --git a/vh.c b/vh.c index 981cf2f..9529a57 100644 --- 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); -- 2.43.0