| 374 | /* ---------------------------------------------------------------*/ |
| 375 | |
| 376 | void |
| 377 | sf_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 | |
| 406 | char *sfvalue_char(char *a, int n) |
| 407 | { |
no test coverage detected