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

Function Placebc

src/ball.c:258–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256#else /* BREADCRUMBS */
257
258void
259Placebc(const char *funcnm, int linenum)
260{
261 if (!check_restriction(0)) {
262#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
263 char panicbuf[BUFSZ];
264
265 Sprintf(panicbuf, "Placebc denied to %s:%d, restricted by %s:%d",
266 funcnm, linenum,
267 bcpbreadcrumbs.funcnm, bcpbreadcrumbs.linenum);
268 paniclog("Placebc", panicbuf);
269#endif
270 return;
271 }
272 if ((uchain && uchain->where != OBJ_FREE)
273 && bcpbreadcrumbs.in_effect) {
274 impossible("Placebc collision at %s:%d, already placed by %s:%d",
275 funcnm, linenum,
276 bcpbreadcrumbs.funcnm, bcpbreadcrumbs.linenum);
277 return;
278 }
279 bcpbreadcrumbs.in_effect = TRUE;
280 bcubreadcrumbs.in_effect = FALSE;
281 bcpbreadcrumbs.funcnm = funcnm;
282 bcpbreadcrumbs.linenum = linenum;
283 placebc_core();
284}
285
286void
287Unplacebc(const char *funcnm, int linenum)

Callers

nothing calls this directly

Calls 4

check_restrictionFunction · 0.85
paniclogFunction · 0.85
placebc_coreFunction · 0.85
impossibleFunction · 0.70

Tested by

no test coverage detected