Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses KNF
details: https://anonhg.NetBSD.org/src/rev/a217d6e4ba54
branches: trunk
changeset: 350155:a217d6e4ba54
user: roy <roy%NetBSD.org@localhost>
date: Fri Jan 06 14:06:00 2017 +0000
description:
KNF
diffstat:
lib/libcurses/addbytes.c | 9 +++++++--
lib/libcurses/addch.c | 17 ++++++++++-------
2 files changed, 17 insertions(+), 9 deletions(-)
diffs (130 lines):
diff -r 83b51feabf67 -r a217d6e4ba54 lib/libcurses/addbytes.c
--- a/lib/libcurses/addbytes.c Fri Jan 06 13:53:18 2017 +0000
+++ b/lib/libcurses/addbytes.c Fri Jan 06 14:06:00 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: addbytes.c,v 1.45 2017/01/02 10:28:34 roy Exp $ */
+/* $NetBSD: addbytes.c,v 1.46 2017/01/06 14:06:45 roy Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)addbytes.c 8.4 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: addbytes.c,v 1.45 2017/01/02 10:28:34 roy Exp $");
+__RCSID("$NetBSD: addbytes.c,v 1.46 2017/01/06 14:06:45 roy Exp $");
#endif
#endif /* not lint */
@@ -60,6 +60,7 @@
int
addbytes(const char *bytes, int count)
{
+
return _cursesi_waddbytes(stdscr, bytes, count, 0, 1);
}
@@ -70,6 +71,7 @@
int
waddbytes(WINDOW *win, const char *bytes, int count)
{
+
return _cursesi_waddbytes(win, bytes, count, 0, 1);
}
@@ -80,6 +82,7 @@
int
mvaddbytes(int y, int x, const char *bytes, int count)
{
+
return mvwaddbytes(stdscr, y, x, bytes, count);
}
@@ -90,6 +93,7 @@
int
mvwaddbytes(WINDOW *win, int y, int x, const char *bytes, int count)
{
+
if (wmove(win, y, x) == ERR)
return ERR;
@@ -101,6 +105,7 @@
int
__waddbytes(WINDOW *win, const char *bytes, int count, attr_t attr)
{
+
return _cursesi_waddbytes(win, bytes, count, attr, 1);
}
diff -r 83b51feabf67 -r a217d6e4ba54 lib/libcurses/addch.c
--- a/lib/libcurses/addch.c Fri Jan 06 13:53:18 2017 +0000
+++ b/lib/libcurses/addch.c Fri Jan 06 14:06:00 2017 +0000
@@ -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 @@
int
addch(chtype ch)
{
+
return waddch(stdscr, ch);
}
@@ -61,6 +62,7 @@
int
mvaddch(int y, int x, chtype ch)
{
+
return mvwaddch(stdscr, y, x, ch);
}
@@ -71,6 +73,7 @@
int
mvwaddch(WINDOW *win, int y, int x, chtype ch)
{
+
if (wmove(win, y, x) == ERR)
return ERR;
@@ -96,8 +99,8 @@
#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 @@
#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 @@
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);
}
Home |
Main Index |
Thread Index |
Old Index