summaryrefslogtreecommitdiffstats
path: root/lib/libcurses/tty/hashmap.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1999-03-16 15:25:08 +0000
committermillert <millert@openbsd.org>1999-03-16 15:25:08 +0000
commitfb43e193ec7ec9504361b10d5bc861b2aa60c497 (patch)
treebe37f671068f3f37abe8dc32b4f0dd68eec2e246 /lib/libcurses/tty/hashmap.c
parentMention changes to the default authentication behaviour. (diff)
downloadwireguard-openbsd-fb43e193ec7ec9504361b10d5bc861b2aa60c497.tar.xz
wireguard-openbsd-fb43e193ec7ec9504361b10d5bc861b2aa60c497.zip
ncurses-4.2-990316
Diffstat (limited to 'lib/libcurses/tty/hashmap.c')
-rw-r--r--lib/libcurses/tty/hashmap.c14
1 files changed, 7 insertions, 7 deletions
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;