MCPcopy Index your code
hub / github.com/NetHack/NetHack / fgets

Function fgets

outdated/sys/wince/celib.c:804–820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

802}
803
804char *__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
822int __cdecl printf(const char *format, ...)
823{

Callers 15

examine_tilefilesFunction · 0.85
get_next_lineFunction · 0.85
load_default_resourcesFunction · 0.85
tc_findFunction · 0.85
mainFunction · 0.85
decodeFunction · 0.85
xpmgetlineFunction · 0.85
EditColorFunction · 0.85
readentryFunction · 0.85
read_simplemailFunction · 0.85
dlb_fgetsFunction · 0.85

Calls 1

fgetcFunction · 0.85

Tested by

no test coverage detected