summaryrefslogtreecommitdiff
path: root/lib/libcurses/base/lib_hline.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-06-19 03:54:00 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-06-19 03:54:00 +0000
commitd6e8f609245bfd13a1aee14a2347d3a3a6125319 (patch)
tree5633e2c339f330e0db835a1a8834519826c9f921 /lib/libcurses/base/lib_hline.c
parente11e5df3fd5c0ef8be778b1ae185ee1842790d3e (diff)
ncurses-5.0-20000617
Diffstat (limited to 'lib/libcurses/base/lib_hline.c')
-rw-r--r--lib/libcurses/base/lib_hline.c51
1 files changed, 25 insertions, 26 deletions
diff --git a/lib/libcurses/base/lib_hline.c b/lib/libcurses/base/lib_hline.c
index a9c7d8d2d13..9fec35b52df 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.1 1999/01/18 19:09:46 millert Exp $ */
+/* $OpenBSD: lib_hline.c,v 1.2 2000/06/19 03:53:42 millert Exp $ */
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2000 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 *
@@ -33,8 +33,6 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
-
-
/*
** lib_hline.c
**
@@ -44,35 +42,36 @@
#include <curses.priv.h>
-MODULE_ID("$From: lib_hline.c,v 1.4 1998/06/28 00:11:01 tom Exp $")
+MODULE_ID("$From: lib_hline.c,v 1.5 2000/04/29 21:14:30 tom Exp $")
-int whline(WINDOW *win, chtype ch, int n)
+int
+whline(WINDOW *win, chtype ch, int n)
{
-int code = ERR;
-short start;
-short end;
+ int code = ERR;
+ NCURSES_SIZE_T start;
+ NCURSES_SIZE_T end;
- T((T_CALLED("whline(%p,%s,%d)"), win, _tracechtype(ch), n));
+ T((T_CALLED("whline(%p,%s,%d)"), win, _tracechtype(ch), n));
- if (win) {
- struct ldat *line = &(win->_line[win->_cury]);
+ if (win) {
+ struct ldat *line = &(win->_line[win->_cury]);
- start = win->_curx;
- end = start + n - 1;
- if (end > win->_maxx)
- end = win->_maxx;
+ start = win->_curx;
+ end = start + n - 1;
+ if (end > win->_maxx)
+ end = win->_maxx;
- CHANGED_RANGE(line, start, end);
+ CHANGED_RANGE(line, start, end);
- if (ch == 0)
- ch = ACS_HLINE;
- ch = _nc_render(win, ch);
+ if (ch == 0)
+ ch = ACS_HLINE;
+ ch = _nc_render(win, ch);
- while ( end >= start) {
- line->text[end] = ch;
- end--;
- }
- code = OK;
+ while (end >= start) {
+ line->text[end] = ch;
+ end--;
}
- returnCode(code);
+ code = OK;
+ }
+ returnCode(code);
}