* file: small wrap over winapi for windows and stdio for posix
 * fs: small wrapper over stat
 * slice: slice macro type
modified:
 * str and strview are now slices
This commit is contained in:
snarmph 2021-10-06 00:13:10 +02:00
parent bb5cce33f0
commit c4d1ffe539
15 changed files with 451 additions and 88 deletions

View file

@ -9,12 +9,16 @@ extern "C" {
#include <stddef.h>
#include <limits.h>
#include "slice.h"
#define STRV_NOT_FOUND SIZE_MAX
typedef struct {
const char *buf;
size_t size;
} strview_t;
// typedef struct {
// const char *buf;
// size_t size;
// } strview_t;
typedef slice_t(const char *) strview_t;
strview_t strvInit(const char *cstr);
strview_t strvInitLen(const char *buf, size_t size);