X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fmisc.c;h=2cf9e62f936671b84faeca3eaecb4df8cb5fd267;hb=00a7727e37e2d80ff115f03e7971a92c66edcd96;hp=06c6a30a7ce6882e7f8b97ff0044ac7a731d844e;hpb=3edf207d99f9e6e7e4b6beb9939bb9618e4be597;p=plomrogue diff --git a/src/misc.c b/src/misc.c index 06c6a30..2cf9e62 100644 --- a/src/misc.c +++ b/src/misc.c @@ -16,7 +16,7 @@ #include "map.h" /* for Map struct, is_passable() */ #include "main.h" /* for world global */ #include "yx_uint16.h" /* for yx_uint16 struct */ -#include "rexit.h" /* for exit_err() */ +#include "rexit.h" /* for exit_err(), exit_trouble() */ #include "wincontrol.h" /* for init_winconfs(), init_wins(), free_winconfs(), * sorted_wintoggle_and_activate() */ @@ -34,21 +34,6 @@ extern uint16_t rrand() -extern void exit_trouble(uint8_t test, char * parent, char * child) -{ - char * p1 = "Trouble in "; - char * p2 = " with "; - char * p3 = "."; - uint16_t size = strlen(p1) + strlen(parent) + strlen(p2) + strlen(child) - + strlen(p3) + 1; - char msg[size]; - exit_err(NULL == msg, "malloc() in trouble_msg() failed."); - sprintf(msg, "%s%s%s%s%s", p1, parent, p2, child, p3); - exit_err(test, msg); -} - - - extern void * try_malloc(size_t size, char * f) { void * p = malloc(size);