mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 16:22:29 +00:00
Add fixes performance and static web server
This commit is contained in:
parent
b6793d42d5
commit
c45e46f871
108 changed files with 2927 additions and 819 deletions
12
libc/str/utf16.h
Normal file
12
libc/str/utf16.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_STR_UTF16_H_
|
||||
#define COSMOPOLITAN_LIBC_STR_UTF16_H_
|
||||
|
||||
#define UTF16_MASK 0xfc00
|
||||
#define UTF16_MOAR 0xd800 /* 0xD800..0xDBFF */
|
||||
#define UTF16_CONT 0xdc00 /* 0xDC00..0xDBFF */
|
||||
|
||||
#define IsUcs2(wc) (((wc)&UTF16_MASK) != UTF16_MOAR)
|
||||
#define IsUtf16Cont(wc) (((wc)&UTF16_MASK) != UTF16_MOAR)
|
||||
#define MergeUtf16(lo, hi) ((((lo)-0xD800) << 10) + ((hi)-0xDC00) + 0x10000)
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_STR_UTF16_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue