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

Function store_critical_bytes

src/version.c:675–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673
674#ifndef MINIMAL_FOR_RECOVER
675void
676store_critical_bytes(NHFILE *nhfp)
677{
678 int i, cnt;
679 char indicate = 'u', csc_count = (char) SIZE(critical_sizes);
680 /* int cmc = 0; */
681
682 if (nhfp->mode & WRITING) {
683 indicate = (nhfp->structlevel) ? 'h'
684 : (nhfp->fnidx == exportascii)
685 ? 'a'
686 : '?';
687 Sfo_char(nhfp, &indicate, "indicate-format", 1);
688 Sfo_char(nhfp, &csc_count, "count-critical_sizes", 1);
689 cnt = (int) csc_count;
690 for (i = 0; i < cnt; ++i) {
691 Sfo_uchar(nhfp, &critical_sizes[i].ucsize, "critical_sizes");
692 }
693 }
694}
695
696/* this used to be based on file date and somewhat OS-dependent,
697 * but now examines the initial part of the file's contents.

Callers 2

store_versionFunction · 0.85
process_savefileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected