aboutsummaryrefslogtreecommitdiff
path: root/lib/libcurses/addch.c
diff options
context:
space:
mode:
authorsvn2git <svn2git@FreeBSD.org>1994-05-01 08:00:00 +0000
committersvn2git <svn2git@FreeBSD.org>1994-05-01 08:00:00 +0000
commita16f65c7d117419bd266c28a1901ef129a337569 (patch)
tree2626602f66dc3551e7a7c7bc9ad763c3bc7ab40a /lib/libcurses/addch.c
parent8503f4f13f77abf7adc8f7e329c6f9c1d52b6a20 (diff)
Diffstat (limited to 'lib/libcurses/addch.c')
-rw-r--r--lib/libcurses/addch.c34
1 files changed, 23 insertions, 11 deletions
diff --git a/lib/libcurses/addch.c b/lib/libcurses/addch.c
index 027c4bf94476..d1408c21fe92 100644
--- a/lib/libcurses/addch.c
+++ b/lib/libcurses/addch.c
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1981 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1981, 1993
+ * The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,19 +32,31 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)addch.c 5.5 (Berkeley) 6/1/90";
-#endif /* not lint */
+static char sccsid[] = "@(#)addch.c 8.1 (Berkeley) 6/4/93";
+#endif /* not lint */
-# include "curses.ext"
+#include <curses.h>
/*
- * This routine adds the character to the current position
+ * waddch --
+ * Add the character to the current position in the given window.
*
*/
-waddch(win, c)
-WINDOW *win;
-char c;
+int
+waddch(WINDOW *win, char ch)
{
- chtype ch = (unsigned char) c;
- return _waddbytes(win, &ch, 1);
+ __LDATA buf;
+
+ buf.ch = ch;
+ buf.attr = 0;
+ return (__waddch(win, &buf));
+}
+
+int
+__waddch(WINDOW *win, __LDATA *dp)
+{
+ char buf[2];
+
+ buf[0] = dp->ch;
+ return (__waddbytes(win, buf, 1, dp->attr & __STANDOUT));
}