xref: /original-bsd/lib/libcurses/addch.c (revision f8557398)
19945c26aSdist /*
2*f8557398Sbostic  * Copyright (c) 1981, 1993, 1994
32a0072c5Sbostic  *	The Regents of the University of California.  All rights reserved.
40c41a22eSbostic  *
57a08b3b5Sbostic  * %sccs.include.redist.c%
69945c26aSdist  */
79945c26aSdist 
89945c26aSdist #ifndef lint
9*f8557398Sbostic static char sccsid[] = "@(#)addch.c	8.2 (Berkeley) 05/04/94";
100c41a22eSbostic #endif	/* not lint */
119945c26aSdist 
12*f8557398Sbostic #include "curses.h"
13be8b67dbSarnold 
14be8b67dbSarnold /*
15af9f010cSbostic  * waddch --
16af9f010cSbostic  *	Add the character to the current position in the given window.
17be8b67dbSarnold  *
18be8b67dbSarnold  */
19af9f010cSbostic int
waddch(win,ch)20b872a585Sbostic waddch(win, ch)
21a28c2b31Sminshall 	WINDOW *win;
22af9f010cSbostic 	int ch;
23be8b67dbSarnold {
247fc9242dSbostic 	__LDATA buf;
2516ec850bSelan 
2616ec850bSelan 	buf.ch = ch;
2716ec850bSelan 	buf.attr = 0;
28f2ffb49aSelan 	return (__waddch(win, &buf));
2945b98ff6Selan }
3045b98ff6Selan 
3145b98ff6Selan int
__waddch(win,dp)3216ec850bSelan __waddch(win, dp)
3345b98ff6Selan 	WINDOW *win;
3416ec850bSelan 	__LDATA *dp;
3545b98ff6Selan {
367fc9242dSbostic 	char buf[2];
37af9f010cSbostic 
3816ec850bSelan 	buf[0] = dp->ch;
3916ec850bSelan 	return (__waddbytes(win, buf, 1, dp->attr & __STANDOUT));
40c19918a2Sarnold }
41