source: trunk/sys/dietlibc/puts.c @ 197

Last change on this file since 197 was 1, checked in by alain, 8 years ago

First import

File size: 348 bytes
Line 
1#include <unistd.h>
2#include <string.h>
3#include "dietstdio.h"
4#include "dietfeatures.h"
5
6int __stdio_outs(const char *s,size_t len) __attribute__((weak));
7int __stdio_outs(const char *s,size_t len) {
8 
9  return (write(1,s,len)==(ssize_t)len)?1:0;
10}
11
12int 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.