4 * Ullrich von Bassewitz, 02.06.1998
15 int fputc (int c, FILE* f)
17 /* Check if the file is open or if there is an error condition */
18 if ((f->f_flags & _FOPEN) == 0 || (f->f_flags & (_FERROR | _FEOF)) != 0) {
22 /* Write the byte (knows about byte order!) */
23 if (write (f->f_fd, &c, 1) <= 0) {
25 f->f_flags |= _FERROR;
29 /* Return the byte written */