.
This commit is contained in:
parent
524ec0d1ce
commit
61c1060a98
16 changed files with 5043 additions and 31 deletions
15
colla.h
15
colla.h
|
|
@ -1,9 +1,13 @@
|
|||
#ifndef COLLA_HEADER
|
||||
#define COLLA_HEADER
|
||||
|
||||
#define _FILE_OFFSET_BITS 1
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdarg.h>
|
||||
#include <uchar.h>
|
||||
|
||||
// CORE MODULES /////////////////////////////////
|
||||
|
||||
|
|
@ -91,7 +95,7 @@ void colla_cleanup(void);
|
|||
#define COLLA_CMT_LIB 0
|
||||
#endif
|
||||
|
||||
#if COLLA_TCC
|
||||
#if COLLA_TCC || COLLA_CLANG
|
||||
#define alignof __alignof__
|
||||
#endif
|
||||
|
||||
|
|
@ -309,7 +313,7 @@ struct str_t {
|
|||
|
||||
typedef struct str16_t str16_t;
|
||||
struct str16_t {
|
||||
u16 *buf;
|
||||
char16_t *buf;
|
||||
usize len;
|
||||
};
|
||||
|
||||
|
|
@ -354,11 +358,12 @@ str_t str_fmt(arena_t *arena, const char *fmt, ...);
|
|||
str_t str_fmtv(arena_t *arena, const char *fmt, va_list args);
|
||||
|
||||
tstr_t tstr_init(TCHAR *str, usize optional_len);
|
||||
str16_t str16_init(u16 *str, usize optional_len);
|
||||
str16_t str16_init(char16_t *str, usize optional_len);
|
||||
|
||||
str_t str_from_str16(arena_t *arena, str16_t src);
|
||||
str_t str_from_tstr(arena_t *arena, tstr_t src);
|
||||
str16_t str16_from_str(arena_t *arena, str_t src);
|
||||
usize str16_len(char16_t *str);
|
||||
|
||||
bool str_equals(str_t a, str_t b);
|
||||
int str_compare(str_t a, str_t b);
|
||||
|
|
@ -743,8 +748,8 @@ oshandle_t os_stdin(void);
|
|||
// == FILE ======================================
|
||||
|
||||
typedef enum filemode_e {
|
||||
FILEMODE_READ = 1 << 0,
|
||||
FILEMODE_WRITE = 1 << 1,
|
||||
OS_FILE_READ = 1 << 0,
|
||||
OS_FILE_WRITE = 1 << 1,
|
||||
} filemode_e;
|
||||
|
||||
bool os_file_exists(strview_t filename);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue