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

Function save_oracles

src/rumors.c:597–619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

595}
596
597void
598save_oracles(NHFILE *nhfp)
599{
600 int i;
601
602 if (update_file(nhfp)) {
603 Sfo_unsigned(nhfp, &svo.oracle_cnt, "oracle-oracle_cnt");
604 if (svo.oracle_cnt) {
605 for (i = 0; (unsigned) i < svo.oracle_cnt; ++i) {
606 Sfo_ulong(nhfp, &svo.oracle_loc[i], "oracle-oracle_loc");
607 }
608 }
609 }
610 if (release_data(nhfp)) {
611 if (svo.oracle_cnt) {
612 svo.oracle_cnt = 0, go.oracle_flg = 0;
613 }
614 if (svo.oracle_loc) {
615 free((genericptr_t) svo.oracle_loc);
616 svo.oracle_loc = 0;
617 }
618 }
619}
620#endif /* !SFCTOOL */
621
622void

Callers 1

savegamestateFunction · 0.85

Calls 1

update_fileFunction · 0.85

Tested by

no test coverage detected