2 * Ullrich von Bassewitz, 11.08.1998
4 * char* fgets (char* s, int size, FILE* f);
15 /*****************************************************************************/
17 /*****************************************************************************/
21 char* __fastcall__ fgets (char* s, unsigned size, FILE* f)
28 return (char*) _seterrno (EINVAL);
35 /* Get next character */
36 if ((c = fgetc (f)) == EOF) {
39 if ((f->f_flags & _FERROR) != 0 || i == 0) {
40 /* ERROR or EOF on first char */
43 /* EOF with data already read */
51 /* Stop at end of line */
57 /* Terminate the string */