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

Function bones_include_name

src/bones.c:761–780  ·  view source on GitHub ↗

check whether current level contains bones from a particular player */

Source from the content-addressed store, hash-verified

759
760/* check whether current level contains bones from a particular player */
761boolean
762bones_include_name(const char *name)
763{
764 struct cemetery *bp;
765 size_t len;
766 char buf[BUFSZ];
767
768 /* prepare buffer by appending terminal hyphen to name, to avoid partial
769 * matches producing false positives */
770 Strcpy(buf, name);
771 Strcat(buf, "-");
772 len = strlen(buf);
773
774 for (bp = svl.level.bonesinfo; bp; bp = bp->next) {
775 if (!strncmp(bp->who, buf, len))
776 return TRUE;
777 }
778
779 return FALSE;
780}
781
782/* set the ghostly bit in a list of objects */
783staticfn void

Callers 1

goto_levelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected