aboutsummaryrefslogtreecommitdiff
path: root/ncurses/widechar/lib_wunctrl.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-02-28 19:18:07 +0000
committerXin LI <delphij@FreeBSD.org>2014-02-28 19:18:07 +0000
commita0044ffc69cfe39a3b0b2d208e0952254555afc6 (patch)
tree7b2d708d03277cdd2560e9ce6572bdafc2e58bab /ncurses/widechar/lib_wunctrl.c
parent4b819fa20a8d007a10f2d3e8d6a5dedf7f18fc9a (diff)
downloadsrc-a0044ffc69cfe39a3b0b2d208e0952254555afc6.tar.gz
src-a0044ffc69cfe39a3b0b2d208e0952254555afc6.zip
Redo import of ncurses 5.9 (stripped).vendor/ncurses/5.9-20110404_stripped
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=262617 svn path=/vendor/ncurses/5.9-20110404_stripped/; revision=262631; tag=vendor/ncurses/5.9-20110404_stripped
Diffstat (limited to 'ncurses/widechar/lib_wunctrl.c')
-rw-r--r--ncurses/widechar/lib_wunctrl.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/ncurses/widechar/lib_wunctrl.c b/ncurses/widechar/lib_wunctrl.c
index be2259acdcff..50958e44c7bb 100644
--- a/ncurses/widechar/lib_wunctrl.c
+++ b/ncurses/widechar/lib_wunctrl.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2001-2005,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 2001-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -35,21 +35,31 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_wunctrl.c,v 1.12 2007/06/12 20:22:32 tom Exp $")
+MODULE_ID("$Id: lib_wunctrl.c,v 1.14 2010/12/19 01:42:15 tom Exp $")
NCURSES_EXPORT(wchar_t *)
-wunctrl(cchar_t *wc)
+NCURSES_SP_NAME(wunctrl) (NCURSES_SP_DCLx cchar_t *wc)
{
- static wchar_t str[CCHARW_MAX + 1], *sp;
+ static wchar_t str[CCHARW_MAX + 1], *wsp;
if (Charable(*wc)) {
- const char *p = unctrl((unsigned) _nc_to_char((wint_t) CharOf(*wc)));
+ const char *p =
+ NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx
+ (unsigned) _nc_to_char((wint_t)CharOf(*wc)));
- for (sp = str; *p; ++p) {
- *sp++ = _nc_to_widechar(*p);
+ for (wsp = str; *p; ++p) {
+ *wsp++ = (wchar_t) _nc_to_widechar(*p);
}
- *sp = 0;
+ *wsp = 0;
return str;
} else
return wc->chars;
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(wchar_t *)
+wunctrl(cchar_t *wc)
+{
+ return NCURSES_SP_NAME(wunctrl) (CURRENT_SCREEN, wc);
+}
+#endif