annotate lib/unistr/u32-mbsnlen.c @ 8972:99f9e9e57556

New module unistr/u32-mbsnlen
author Bruno Haible <bruno@clisp.org>
date Mon, 11 Jun 2007 00:34:23 +0000
parents
children ad8a75a45dc9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8972
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Count characters in UTF-32 string.
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 Copyright (C) 2007 Free Software Foundation, Inc.
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 Written by Bruno Haible <bruno@clisp.org>, 2007.
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 This program is free software; you can redistribute it and/or modify it
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 under the terms of the GNU Library General Public License as published
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 by the Free Software Foundation; either version 2, or (at your option)
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 any later version.
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 Library General Public License for more details.
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 You should have received a copy of the GNU Library General Public
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 License along with this program; if not, write to the Free Software
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 USA. */
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 #include <config.h>
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 /* Specification. */
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 #include "unistr.h"
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 size_t
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 u32_mbsnlen (const uint32_t *s, size_t n)
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 {
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 return n;
99f9e9e57556 New module unistr/u32-mbsnlen
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 }