/uspace/trunk/libc/generic/io.c |
---|
30,14 → 30,18 |
#include <unistd.h> |
#include <stdio.h> |
static char nl = '\n'; |
int puts(const char * str) |
{ |
size_t count; |
for (count = 0; str[count] != 0; count++); |
if (write(1, (void * ) str, count) == count) |
if (write(1, (void * ) str, count) == count) { |
if (write(1, &nl, 1) == 1) |
return 0; |
else |
} |
return EOF; |
} |
/uspace/trunk/libc/generic/libc.c |
---|
29,8 → 29,13 |
#include <libc.h> |
#include <unistd.h> |
void _exit(int status) { |
__SYSCALL0(SYS_CTL); |
} |
void __main(void) { |
} |
void __exit(void) { |
_exit(0); |
} |