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/tty.c | |
| parent | 599840187d9b53fe3353daa7f2892b387a1c2f29 (diff) | |
Merge in wide curses code done as a Summer of Code project by
Ruibiao Qiu.
Diffstat (limited to 'lib/libcurses/tty.c')
| -rw-r--r-- | lib/libcurses/tty.c | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/lib/libcurses/tty.c b/lib/libcurses/tty.c index dbdbef089fc..7127d2ef3da 100644 --- a/lib/libcurses/tty.c +++ b/lib/libcurses/tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.39 2007/01/21 13:25:36 jdc Exp $ */ +/* $NetBSD: tty.c,v 1.40 2007/05/28 15:01:58 blymn Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)tty.c 8.6 (Berkeley) 1/10/95"; #else -__RCSID("$NetBSD: tty.c,v 1.39 2007/01/21 13:25:36 jdc Exp $"); +__RCSID("$NetBSD: tty.c,v 1.40 2007/05/28 15:01:58 blymn Exp $"); #endif #endif /* not lint */ @@ -630,3 +630,37 @@ killchar(void) return 0; return _cursesi_screen->baset.c_cc[VKILL]; } + +/* + * erasewchar -- + * Return the wide character of the erase key. + */ +int +erasewchar( wchar_t *ch ) +{ +#ifndef HAVE_WCHAR + return ERR; +#else + if (_cursesi_screen->notty == TRUE) + return ERR; + *ch = _cursesi_screen->baset.c_cc[VERASE]; + return OK; +#endif /* HAVE_WCHAR */ +} + +/* + * killwchar -- + * Return the wide character of the kill key. + */ +int +killwchar( wchar_t *ch ) +{ +#ifndef HAVE_WCHAR + return ERR; +#else + if (_cursesi_screen->notty == TRUE) + return 0; + *ch = _cursesi_screen->baset.c_cc[VKILL]; + return OK; +#endif /* HAVE_WCHAR */ +} |
