Module Name:    src
Committed By:   uwe
Date:           Thu Nov 22 23:29:09 UTC 2018

Modified Files:
        src/lib/libcurses: attributes.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libcurses/attributes.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/attributes.c
diff -u src/lib/libcurses/attributes.c:1.24 src/lib/libcurses/attributes.c:1.25
--- src/lib/libcurses/attributes.c:1.24	Mon Oct 29 01:27:39 2018
+++ src/lib/libcurses/attributes.c	Thu Nov 22 23:29:09 2018
@@ -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 @@ wattr_set(WINDOW *win, attr_t attr, shor
 }
 
 /*
+ * 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 @@ wattrset(WINDOW *win, int attr)
 }
 
 /*
- * 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 @@ term_attrs(void)
  * __wcolor_set --
  * Set color attribute on window
  */
-void
+static void
 __wcolor_set(WINDOW *win, attr_t attr)
 {
 	const TERMINAL *t = win->screen->term;

Reply via email to