projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pull in some of the lpt_port_test fixes from lpt.c.
[unix-history]
/
lib
/
libcurses
/
addch.c
diff --git
a/lib/libcurses/addch.c
b/lib/libcurses/addch.c
index
897660a
..
d1408c2
100644
(file)
--- 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
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@
-32,18
+32,31
@@
*/
#ifndef lint
*/
#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)
{
{
- return waddbytes(win, &c, 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));
}
}