From 0294a182a1629b1d854b84906e73487d6cb75fba Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sat, 30 Apr 2011 10:55:14 +0000 Subject: Import a stock copy of ncurses 5.8 into the vendor space. It seems both local changes we made to 5.7 have already been fixed upstream properly, so there is no need to preserve the changes. Also, with SVN we import full source trees. Unlike CVS, where we removed unneeded cruft. --- ncurses/widechar/lib_wunctrl.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'ncurses/widechar/lib_wunctrl.c') 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 -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 -- cgit v1.2.3