#include #include #include #include "ini_parser.h" #include "arc_file.h" #include "debug.h" #define MAX_CONF_SIZE 512 #define MAX_BUTTONS_SIZE 128 typedef struct { char mod; uint64_t conf_default; char rbfname[33]; char corename[17]; char dirname[17]; char vhdname[17]; char conf[MAX_CONF_SIZE]; char buttons_str[MAX_BUTTONS_SIZE+1]; } arc_t; static arc_t arc; static int conf_ptr; char arc_set_conf(char *, char, int); // arc ini sections const ini_section_t arc_ini_sections[] = { {1, "ARC"} }; // arc ini vars const ini_var_t arc_ini_vars[] = { {"MOD", (void*)(&arc.mod), UINT8, 0, 127, 1}, {"DEFAULT", (void*)(&arc.conf_default), UINT64, 0, ~0, 1}, {"RBF", (void*)arc.rbfname, STRING, 1, 32, 1}, {"NAME", (void*)arc.corename, STRING, 1, 16, 1}, {"DIR", (void*)arc.dirname, STRING, 1, 16, 1}, {"VHD", (void*)arc.vhdname, STRING, 1, 16, 1}, {"CONF", (void*)arc_set_conf, CUSTOM_HANDLER, 0, 0, 1}, {"BUTTONS", (void*)arc.buttons_str, STRING, 1, MAX_BUTTONS_SIZE, 1} }; char arc_set_conf(char *c, char action, int tag) { if (action == INI_SAVE) return 0; if ((conf_ptr+strlen(c))