Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Move getattrs() and wcolor_set() so that they ...



details:   https://anonhg.NetBSD.org/src/rev/1fee362da655
branches:  trunk
changeset: 994808:1fee362da655
user:      uwe <uwe%NetBSD.org@localhost>
date:      Thu Nov 22 23:29:09 2018 +0000

description:
Move getattrs() and wcolor_set() so that they are with their peers and
so that wide and non-wide functions are in the same order.  While here,
make __wcolor_set() static.  No functional change intended.

diffstat:

 lib/libcurses/attributes.c |  64 +++++++++++++++++++++++-----------------------
 1 files changed, 32 insertions(+), 32 deletions(-)

diffs (104 lines):

diff -r 1137bda3db95 -r 1fee362da655 lib/libcurses/attributes.c
--- a/lib/libcurses/attributes.c        Thu Nov 22 22:16:45 2018 +0000
+++ b/lib/libcurses/attributes.c        Thu Nov 22 23:29:09 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: attributes.c,v 1.24 2018/10/29 01:27:39 uwe Exp $      */
+/*     $NetBSD: attributes.c,v 1.25 2018/11/22 23:29:09 uwe Exp $      */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,13 +31,13 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: attributes.c,v 1.24 2018/10/29 01:27:39 uwe Exp $");
+__RCSID("$NetBSD: attributes.c,v 1.25 2018/11/22 23:29:09 uwe Exp $");
 #endif                         /* not lint */
 
 #include "curses.h"
 #include "curses_private.h"
 
-void __wcolor_set(WINDOW *, attr_t);
+static void __wcolor_set(WINDOW *, attr_t);
 
 #ifndef _CURSES_USE_MACROS
 /*
@@ -282,6 +282,34 @@
 }
 
 /*
+ * wcolor_set --
+ *     Set color pair on window
+ */
+/* ARGSUSED */
+int
+wcolor_set(WINDOW *win, short pair, void *opt)
+{
+#ifdef DEBUG
+       __CTRACE(__CTRACE_COLOR, "wolor_set: win %p, pair %d\n", win, pair);
+#endif
+       __wcolor_set(win, (attr_t) COLOR_PAIR(pair));
+       return OK;
+}
+
+/*
+ * getattrs --
+ *     Get window attributes.
+ */
+chtype
+getattrs(WINDOW *win)
+{
+#ifdef DEBUG
+       __CTRACE(__CTRACE_ATTR, "getattrs: win %p\n", win);
+#endif
+       return((chtype) win->wattr);
+}
+
+/*
  * wattron --
  *     Test and set attributes.
  */
@@ -324,34 +352,6 @@
 }
 
 /*
- * wcolor_set --
- *     Set color pair on window
- */
-/* ARGSUSED */
-int
-wcolor_set(WINDOW *win, short pair, void *opt)
-{
-#ifdef DEBUG
-       __CTRACE(__CTRACE_COLOR, "wolor_set: win %p, pair %d\n", win, pair);
-#endif
-       __wcolor_set(win, (attr_t) COLOR_PAIR(pair));
-       return OK;
-}
-
-/*
- * getattrs --
- *     Get window attributes.
- */
-chtype
-getattrs(WINDOW *win)
-{
-#ifdef DEBUG
-       __CTRACE(__CTRACE_ATTR, "getattrs: win %p\n", win);
-#endif
-       return((chtype) win->wattr);
-}
-
-/*
  * termattrs --
  *     Get terminal attributes
  */
@@ -444,7 +444,7 @@
  * __wcolor_set --
  * Set color attribute on window
  */
-void
+static void
 __wcolor_set(WINDOW *win, attr_t attr)
 {
        const TERMINAL *t = win->screen->term;



Home | Main Index | Thread Index | Old Index