Module Name: src
Committed By: roy
Date: Fri Jan 6 14:06:00 UTC 2017
Modified Files:
src/lib/libcurses: addch.c
Log Message:
KNF
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libcurses/addch.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libcurses/addch.c
diff -u src/lib/libcurses/addch.c:1.17 src/lib/libcurses/addch.c:1.18
--- src/lib/libcurses/addch.c:1.17 Sat Nov 9 11:16:59 2013
+++ src/lib/libcurses/addch.c Fri Jan 6 14:06:00 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: addch.c,v 1.17 2013/11/09 11:16:59 blymn Exp $ */
+/* $NetBSD: addch.c,v 1.18 2017/01/06 14:06:00 roy Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)addch.c 8.2 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: addch.c,v 1.17 2013/11/09 11:16:59 blymn Exp $");
+__RCSID("$NetBSD: addch.c,v 1.18 2017/01/06 14:06:00 roy Exp $");
#endif
#endif /* not lint */
@@ -51,6 +51,7 @@ __RCSID("$NetBSD: addch.c,v 1.17 2013/11
int
addch(chtype ch)
{
+
return waddch(stdscr, ch);
}
@@ -61,6 +62,7 @@ addch(chtype ch)
int
mvaddch(int y, int x, chtype ch)
{
+
return mvwaddch(stdscr, y, x, ch);
}
@@ -71,6 +73,7 @@ mvaddch(int y, int x, chtype ch)
int
mvwaddch(WINDOW *win, int y, int x, chtype ch)
{
+
if (wmove(win, y, x) == ERR)
return ERR;
@@ -96,8 +99,8 @@ waddch(WINDOW *win, chtype ch)
#ifdef HAVE_WCHAR
__cursesi_chtype_to_cchar(ch, &cc);
#else
- buf.ch = (wchar_t) ch & __CHARTEXT;
- buf.attr = (attr_t) ch & __ATTRIBUTES;
+ buf.ch = (wchar_t)ch & __CHARTEXT;
+ buf.attr = (attr_t)ch & __ATTRIBUTES;
#endif
#ifdef DEBUG
@@ -111,9 +114,9 @@ waddch(WINDOW *win, chtype ch)
#endif
#ifdef HAVE_WCHAR
- return (wadd_wch(win, &cc));
+ return wadd_wch(win, &cc);
#else
- return (__waddch(win, &buf));
+ return __waddch(win, &buf);
#endif
}
@@ -124,5 +127,5 @@ __waddch(WINDOW *win, __LDATA *dp)
buf[0] = dp->ch;
buf[1] = '\0';
- return (_cursesi_waddbytes(win, buf, 1, dp->attr, 1));
+ return _cursesi_waddbytes(win, buf, 1, dp->attr, 1);
}