aboutsummaryrefslogtreecommitdiff
path: root/lib/io/io.h
blob: ac25e8766d15727761c052abd91b4ab5ad5d1122 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef IO_H
#define IO_H

#include "../sys/io.h"

void          wstd(const char *buf);
unsigned long rstd(char *buf, unsigned long count);
void          wf(unsigned int fd, char *buf);

void wstdf__(const char *buf, const void **args);
void wff__(unsigned int fd, const char *buf, const void **args);

#define wstdf(buf, ...) { \
	const void *__wstdf__args__[] = { __VA_ARGS__ }; \
	wstdf__(buf, __wstdf__args__); \
}

#define wff(fd, buf, ...) { \
	const void *__wstdf__args__[] = { __VA_ARGS__ }; \
	wff__(fd, buf, __wstdf__args__); \
}


#endif