#include <stdlib.h> /* free() */
#include <unistd.h> /* unlink() */
#include "../common/readwrite.h" /* try_fclose() */
+#include "hardcoded_strings.h" /* s */
#include "thing_actions.h" /* free_thing_actions() */
#include "things.h" /* free_things(), free_thing_types() */
#include "world.h" /* global world */
extern void cleanup()
{
- char * f_name = "cleanup()";
free(world.queue);
free(world.log);
free(world.map.cells);
if (cleanup_flags & CLEANUP_WORLDSTATE)
{
- unlink(world.path_worldstate);
+ unlink(s[S_PATH_WORLDSTATE]);
}
if (cleanup_flags & CLEANUP_THINGS)
{
}
if (cleanup_flags & CLEANUP_IN)
{
- try_fclose(world.file_in, f_name);
- unlink(world.path_in);
+ try_fclose(world.file_in, __func__);
+ unlink(s[S_PATH_IN]);
}
if (cleanup_flags & CLEANUP_OUT)
{
- try_fclose(world.file_out, f_name);
+ try_fclose(world.file_out, __func__);
free(world.server_test);
- unlink(world.path_out);
+ unlink(s[S_PATH_OUT]);
}
}