ack/lang/cem/libcc.ansi/core/stdio/puts.c
David Given 3131dc9915 Partially working port of stdio to CP/M. I'm not sure this will work; it's
getting way too complicated (stdio is horribly subtle). I think I need to
rethink things.
2019-06-15 22:22:01 +02:00

28 lines
358 B
C

/*
* puts.c - print a string onto the standard output stream
*/
/* $Id$ */
#include <stdio.h>
#if ACKCONF_WANT_STDIO
int puts(register const char* s)
{
register FILE* file = stdout;
register int i = 0;
while (*s)
{
if (putc(*s++, file) == EOF)
return EOF;
else
i++;
}
if (putc('\n', file) == EOF)
return EOF;
return i + 1;
}
#endif