ladybird/Userland/Libraries/LibC/wchar.h

83 lines
2.7 KiB
C
Raw Normal View History

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
2021-12-19 21:14:23 +03:30
#include <bits/FILE.h>
#include <stdarg.h>
#include <stddef.h>
#include <sys/cdefs.h>
__BEGIN_DECLS
#ifndef WEOF
# define WEOF (0xffffffffu)
#endif
typedef __WINT_TYPE__ wint_t;
typedef unsigned long int wctype_t;
// A zero-initialized mbstate_t struct must be a valid initial state.
typedef struct {
2021-06-05 12:44:01 +02:00
unsigned char bytes[4];
unsigned int stored_bytes;
} mbstate_t;
struct tm;
size_t wcslen(const wchar_t*);
wchar_t* wcscpy(wchar_t*, const wchar_t*);
2021-11-07 17:49:01 +01:00
wchar_t* wcsdup(const wchar_t*);
wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t);
2021-10-16 10:31:04 +02:00
__attribute__((warn_unused_result)) size_t wcslcpy(wchar_t*, const wchar_t*, size_t);
int wcscmp(const wchar_t*, const wchar_t*);
int wcsncmp(const wchar_t*, const wchar_t*, size_t);
wchar_t* wcschr(const wchar_t*, int);
wchar_t* wcsrchr(const wchar_t*, wchar_t);
wchar_t* wcscat(wchar_t*, const wchar_t*);
wchar_t* wcsncat(wchar_t*, const wchar_t*, size_t);
2021-01-18 09:59:44 +01:00
wchar_t* wcstok(wchar_t*, const wchar_t*, wchar_t**);
long wcstol(const wchar_t*, wchar_t**, int);
long long wcstoll(const wchar_t*, wchar_t**, int);
wint_t btowc(int c);
size_t mbrtowc(wchar_t*, const char*, size_t, mbstate_t*);
size_t mbrlen(const char*, size_t, mbstate_t*);
size_t wcrtomb(char*, wchar_t, mbstate_t*);
int wcscoll(const wchar_t*, const wchar_t*);
size_t wcsxfrm(wchar_t*, const wchar_t*, size_t);
int wctob(wint_t);
int mbsinit(const mbstate_t*);
2021-09-22 08:52:27 +00:00
wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
2021-09-22 08:54:23 +00:00
wchar_t* wcsstr(const wchar_t*, const wchar_t*);
2021-09-22 08:56:34 +00:00
wchar_t* wmemchr(const wchar_t*, wchar_t, size_t);
2021-09-22 10:21:06 +00:00
wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t);
2021-09-22 10:22:24 +00:00
wchar_t* wmemset(wchar_t*, wchar_t, size_t);
2021-09-22 10:24:12 +00:00
wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t);
2021-09-22 12:14:15 +00:00
unsigned long wcstoul(const wchar_t*, wchar_t**, int);
2021-09-22 12:15:20 +00:00
unsigned long long wcstoull(const wchar_t*, wchar_t**, int);
2021-09-22 12:26:01 +00:00
float wcstof(const wchar_t*, wchar_t**);
2021-09-22 12:34:01 +00:00
double wcstod(const wchar_t*, wchar_t**);
2021-09-22 12:38:01 +00:00
long double wcstold(const wchar_t*, wchar_t**);
2021-09-22 12:54:01 +00:00
int swprintf(wchar_t*, size_t, const wchar_t*, ...);
2021-09-27 01:15:34 +02:00
int wcwidth(wchar_t);
2021-10-08 01:22:27 +02:00
size_t wcsrtombs(char*, const wchar_t**, size_t, mbstate_t*);
2021-10-10 21:34:00 +02:00
size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*);
2021-10-16 09:52:54 +02:00
int wmemcmp(const wchar_t*, const wchar_t*, size_t);
2021-10-16 09:53:44 +02:00
size_t wcsnrtombs(char*, const wchar_t**, size_t, size_t, mbstate_t*);
2021-10-16 09:54:18 +02:00
size_t mbsnrtowcs(wchar_t*, const char**, size_t, size_t, mbstate_t*);
2021-12-19 20:51:30 +03:30
size_t wcscspn(const wchar_t* wcs, const wchar_t* reject);
size_t wcsspn(const wchar_t* wcs, const wchar_t* accept);
2021-12-19 21:14:23 +03:30
wint_t fgetwc(FILE* stream);
wint_t getwc(FILE* stream);
2021-12-19 21:18:58 +03:30
wint_t getwchar(void);
2021-12-20 16:08:03 +03:30
wint_t fputwc(wchar_t wc, FILE* stream);
wint_t putwc(wchar_t wc, FILE* stream);
wint_t putwchar(wchar_t wc);
int fwide(FILE* stream, int mode);
2021-12-19 21:14:23 +03:30
__END_DECLS