source: buchla-68k/libcio/fputs.c@ ca867c1

Last change on this file since ca867c1 was b28a12e, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Zero redundant declarations.

  • Property mode set to 100644
File size: 638 bytes
RevLine 
[f40a309]1/*
2 =============================================================================
3 fputs.c -- output a string to a stream
4 Version 3 -- 1987-07-09 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
[b28a12e]8#include "ram.h"
[f40a309]9
[7258c6a]10int16_t puts(int8_t *str)
[f40a309]11{
12 while (*str)
13 if (putchar(*str++) EQ EOF)
14 return(EOF);
15
16 return(putchar('\n'));
17}
18
[7258c6a]19int16_t aputc(int16_t c, FILE *ptr)
[f40a309]20{
21 c &= 127;
22
23 if (c EQ '\n')
24 if (putc('\r', ptr) EQ EOF)
25 return(EOF);
26
27 return(putc(c, ptr));
28}
29
[7258c6a]30int16_t fputs(int8_t *s, FILE *fp)
[f40a309]31{
32 while ( *s )
33 if (aputc(*s++, fp) EQ EOF)
34 return(EOF);
35 return(0);
36}
[6262b5c]37
Note: See TracBrowser for help on using the repository browser.