summaryrefslogtreecommitdiff
path: root/types.h
blob: 0a7e592ae70a1b6071ae09b10dcb42f0766eb541 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#pragma once

#include <stddef.h>
#include <unistd.h>

struct string {
	char *data;
	size_t len;
};

#define STRING(x) (struct string){x, sizeof(x)-1}
#define WRITES(x, y) write(x, y.data, y.len);