all repos — xrxs @ e9839b1663cb0052a845940a52e3c28ea90a1ff1

experimental networked application/game server with 9p

util.h (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
typedef unsigned long long uvlong;
typedef struct Blob Blob;

uvlong hash(char* str, int array_sz);
char clca(char c);
char cuca(char c);
int slen(char* str);
char* st__(char* str, char (*fn)(char c));
char* stuc(char* str);
char* stlc(char* str);
char* scpy(char* src, char* dst, int len);
int scmp(char* a, char* b);
char* scsw(char* str, char a, char b);
char* scat(char* dst, const char* src);
int ssin(char* str, char* substr);
char* ccat(char* dst, char c);
Blob* read_bytes(char* path);
Blob* read_chars(char* path);
void itoa(int, char*, int);