aboutsummaryrefslogtreecommitdiff
path: root/lib/io/io.h
blob: 887d9115b3556db1bc4d2d4d08ed81e0bda77384 (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
26
#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);
int           get_next_line_from_fd(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