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

Function rafile

util/makedefs.c:411–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409#endif /* !OLD_MAKEDEFS_OPTIONS */
410
411static void
412rafile(int whichone)
413{
414 switch(whichone) {
415 /*
416 * post-3.6.5:
417 * File must not be empty to avoid divide by 0
418 * in core's rn2(), so provide a default entry.
419 */
420 case '1':
421 do_rnd_access_file(EPITAPHFILE, "epitaph",
422 /* default epitaph: parody of the default engraving */
423 "No matter where I went, here I am.",
424 MD_PAD_RUMORS); /* '_RUMORS' is correct here */
425 break;
426 case '2':
427 do_rnd_access_file(ENGRAVEFILE, "engrave",
428 /* default engraving: popularized by "The Adventures of
429 Buckaroo Bonzai Across the 8th Dimension" but predates
430 that 1984 movie; some attribute it to Confucius */
431 "No matter where you go, there you are.",
432 MD_PAD_RUMORS); /* '_RUMORS' used here too */
433 break;
434 case '3':
435 do_rnd_access_file(BOGUSMONFILE, "bogusmon",
436 /* default bogusmon: iconic monster that isn't in nethack */
437 "grue", MD_PAD_BOGONS);
438 break;
439 }
440}
441
442static char namebuf[1000];
443

Callers 1

do_makedefsFunction · 0.85

Calls 1

do_rnd_access_fileFunction · 0.85

Tested by

no test coverage detected