fdprint(3)
This commit is contained in:
parent
0d33391dfe
commit
4eb64cdc5a
@ -10,6 +10,11 @@ _strlen(char *s){
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
fdprint(int fd, char *s){
|
||||||
|
write(fd, s, _strlen(s));
|
||||||
|
}
|
||||||
|
|
||||||
/* SLOW. DO NOT USE. */
|
/* SLOW. DO NOT USE. */
|
||||||
static int write1(int fd, int c){
|
static int write1(int fd, int c){
|
||||||
while(write(fd, &c, 1) != 1);
|
while(write(fd, &c, 1) != 1);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#ifndef _LIBIO_H
|
#ifndef _LIBIO_H
|
||||||
# define _LIBIO_H
|
# define _LIBIO_H
|
||||||
|
int fdprint(int fd, char *s);
|
||||||
int fdputd(int fd, int d);
|
int fdputd(int fd, int d);
|
||||||
int fdputs(int fd, char *s);
|
int fdputs(int fd, char *s);
|
||||||
int parse_uint(char *s);
|
int parse_uint(char *s);
|
||||||
|
Loading…
Reference in New Issue
Block a user