| 802 | } |
| 803 | |
| 804 | char *__cdecl fgets(char *s, int size, FILE *f) |
| 805 | { |
| 806 | /* not the best performance but it will do for now...*/ |
| 807 | char c; |
| 808 | if (!f || !s || size == 0) |
| 809 | return NULL; |
| 810 | while (--size > 0) { |
| 811 | if ((c = fgetc(f)) == EOF) |
| 812 | return NULL; |
| 813 | |
| 814 | *s++ = c; |
| 815 | if (c == '\n') |
| 816 | break; |
| 817 | } |
| 818 | *s = '\x0'; |
| 819 | return s; |
| 820 | } |
| 821 | |
| 822 | int __cdecl printf(const char *format, ...) |
| 823 | { |
no test coverage detected