4.4BSD snapshot (revision 8.1); add 1993 to copyright
[unix-history] / usr / src / lib / libcurses / addch.c
CommitLineData
6e1c93d0 1/*
2f14f200
KB
2 * Copyright (c) 1981 Regents of the University of California.
3 * All rights reserved.
4 *
f1855e9f 5 * %sccs.include.redist.c%
6e1c93d0
DF
6 */
7
8#ifndef lint
75d3920d 9static char sccsid[] = "@(#)addch.c 5.11 (Berkeley) %G%";
a129fb3b 10#endif /* not lint */
6e1c93d0 11
a129fb3b 12#include <curses.h>
8b28dacd
KA
13
14/*
a129fb3b
KB
15 * waddch --
16 * Add the character to the current position in the given window.
8b28dacd 17 *
8b28dacd 18 */
a129fb3b 19int
f4c4c583 20waddch(win, ch)
a129fb3b
KB
21 WINDOW *win;
22 int ch;
1589e7d3 23{
75d3920d 24 __LDATA buf;
1c04a491
EA
25
26 buf.ch = ch;
27 buf.attr = 0;
75d3920d 28 return (__waddch(win, &buf));
1589e7d3
EA
29}
30
31int
1c04a491 32__waddch(win, dp)
1589e7d3 33 WINDOW *win;
1c04a491 34 __LDATA *dp;
8b28dacd 35{
75d3920d 36 char buf[2];
a129fb3b 37
1c04a491
EA
38 buf[0] = dp->ch;
39 return (__waddbytes(win, buf, 1, dp->attr & __STANDOUT));
60d72089 40}