annotate lib/uniwidth.in.h @ 15727:144db791c6fa

Ensure EBADF returns for socket functions on mingw. * lib/accept.c (rpl_accept): Fail with error EBADF if the file descriptor is invalid. * lib/bind.c (rpl_bind): Likewise. * lib/connect.c (rpl_connect): Likewise. * lib/getpeername.c (rpl_getpeername): Likewise. * lib/getsockname.c (rpl_getsockname): Likewise. * lib/getsockopt.c (rpl_getsockopt): Likewise. * lib/listen.c (rpl_listen): Likewise. * lib/recv.c (rpl_recv): Likewise. * lib/recvfrom.c (rpl_recvfrom): Likewise. * lib/send.c (rpl_send): Likewise. * lib/sendto.c (rpl_sendto): Likewise. * lib/setsockopt.c (rpl_setsockopt): Likewise. * lib/shutdown.c (rpl_shutdown): Likewise.
author Bruno Haible <bruno@clisp.org>
date Wed, 21 Sep 2011 00:20:59 +0200
parents 97fc9a21a8fb
children 6beadb731202
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13354
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Display width functions.
14079
97fc9a21a8fb maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents: 13354
diff changeset
2 Copyright (C) 2001-2002, 2005, 2007, 2009-2011 Free Software Foundation,
13354
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 Inc.
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 This program is free software: you can redistribute it and/or modify it
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 under the terms of the GNU Lesser General Public License as published
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 by the Free Software Foundation; either version 3 of the License, or
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 (at your option) any later version.
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 Lesser General Public License for more details.
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public License
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 #ifndef _UNIWIDTH_H
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 #define _UNIWIDTH_H
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 #include "unitypes.h"
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 /* Get size_t. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 #include <stddef.h>
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 /* Get locale_charset() declaration. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 #include "localcharset.h"
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 #ifdef __cplusplus
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 extern "C" {
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 #endif
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 /* Display width. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 /* These functions are locale dependent. The encoding argument identifies
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 the encoding (e.g. "ISO-8859-2" for Polish). */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 /* Determine number of column positions required for UC. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 extern int
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 uc_width (ucs4_t uc, const char *encoding);
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 /* Determine number of column positions required for first N units
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 (or fewer if S ends before this) in S. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 extern int
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 u8_width (const uint8_t *s, size_t n, const char *encoding);
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 extern int
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 u16_width (const uint16_t *s, size_t n, const char *encoding);
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 extern int
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 u32_width (const uint32_t *s, size_t n, const char *encoding);
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 /* Determine number of column positions required for S. */
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 extern int
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 u8_strwidth (const uint8_t *s, const char *encoding);
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 extern int
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 u16_strwidth (const uint16_t *s, const char *encoding);
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 extern int
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 u32_strwidth (const uint32_t *s, const char *encoding);
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 #ifdef __cplusplus
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 }
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 #endif
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64
86634e33e086 New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65 #endif /* _UNIWIDTH_H */