+ char * line = try_malloc(linemax + 1, __func__);
+ while (try_fgets(line, linemax + 1, file_read, __func__))
+ {
+ try_fwrite(line, strlen(line), 1, file_tmp, __func__);
+ }
+ free(line);
+ try_fclose(file_read, __func__);
+ }
+ }
+ if (msg)
+ {
+ try_fwrite(msg, strlen(msg), 1, file_tmp, __func__);
+ try_fputc('\n', file_tmp, __func__);
+ }
+ if (force || time(NULL) > save_wait + 15)
+ {
+ save_wait = time(NULL);
+ save_world();
+ atomic_write_finish(file_tmp, s[S_PATH_RECORD], path_tmp);
+ file_tmp = NULL;
+ }
+}
+
+
+
+extern void obey_msg(char * msg, uint8_t do_record, uint8_t do_verbose)
+{
+ if (world.is_verbose && do_verbose)
+ {
+ exit_trouble(-1 == printf("Input: %s\n", msg), __func__, "printf");
+ }
+ set_err_line_options("Trouble with message: ", msg, 0);
+ char * msg_copy = strdup(msg);
+ char * tok0 = token_from_line(msg_copy);
+ if (NULL != tok0)
+ {
+
+ if (parse_command(tok0))
+ {
+ if (world.exists)
+ {
+ world.do_update = 1;
+ }
+ if (do_record)