mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-15 07:19:18 +00:00
Make more compatibility improvements
This commit is contained in:
parent
12d9e1e128
commit
55c6297e13
63 changed files with 513 additions and 80 deletions
|
@ -16,7 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/str/unicode.h"
|
||||
#include "libc/str/strwidth.h"
|
||||
|
||||
/**
|
||||
* Returns monospace display width of UTF-8 string.
|
||||
|
|
13
libc/str/strwidth.h
Normal file
13
libc/str/strwidth.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_STR_STRWIDTH_H_
|
||||
#define COSMOPOLITAN_LIBC_STR_STRWIDTH_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
int strwidth(const char *, size_t) strlenesque;
|
||||
int strnwidth(const char *, size_t, size_t) strlenesque;
|
||||
int strwidth16(const char16_t *, size_t) strlenesque;
|
||||
int strnwidth16(const char16_t *, size_t, size_t) strlenesque;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_STR_STRWIDTH_H_ */
|
|
@ -18,7 +18,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/str/unicode.h"
|
||||
#include "libc/str/strwidth.h"
|
||||
|
||||
/**
|
||||
* Returns monospace display width of UTF-16 or UCS-2 string.
|
||||
|
|
|
@ -33,10 +33,6 @@ struct lconv {
|
|||
int wcwidth(wchar_t) pureconst;
|
||||
int wcswidth(const wchar_t *, size_t) strlenesque;
|
||||
int wcsnwidth(const wchar_t *, size_t, size_t) strlenesque;
|
||||
int strwidth(const char *, size_t) strlenesque;
|
||||
int strnwidth(const char *, size_t, size_t) strlenesque;
|
||||
int strwidth16(const char16_t *, size_t) strlenesque;
|
||||
int strnwidth16(const char16_t *, size_t, size_t) strlenesque;
|
||||
struct lconv *localeconv(void);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue