summaryrefslogtreecommitdiffstats
path: root/lib/libcurses/base/lib_hline.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2010-01-12 23:21:58 +0000
committernicm <nicm@openbsd.org>2010-01-12 23:21:58 +0000
commit81d8c4e1e65ef590376b5b08744af794c42bd575 (patch)
tree7699ed6e10b41563ce3a6734235390cce070489c /lib/libcurses/base/lib_hline.c
parentsave errno wrapping in a signal handler (diff)
downloadwireguard-openbsd-81d8c4e1e65ef590376b5b08744af794c42bd575.tar.xz
wireguard-openbsd-81d8c4e1e65ef590376b5b08744af794c42bd575.zip
Update to ncurses 5.7, with local changes reapplied.
This is around eight years worth of changes (previously we were around ncurses 5.2), too many to list - many bug fixes and also a few new functions. A major bump for libcurses, libpanel, libform and libmenu. ok deraadt
Diffstat (limited to 'lib/libcurses/base/lib_hline.c')
-rw-r--r--lib/libcurses/base/lib_hline.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/libcurses/base/lib_hline.c b/lib/libcurses/base/lib_hline.c
index 6854c5a61a1..58d83488068 100644
--- a/lib/libcurses/base/lib_hline.c
+++ b/lib/libcurses/base/lib_hline.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: lib_hline.c,v 1.4 2001/01/22 18:01:40 millert Exp $ */
+/* $OpenBSD: lib_hline.c,v 1.5 2010/01/12 23:22:05 nicm Exp $ */
/****************************************************************************
- * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -42,7 +42,7 @@
#include <curses.priv.h>
-MODULE_ID("$From: lib_hline.c,v 1.8 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_hline.c,v 1.5 2010/01/12 23:22:05 nicm Exp $")
NCURSES_EXPORT(int)
whline(WINDOW *win, chtype ch, int n)
@@ -55,6 +55,7 @@ whline(WINDOW *win, chtype ch, int n)
if (win) {
struct ldat *line = &(win->_line[win->_cury]);
+ NCURSES_CH_T wch;
start = win->_curx;
end = start + n - 1;
@@ -64,11 +65,13 @@ whline(WINDOW *win, chtype ch, int n)
CHANGED_RANGE(line, start, end);
if (ch == 0)
- ch = ACS_HLINE;
- ch = _nc_render(win, ch);
+ SetChar2(wch, ACS_HLINE);
+ else
+ SetChar2(wch, ch);
+ wch = _nc_render(win, wch);
while (end >= start) {
- line->text[end] = ch;
+ line->text[end] = wch;
end--;
}