summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-03-16 15:25:33 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-03-16 15:25:33 +0000
commit07c681d72d77970b77c37f0f06a1e986fd0e2a2d (patch)
tree613837036c0c544d06d18f1f3e695a49175643d6 /lib
parent07e0dfc13993b486e630dcaa78ce13cd5d8901ab (diff)
ncurses-4.2-990316
Diffstat (limited to 'lib')
-rw-r--r--lib/libcurses/curses.h4
-rw-r--r--lib/libcurses/curses.priv.h8
-rw-r--r--lib/libcurses/tty/hashmap.c14
3 files changed, 15 insertions, 11 deletions
diff --git a/lib/libcurses/curses.h b/lib/libcurses/curses.h
index 3ab4fde0492..be2e2a4f954 100644
--- a/lib/libcurses/curses.h
+++ b/lib/libcurses/curses.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: curses.h,v 1.25 1999/03/15 19:12:19 millert Exp $ */
+/* $OpenBSD: curses.h,v 1.26 1999/03/16 15:25:08 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -50,7 +50,7 @@
/* These are defined only in curses.h, and are used for conditional compiles */
#define NCURSES_VERSION_MAJOR 5
#define NCURSES_VERSION_MINOR 0
-#define NCURSES_VERSION_PATCH 990314
+#define NCURSES_VERSION_PATCH 990316
/* This is defined in more than one ncurses header, for identification */
#undef NCURSES_VERSION
diff --git a/lib/libcurses/curses.priv.h b/lib/libcurses/curses.priv.h
index 09c2eb733e1..68cf300f167 100644
--- a/lib/libcurses/curses.priv.h
+++ b/lib/libcurses/curses.priv.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: curses.priv.h,v 1.16 1999/03/15 19:12:21 millert Exp $ */
+/* $OpenBSD: curses.priv.h,v 1.17 1999/03/16 15:25:08 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -35,7 +35,7 @@
/*
- * $From: curses.priv.h,v 1.138 1999/03/14 12:25:18 tom Exp $
+ * $From: curses.priv.h,v 1.139 1999/03/16 01:45:35 tom Exp $
*
* curses.priv.h
*
@@ -629,6 +629,10 @@ extern void _nc_expanded(void);
#endif
+#if !HAVE_GETCWD
+#define getcwd(buf,len) getwd(buf)
+#endif
+
/* doalloc.c */
extern void *_nc_doalloc(void *, size_t);
#if !HAVE_STRDUP
diff --git a/lib/libcurses/tty/hashmap.c b/lib/libcurses/tty/hashmap.c
index ec5617456a1..a7999113814 100644
--- a/lib/libcurses/tty/hashmap.c
+++ b/lib/libcurses/tty/hashmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hashmap.c,v 1.2 1999/03/02 06:23:30 millert Exp $ */
+/* $OpenBSD: hashmap.c,v 1.3 1999/03/16 15:25:08 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -72,7 +72,7 @@ AUTHOR
#include <curses.priv.h>
#include <term.h> /* for back_color_erase */
-MODULE_ID("$From: hashmap.c,v 1.29 1999/02/27 20:02:24 tom Exp $")
+MODULE_ID("$From: hashmap.c,v 1.32 1999/03/16 11:40:53 Alexander.V.Lukyanov Exp $")
#ifdef HASHDEBUG
@@ -122,7 +122,7 @@ static int update_cost(chtype *from,chtype *to)
int i;
for (i=TEXTWIDTH; i>0; i--)
- if (*from++ != *to++)
+ if (*from++ != *to++)
cost++;
return cost;
@@ -137,7 +137,7 @@ static int update_cost_from_blank(chtype *to)
blank |= (stdscr->_bkgd & A_COLOR);
for (i=TEXTWIDTH; i>0; i--)
- if (blank != *to++)
+ if (blank != *to++)
cost++;
return cost;
@@ -396,7 +396,7 @@ void _nc_hash_map(void)
while (i < screen_lines && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i == shift)
i++;
size = i - start;
- if (size <= abs(shift))
+ if (size < 3 || size+size/8 < abs(shift))
{
while (start < i)
{
@@ -462,7 +462,7 @@ usage(void)
};
size_t n;
for (n = 0; n < sizeof(table)/sizeof(table[0]); n++)
- fprintf(stderr, "%s\n", table[n]);
+ fprintf(stderr, "%s\n", table[n]);
}
int
@@ -480,7 +480,7 @@ main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED)
}
if (isatty(fileno(stdin)))
- usage();
+ usage();
#ifdef TRACE
_nc_tracing = TRACE_MOVE;