]> git.sur5r.net Git - cc65/blob - libsrc/common/fputs.c
Fixed _textcolor definition.
[cc65] / libsrc / common / fputs.c
1 /*
2 ** int fputs (const char* s, FILE* f);
3 **
4 ** Ullrich von Bassewitz, 11.08.1998
5 */
6
7
8
9 #include <stdio.h>
10 #include <string.h>
11 #include <unistd.h>
12 #include "_file.h"
13
14
15
16 int __fastcall__ fputs (const char* s, register FILE* f)
17 {
18     /* Check if the file is open or if there is an error condition */
19     if ((f->f_flags & _FOPEN) == 0 || (f->f_flags & (_FERROR | _FEOF)) != 0) {
20         return EOF;
21     }
22
23     /* Write the string */
24     return write (f->f_fd, s, strlen (s));
25 }
26
27
28