GNU PROLOG with UTF8 support
pl_wchar.h
Go to the documentation of this file.
1 #ifndef PL_WCHAR_T
2 #define PL_WCHAR_T
3 
4 #include <stdint.h>
5 
6 /* #ifdef char32_t */
7 /* #define CHAR32_T char32_t */
8 /* #else */
9 #define CHAR32_T int32_t
10 /* #endif */
11 
12 extern int contains_wchar(const char* s, int slen);
13 extern int normalize_pos(int pos, const char* s);
14 /* get wchar (or char) byte size at s */
15 extern int count_wchar_bytes(const char* s, int slen);
16 extern int count_wchar_bytes_without_slen(const char* s);
17 /* get wchar (or char) byte size before s */
18 extern int count_wchar_bytes_back(const char* s);
19 /* get wchar (or char) byte size of c */
20 extern int get_wchar_bytes(CHAR32_T c);
21 /* get wchar (or char) at s */
22 extern CHAR32_T get_wchar(const char* s, int slen);
23 /* count wchar(or char) characters from s to s+slen */
24 extern int count_wchars(char* s, int slen);
25 #define MAX_WCHAR_BYTES 4
26 extern int put_wchar(char* s, int slen, CHAR32_T c);
27 extern int put_wchar_without_slen(char* s, CHAR32_T c);
28 extern int put_wchar_eof(char* s, int slen, CHAR32_T c);
29 
30 #define FILL_WCHAR_MODE_INIT 0
31 extern int fill_wchar(CHAR32_T* cp, int* modep, CHAR32_T c0);
32 
33 extern int wchar_bytes_of_chars(const char* s, int slen, int chars);
34 
35 extern int is_wchar_print(CHAR32_T c);
36 #endif
int get_wchar_bytes(CHAR32_T c)
Definition: pl_wchar.c:130
#define CHAR32_T
Definition: pl_wchar.h:9
int put_wchar_eof(char *s, int slen, CHAR32_T c)
Definition: pl_wchar.c:292
static CHAR32_T c
Definition: scan_supp.c:65
int count_wchar_bytes_without_slen(const char *s)
Definition: pl_wchar.c:96
int wchar_bytes_of_chars(const char *s, int slen, int chars)
Definition: pl_wchar.c:332
int fill_wchar(CHAR32_T *cp, int *modep, CHAR32_T c0)
Definition: pl_wchar.c:299
int is_wchar_print(CHAR32_T c)
Definition: pl_wchar.c:353
int put_wchar(char *s, int slen, CHAR32_T c)
Definition: pl_wchar.c:230
int contains_wchar(const char *s, int slen)
Definition: pl_wchar.c:16
int normalize_pos(int pos, const char *s)
Definition: pl_wchar.c:31
int put_wchar_without_slen(char *s, CHAR32_T c)
Definition: pl_wchar.c:261
CHAR32_T get_wchar(const char *s, int slen)
Definition: pl_wchar.c:162
int count_wchars(char *s, int slen)
Definition: pl_wchar.c:147
int count_wchar_bytes(const char *s, int slen)
Definition: pl_wchar.c:69
int count_wchar_bytes_back(const char *s)
Definition: pl_wchar.c:124