diff options
author | Bruno Haible <bruno@clisp.org> | 2011-02-06 15:51:55 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-02-07 23:36:08 +0100 |
commit | cbe8a0a3fe09047b99e5c0cfb67f45634d036487 (patch) | |
tree | 1d601d5061599d1be1f1a34e469477dd8ee053b3 /lib/wcswidth.c | |
parent | cdddb1e1f27b899a9580d3ad289539c3c124d045 (diff) | |
download | gnulib-cbe8a0a3fe09047b99e5c0cfb67f45634d036487.tar.gz |
New module 'wcswidth'.
* modules/wcswidth: New file.
* lib/wchar.in.h (wcswidth): New declaration.
* lib/wcswidth.c: New file.
* lib/wcswidth-impl.h: New file, from libutf8 with modifications.
* m4/wcswidth.m4: New file.
* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcswidth is declared.
(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSWIDTH, HAVE_WCSWIDTH,
REPLACE_WCSWIDTH.
* modules/wchar (Makefile.am): Substitute GNULIB_WCSWIDTH,
HAVE_WCSWIDTH, REPLACE_WCSWIDTH.
* tests/test-wchar-c++.cc: Test the declaration of wcswidth.
* doc/posix-functions/wcswidth.texi: Mention the new module.
Diffstat (limited to 'lib/wcswidth.c')
-rw-r--r-- | lib/wcswidth.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/wcswidth.c b/lib/wcswidth.c new file mode 100644 index 0000000000..3133c8445a --- /dev/null +++ b/lib/wcswidth.c @@ -0,0 +1,23 @@ +/* Determine number of screen columns needed for a size-bounded wide string. + 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/>. */ + +#include <config.h> + +/* Specification. */ +#include <wchar.h> + +#include "wcswidth-impl.h" |