source:
trunk/sys/dietlibc/puts.c
@
191
Last change on this file since 191 was 1, checked in by , 8 years ago | |
---|---|
File size: 348 bytes |
Rev | Line | |
---|---|---|
[1] | 1 | #include <unistd.h> |
2 | #include <string.h> | |
3 | #include "dietstdio.h" | |
4 | #include "dietfeatures.h" | |
5 | ||
6 | int __stdio_outs(const char *s,size_t len) __attribute__((weak)); | |
7 | int __stdio_outs(const char *s,size_t len) { | |
8 | ||
9 | return (write(1,s,len)==(ssize_t)len)?1:0; | |
10 | } | |
11 | ||
12 | int puts(const char *s) { | |
13 | return (__stdio_outs(s,strlen(s)) && __stdio_outs("\n",1))?0:-1; | |
14 | } | |
15 |
Note: See TracBrowser
for help on using the repository browser.