summaryrefslogtreecommitdiff
path: root/lib/wcpncpy.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-02-05 15:32:00 +0100
committerBruno Haible <bruno@clisp.org>2011-02-07 23:36:04 +0100
commit49549725af344962f45720d4d332d9cf0699ebcd (patch)
treee8bdb8368d12ef769826ce3d2d43f3c01179da70 /lib/wcpncpy.c
parentcde82ba3a73b7482132a950ac0d7cb0da67a2e1c (diff)
downloadgnulib-49549725af344962f45720d4d332d9cf0699ebcd.tar.gz
New module 'wcpncpy'.
* modules/wcpncpy: New file. * lib/wchar.in.h (wcpncpy): New declaration. * lib/wcpncpy.c: New file. * lib/wcpncpy-impl.h: New file, from libutf8 with modifications. * m4/wcpncpy.m4: New file. * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcpncpy is declared. (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCPNCPY, HAVE_WCPNCPY. * modules/wchar (Makefile.am): Substitute GNULIB_WCPNCPY, HAVE_WCPNCPY. * tests/test-wchar-c++.cc: Test the declaration of wcpncpy. * doc/posix-functions/wcpncpy.texi: Mention the new module.
Diffstat (limited to 'lib/wcpncpy.c')
-rw-r--r--lib/wcpncpy.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/wcpncpy.c b/lib/wcpncpy.c
new file mode 100644
index 0000000000..287eec7156
--- /dev/null
+++ b/lib/wcpncpy.c
@@ -0,0 +1,23 @@
+/* Copy 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 "wcpncpy-impl.h"