1
0

fdprint(3)

This commit is contained in:
dtb 2022-06-14 17:05:38 -04:00
parent 0d33391dfe
commit 4eb64cdc5a
2 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,11 @@ _strlen(char *s){
return i;
}
int
fdprint(int fd, char *s){
write(fd, s, _strlen(s));
}
/* SLOW. DO NOT USE. */
static int write1(int fd, int c){
while(write(fd, &c, 1) != 1);

View File

@ -1,5 +1,6 @@
#ifndef _LIBIO_H
# define _LIBIO_H
int fdprint(int fd, char *s);
int fdputd(int fd, int d);
int fdputs(int fd, char *s);
int parse_uint(char *s);