Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Add bkgd() and bkgdset() (which were previousl...



details:   https://anonhg.NetBSD.org/src/rev/2fcef3b400e7
branches:  trunk
changeset: 484990:2fcef3b400e7
user:      jdc <jdc%NetBSD.org@localhost>
date:      Sun Apr 16 09:52:49 2000 +0000

description:
Add bkgd() and bkgdset() (which were previously just macros).

diffstat:

 lib/libcurses/background.c |  26 +++++++++++++++++++++++---
 lib/libcurses/curses.h     |   4 +++-
 2 files changed, 26 insertions(+), 4 deletions(-)

diffs (72 lines):

diff -r 026ba182b0a0 -r 2fcef3b400e7 lib/libcurses/background.c
--- a/lib/libcurses/background.c        Sun Apr 16 09:48:09 2000 +0000
+++ b/lib/libcurses/background.c        Sun Apr 16 09:52:49 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: background.c,v 1.3 2000/04/15 13:17:02 blymn Exp $     */
+/*     $NetBSD: background.c,v 1.4 2000/04/16 09:52:49 jdc Exp $       */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -40,6 +40,26 @@
 #include "curses_private.h"
 
 /*
+ * bkgdset
+ *     Set new background attributes on stdscr.
+ */
+void
+bkgdset(chtype ch)
+{
+       wbkgdset(stdscr, ch);
+}
+
+/*
+ * bkgd --
+ *     Set new background and new background attributes on stdscr.
+ */
+int
+bkgd(chtype ch)
+{
+       return(wbkgd(stdscr, ch));
+}
+
+/*
  * wbkgdset
  *     Set new background attributes.
  */
@@ -49,7 +69,7 @@
        win->bchar = (wchar_t) ch & A_CHARTEXT;
        win->battr = (attr_t) ch & A_ATTRIBUTES;
 #ifdef DEBUG
-       __CTRACE ("wbkgdset: %08x, %08x\n", win->bchar, win->battr);
+       __CTRACE("wbkgdset: %08x, %08x\n", win->bchar, win->battr);
 #endif
 }
 
@@ -62,7 +82,7 @@
 {
        wbkgdset(win, ch);
        __touchwin(win);
-       return (OK);
+       return(OK);
 }
 
 /*
diff -r 026ba182b0a0 -r 2fcef3b400e7 lib/libcurses/curses.h
--- a/lib/libcurses/curses.h    Sun Apr 16 09:48:09 2000 +0000
+++ b/lib/libcurses/curses.h    Sun Apr 16 09:52:49 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: curses.h,v 1.35 2000/04/16 01:23:11 thorpej Exp $      */
+/*     $NetBSD: curses.h,v 1.36 2000/04/16 09:52:49 jdc Exp $  */
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -423,6 +423,8 @@
 int addch(chtype ch);
 int addnstr(const char *str, int n);
 int addstr(const char *str);
+int bkgd(chtype ch);
+void bkgdset(chtype ch);
 int border(chtype left, chtype right, chtype top, chtype bottom,
           chtype topleft, chtype topright, chtype botleft, chtype botright);
 int clear(void);



Home | Main Index | Thread Index | Old Index