aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/base/lib_touch.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
commit7a69bbfb278952228c9aa1eca241e65fcdef425e (patch)
treee83b2ef47811e687a6c54035c9af6d4a2b7f14e1 /contrib/ncurses/ncurses/base/lib_touch.c
parent18259542b2f8fa7e3f76f4bb0dd37995dfd424aa (diff)
downloadsrc-7a69bbfb278952228c9aa1eca241e65fcdef425e.tar.gz
src-7a69bbfb278952228c9aa1eca241e65fcdef425e.zip
Import ncurses-5.2-20010512 onto the vendor branch
Obtained from: ftp://dickey.his.com/ncurses/
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=76726
Diffstat (limited to 'contrib/ncurses/ncurses/base/lib_touch.c')
-rw-r--r--contrib/ncurses/ncurses/base/lib_touch.c58
1 files changed, 31 insertions, 27 deletions
diff --git a/contrib/ncurses/ncurses/base/lib_touch.c b/contrib/ncurses/ncurses/base/lib_touch.c
index 7ce863d06f10..2ac21f2e0d1f 100644
--- a/contrib/ncurses/ncurses/base/lib_touch.c
+++ b/contrib/ncurses/ncurses/base/lib_touch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,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 *
@@ -43,45 +43,49 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_touch.c,v 1.6 1998/04/11 22:55:02 tom Exp $")
+MODULE_ID("$Id: lib_touch.c,v 1.9 2000/12/10 02:43:27 tom Exp $")
-bool is_linetouched(WINDOW *win, int line)
+NCURSES_EXPORT(bool)
+is_linetouched(WINDOW *win, int line)
{
- T((T_CALLED("is_linetouched(%p,%d)"), win, line));
+ T((T_CALLED("is_linetouched(%p,%d)"), win, line));
- /* XSI doesn't define any error */
- if (!win || (line > win->_maxy) || (line < 0))
- returnCode(ERR);
+ /* XSI doesn't define any error */
+ if (!win || (line > win->_maxy) || (line < 0))
+ returnCode((bool) ERR);
- returnCode(win->_line[line].firstchar != _NOCHANGE ? TRUE : FALSE);
+ returnCode(win->_line[line].firstchar != _NOCHANGE ? TRUE : FALSE);
}
-bool is_wintouched(WINDOW *win)
+NCURSES_EXPORT(bool)
+is_wintouched(WINDOW *win)
{
-int i;
+ int i;
- T((T_CALLED("is_wintouched(%p)"), win));
+ T((T_CALLED("is_wintouched(%p)"), win));
- if (win)
- for (i = 0; i <= win->_maxy; i++)
- if (win->_line[i].firstchar != _NOCHANGE)
- returnCode(TRUE);
- returnCode(FALSE);
+ if (win)
+ for (i = 0; i <= win->_maxy; i++)
+ if (win->_line[i].firstchar != _NOCHANGE)
+ returnCode(TRUE);
+ returnCode(FALSE);
}
-int wtouchln(WINDOW *win, int y, int n, int changed)
+NCURSES_EXPORT(int)
+wtouchln(WINDOW *win, int y, int n, int changed)
{
-int i;
+ int i;
- T((T_CALLED("wtouchln(%p,%d,%d,%d)"), win, y, n, changed));
+ T((T_CALLED("wtouchln(%p,%d,%d,%d)"), win, y, n, changed));
- if (!win || (n<0) || (y<0) || (y>win->_maxy))
- returnCode(ERR);
+ if (!win || (n < 0) || (y < 0) || (y > win->_maxy))
+ returnCode(ERR);
- for (i = y; i < y+n; i++) {
- if (i>win->_maxy) break;
- win->_line[i].firstchar = changed ? 0 : _NOCHANGE;
- win->_line[i].lastchar = changed ? win->_maxx : _NOCHANGE;
- }
- returnCode(OK);
+ for (i = y; i < y + n; i++) {
+ if (i > win->_maxy)
+ break;
+ win->_line[i].firstchar = changed ? 0 : _NOCHANGE;
+ win->_line[i].lastchar = changed ? win->_maxx : _NOCHANGE;
+ }
+ returnCode(OK);
}