- FILE * file_read = try_fopen(world.path_record, "r", f_name);
- uint32_t linemax = textfile_width(file_read);
- char line[linemax + 1];
- while (try_fgets(line, linemax + 1, file_read, f_name))
+ try_fwrite(line, strlen(line), 1, file_tmp, __func__);
+ }
+ free(line);
+ try_fclose(file_read, __func__);
+ }
+ try_fwrite(msg, strlen(msg), 1, file_tmp, __func__);
+ try_fputc('\n', file_tmp, __func__);
+ atomic_write_finish(file_tmp, s[S_PATH_RECORD], path_tmp);
+}
+
+
+
+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)