annotate lib/wmemcpy-impl.h @ 17848:ab58d4870664

version-etc: new year * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 01 Jan 2015 01:38:23 +0000
parents 344018b6e5d7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14278
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Copy wide character array.
17848
ab58d4870664 version-etc: new year
Paul Eggert <eggert@cs.ucla.edu>
parents: 17587
diff changeset
2 Copyright (C) 1999, 2011-2015 Free Software Foundation, Inc.
14278
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 Written by Bruno Haible <bruno@clisp.org>, 1999.
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 This program is free software: you can redistribute it and/or modify
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 the Free Software Foundation; either version 3 of the License, or
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 (at your option) any later version.
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 GNU General Public License for more details.
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 wchar_t *
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 wmemcpy (wchar_t *dest, const wchar_t *src, size_t n)
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 {
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 wchar_t *destptr = dest;
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 for (; n > 0; n--)
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 *destptr++ = *src++;
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 return dest;
fe5382375992 New module 'wmemcpy'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 }