MCPcopy Create free account
hub / github.com/NetHack/NetHack / sf_log

Function sf_log

src/sfbase.c:376–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374/* ---------------------------------------------------------------*/
375
376void
377sf_log(NHFILE *nhfp, const char *t1, size_t sz, int cnt, char *txtvalue)
378{
379 FILE *fp = nhfp->fplog;
380 long *iocount;
381 boolean dolog = ((nhfp->mode & TURN_OFF_LOGGING) == 0);
382
383 if (fp && dolog) {
384 iocount = ((nhfp->mode & WRITING) == 0) ? &nhfp->rcount : &nhfp->wcount;
385 (void) fprintf(fp,
386#ifndef VMS
387 "%08ld %s sz=%zu cnt=%d |%s|\n",
388#else
389 "%08ld %s sz=%lu cnt=%d |%s|\n",
390#endif
391 *iocount,
392 t1,
393#ifndef VMS
394 sz,
395#else
396 (unsigned long) sz,
397#endif
398 cnt, txtvalue);
399// (*iocount)++;
400// if (*iocount == 87)
401// __debugbreak();
402 fflush(fp);
403 }
404}
405
406char *sfvalue_char(char *a, int n)
407{

Callers 6

sfo_charFunction · 0.85
sfi_charFunction · 0.85
sfo_genericptrFunction · 0.85
sfi_genericptrFunction · 0.85
sfo_version_infoFunction · 0.85
sfi_version_infoFunction · 0.85

Calls 2

fprintfFunction · 0.85
fflushFunction · 0.85

Tested by

no test coverage detected