Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libcurses Reorder "bkgrnd" functions to match the order ...



details:   https://anonhg.NetBSD.org/src/rev/4ace1cdab37d
branches:  trunk
changeset: 445969:4ace1cdab37d
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sun Nov 18 22:18:02 2018 +0000

description:
Reorder "bkgrnd" functions to match the order of old "bkgd" functions.

diffstat:

 lib/libcurses/background.c |  100 ++++++++++++++++++++++----------------------
 1 files changed, 50 insertions(+), 50 deletions(-)

diffs (165 lines):

diff -r 9094532eaa44 -r 4ace1cdab37d lib/libcurses/background.c
--- a/lib/libcurses/background.c        Sun Nov 18 22:11:38 2018 +0000
+++ b/lib/libcurses/background.c        Sun Nov 18 22:18:02 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: background.c,v 1.21 2018/11/18 22:11:38 uwe Exp $      */
+/*     $NetBSD: background.c,v 1.22 2018/11/18 22:18:02 uwe Exp $      */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: background.c,v 1.21 2018/11/18 22:11:38 uwe Exp $");
+__RCSID("$NetBSD: background.c,v 1.22 2018/11/18 22:18:02 uwe Exp $");
 #endif                         /* not lint */
 
 #include <stdlib.h>
@@ -137,50 +137,24 @@
 
 #ifdef HAVE_WCHAR
 
+void
+bkgrndset(const cchar_t *wch)
+{
+       wbkgrndset(stdscr, wch);
+}
+
+
 int
 bkgrnd(const cchar_t *wch)
 {
-       return wbkgrnd( stdscr, wch );
-}
-
-
-void
-bkgrndset(const cchar_t *wch)
-{
-       wbkgrndset( stdscr, wch );
+       return wbkgrnd(stdscr, wch);
 }
 
 
 int
 getbkgrnd(cchar_t *wch)
 {
-       return wgetbkgrnd( stdscr, wch );
-}
-
-
-int
-wbkgrnd(WINDOW *win, const cchar_t *wch)
-{
-       attr_t battr;
-
-#ifdef DEBUG
-       __CTRACE(__CTRACE_ATTR, "wbkgrnd: (%p), '%s', %x\n",
-               win, (const char *) wunctrl(wch), wch->attributes);
-#endif
-
-       /* ignore multi-column characters */
-       if (!wch->elements || wcwidth( wch->vals[ 0 ]) > 1)
-               return ERR;
-
-       /* Background attributes (check colour). */
-       battr = wch->attributes & WA_ATTRIBUTES;
-       if (__using_color && !( battr & __COLOR))
-               battr |= __default_color;
-
-       win->battr = battr;
-       wbkgrndset(win, wch);
-       __touchwin(win);
-       return OK;
+       return wgetbkgrnd(stdscr, wch);
 }
 
 
@@ -251,6 +225,32 @@
 
 
 int
+wbkgrnd(WINDOW *win, const cchar_t *wch)
+{
+       attr_t battr;
+
+#ifdef DEBUG
+       __CTRACE(__CTRACE_ATTR, "wbkgrnd: (%p), '%s', %x\n",
+               win, (const char *) wunctrl(wch), wch->attributes);
+#endif
+
+       /* ignore multi-column characters */
+       if (!wch->elements || wcwidth( wch->vals[ 0 ]) > 1)
+               return ERR;
+
+       /* Background attributes (check colour). */
+       battr = wch->attributes & WA_ATTRIBUTES;
+       if (__using_color && !( battr & __COLOR))
+               battr |= __default_color;
+
+       win->battr = battr;
+       wbkgrndset(win, wch);
+       __touchwin(win);
+       return OK;
+}
+
+
+int
 wgetbkgrnd(WINDOW *win, cchar_t *wch)
 {
        nschar_t *np;
@@ -275,6 +275,12 @@
 
 #else  /* !HAVE_WCHAR */
 
+void
+bkgrndset(const cchar_t *wch)
+{
+       return;
+}
+
 int
 bkgrnd(const cchar_t *wch)
 {
@@ -282,12 +288,6 @@
 }
 
 
-void
-bkgrndset(const cchar_t *wch)
-{
-       return;
-}
-
 int
 getbkgrnd(cchar_t *wch)
 {
@@ -295,13 +295,6 @@
 }
 
 
-int
-wbkgrnd(WINDOW *win, const cchar_t *wch)
-{
-       return ERR;
-}
-
-
 void
 wbkgrndset(WINDOW *win, const cchar_t *wch)
 {
@@ -310,6 +303,13 @@
 
 
 int
+wbkgrnd(WINDOW *win, const cchar_t *wch)
+{
+       return ERR;
+}
+
+
+int
 wgetbkgrnd(WINDOW *win, cchar_t *wch)
 {
        return ERR;



Home | Main Index | Thread Index | Old Index