+ send("PING");
+ ping_sent = 1;
+ return;
+ }
+ exit_err(last_server_answer_time < now - 6, "Server not answering.");
+}
+
+
+
+static void nl_append_string(char * append, char ** string)
+{
+ char * err = "too large sizes";
+ exit_trouble(UINT32_MAX < strlen(append), __func__, err);
+ uint32_t new_size = strlen(append);
+ uint32_t old_size = 0;
+ uint8_t add_nl = 0;
+ if (*string)
+ {
+ exit_trouble(UINT32_MAX < new_size + strlen(*string), __func__, err);
+ old_size = strlen(*string);
+ add_nl = 1;
+ }
+ char * new_string = try_malloc(old_size + add_nl + new_size + 1, __func__);
+ memcpy(new_string, *string, old_size);
+ char * pattern = add_nl ? "\n%s" : "%s";
+ int test = sprintf(new_string + old_size, pattern, append);
+ exit_trouble(test < 0, __func__, "sprintf");
+ free(*string);
+ *string = new_string;
+}
+
+
+
+static uint8_t read_queue()
+{
+ static uint8_t things_below_player_parsing = 0;
+ uint8_t ret = 0;
+ char * msg;
+ while (NULL != (msg = get_message_from_queue(&world.queue)))
+ {
+ char * log_prefix = "LOG ";
+ if (!strcmp(msg, "THINGS_BELOW_PLAYER START"))