diff options
| author | blymn <blymn@NetBSD.org> | 2007-05-28 15:01:53 +0000 |
|---|---|---|
| committer | blymn <blymn@NetBSD.org> | 2007-05-28 15:01:53 +0000 |
| commit | e124de36d8a3bb2fd90b77ec25eb7736f29ee44d (patch) | |
| tree | 0dac708fd51eee66b5194f8e69d6fe165e953031 /lib/libcurses/putchar.c | |
| parent | 599840187d9b53fe3353daa7f2892b387a1c2f29 (diff) | |
Merge in wide curses code done as a Summer of Code project by
Ruibiao Qiu.
Diffstat (limited to 'lib/libcurses/putchar.c')
| -rw-r--r-- | lib/libcurses/putchar.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/libcurses/putchar.c b/lib/libcurses/putchar.c index 2d87cf5b24c..8f77d5e87c3 100644 --- a/lib/libcurses/putchar.c +++ b/lib/libcurses/putchar.c @@ -1,4 +1,4 @@ -/* $NetBSD: putchar.c,v 1.18 2007/01/21 13:25:36 jdc Exp $ */ +/* $NetBSD: putchar.c,v 1.19 2007/05/28 15:01:57 blymn Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)putchar.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: putchar.c,v 1.18 2007/01/21 13:25:36 jdc Exp $"); +__RCSID("$NetBSD: putchar.c,v 1.19 2007/05/28 15:01:57 blymn Exp $"); #endif #endif /* not lint */ @@ -67,3 +67,24 @@ __cputchar_args(char ch, void *args) #endif putc(ch, outfd); } + +#ifdef HAVE_WCHAR +int +__cputwchar(wchar_t wch) +{ + return (putwc(wch, _cursesi_screen->outfd)); +} + +/* + * This is the same as __cputchar but the extra argument holds the file + * descriptor to write the output to. This function can only be used with + * the "new" libterm interface. + */ +void +__cputwchar_args(wchar_t wch, void *args) +{ + FILE *outfd = (FILE *) args; + + putwc(wch, outfd); +} +#endif /* HAVE_WCHAR */ |
