]> git.ipfire.org Git - thirdparty/util-linux.git/blame - include/widechar.h
include: add missing license lines
[thirdparty/util-linux.git] / include / widechar.h
CommitLineData
faeb1b64
KZ
1/*
2 * No copyright is claimed. This code is in the public domain; do with
3 * it what you wish.
4 */
5
eb63b9b8
KZ
6/* Declarations for wide characters */
7/* This file must be included last because the redefinition of wchar_t may
8 cause conflicts when system include files were included after it. */
9
06b04b23 10#ifdef HAVE_WIDECHAR
eb63b9b8
KZ
11
12# include <wchar.h>
13# include <wctype.h>
eb63b9b8 14
06b04b23 15#else /* !HAVE_WIDECHAR */
eb63b9b8
KZ
16
17# include <ctype.h>
18 /* Fallback for types */
19# define wchar_t char
20# define wint_t int
e19916c8
KZ
21# ifndef WEOF
22# define WEOF EOF
23# endif
92312207
KZ
24
25 /* Fallback for input operations */
eb63b9b8
KZ
26# define fgetwc fgetc
27# define getwc getc
28# define getwchar getchar
29# define fgetws fgets
92312207 30
eb63b9b8
KZ
31 /* Fallback for output operations */
32# define fputwc fputc
33# define putwc putc
34# define putwchar putchar
35# define fputws fputs
92312207 36
eb63b9b8
KZ
37 /* Fallback for character classification */
38# define iswgraph isgraph
39# define iswprint isprint
40# define iswspace isspace
92312207 41
eb63b9b8
KZ
42 /* Fallback for string functions */
43# define wcschr strchr
44# define wcsdup strdup
45# define wcslen strlen
6426f926 46# define wcspbrk strpbrk
eb63b9b8 47
92312207
KZ
48# define wcwidth(c) (1)
49# define wmemset memset
50# define ungetwc ungetc
66ee8158 51
06b04b23 52#endif /* HAVE_WIDECHAR */