aboutsummaryrefslogtreecommitdiff
path: root/lib/io/io.h
blob: 6bf0a3b71bb0671b992e40f1dd629219cd0d3572 (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
25
#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          putchar(const char c);

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