-
Notifications
You must be signed in to change notification settings - Fork 2
/
safe_io.h
26 lines (21 loc) · 1.15 KB
/
safe_io.h
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* safe_io.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jkong <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/21 19:55:19 by jkong #+# #+# */
/* Updated: 2022/06/15 21:24:37 by jkong ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef SAFE_IO_H
# define SAFE_IO_H
# include <stdlib.h>
# include <unistd.h>
int read_safe(int fd, void *buf, size_t len);
void write_safe(int fd, const void *buf, size_t len);
void putstr_safe(const char *str);
void putnbr_safe(int n);
void puterr_safe(const char *str);
#endif