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

Function store_version

src/version.c:511–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509 return;
510}
511void
512store_version(NHFILE *nhfp)
513{
514 struct version_info version_data = {
515 0UL,
516 0UL,
517 0UL,
518 };
519 /* actual version number */
520 version_data.incarnation = nomakedefs.version_number;
521 /* bitmask of config settings */
522 version_data.feature_set = nomakedefs.version_features;
523 /* # of monsters and objects */
524 version_data.entity_count = nomakedefs.version_sanity1;
525
526 /* bwrite() before bufon() uses plain write() */
527 if (nhfp->structlevel)
528 bufoff(nhfp->fd);
529
530 store_critical_bytes(nhfp);
531 Sfo_version_info(nhfp, (struct version_info *) &version_data,
532 "version_info");
533
534 if (nhfp->structlevel)
535 bufon(nhfp->fd);
536 return;
537}
538#endif /* !SFCTOOL */
539#endif /* MINIMAL_FOR_RECOVER */
540

Callers 4

savebonesFunction · 0.85
recover_savefileFunction · 0.85
dosave0Function · 0.85
savestateinlockFunction · 0.85

Calls 3

bufoffFunction · 0.85
store_critical_bytesFunction · 0.85
bufonFunction · 0.85

Tested by

no test coverage detected