X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/b811895b484dc1f0e3f2613d949b2e6bb605e3b9..3958cd1211fd7c17c60cafce34c06e6d81f5d793:/lib/libcurses/addch.c diff --git a/lib/libcurses/addch.c b/lib/libcurses/addch.c index 027c4bf944..d1408c21fe 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 /* - * 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)); }