view lib/towctrans-impl.h @ 14322:4d31d731ac62

New module 'towctrans'. * modules/towctrans: New file. * lib/wctype.in.h (towctrans): New declaration. * lib/towctrans.c: New file. * lib/towctrans-impl.h: New file. * m4/towctrans.m4: New file. * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether towctrans is declared. (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_TOWCTRANS. * modules/wctype-h (Makefile.am): Substitute GNULIB_TOWCTRANS. * tests/test-wctype-h-c++.cc: Test the declaration of towctrans. * doc/posix-functions/towctrans.texi: Mention the new module.
author Bruno Haible <bruno@clisp.org>
date Mon, 07 Feb 2011 00:29:31 +0100
parents
children 8250f2777afc
line wrap: on
line source

/* Convert a wide character using a case mapping.
   Copyright (C) 2011 Free Software Foundation, Inc.
   Written by Bruno Haible <bruno@clisp.org>, 2011.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

wint_t
towctrans (wint_t wc, wctrans_t desc)
{
  return ((wint_t (*) (wint_t)) desc) (wc);
}