19.05.2010

parent 1de3885c
...@@ -1720,6 +1720,18 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu ...@@ -1720,6 +1720,18 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
return 1; return 1;
#endif #endif
if (cfgfile_strval (option, value, "chipset_compatible", &p->cs_compatible, cscompa, 0)
|| cfgfile_strval (option, value, "rtc", &p->cs_rtc, rtctype, 0)
|| cfgfile_strval (option, value, "ciaatod", &p->cs_ciaatod, ciaatodmode, 0)
|| cfgfile_strval (option, value, "ide", &p->cs_ide, idemode, 0)
|| cfgfile_strval (option, value, "scsi", &p->scsi, scsimode, 0)
|| cfgfile_strval (option, value, "comp_trustword", &p->comptrustword, compmode, 0)
|| cfgfile_strval (option, value, "comp_trustlong", &p->comptrustlong, compmode, 0)
|| cfgfile_strval (option, value, "comp_trustnaddr", &p->comptrustnaddr, compmode, 0)
|| cfgfile_strval (option, value, "collision_level", &p->collision_level, collmode, 0)
|| cfgfile_strval (option, value, "parallel_matrix_emulation", &p->parallel_matrix_emulation, epsonprinter, 0))
return 1;
if (cfgfile_string (option, value, "kickstart_rom_file", p->romfile, sizeof p->romfile / sizeof (char)) if (cfgfile_string (option, value, "kickstart_rom_file", p->romfile, sizeof p->romfile / sizeof (char))
|| cfgfile_string (option, value, "kickstart_ext_rom_file", p->romextfile, sizeof p->romextfile / sizeof (char)) || cfgfile_string (option, value, "kickstart_ext_rom_file", p->romextfile, sizeof p->romextfile / sizeof (char))
|| cfgfile_string (option, value, "amax_rom_file", p->amaxromfile, sizeof p->amaxromfile / sizeof (char)) || cfgfile_string (option, value, "amax_rom_file", p->amaxromfile, sizeof p->amaxromfile / sizeof (char))
...@@ -1858,8 +1870,25 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu ...@@ -1858,8 +1870,25 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
return 1; return 1;
} }
if (strcasecmp (option, "quickstart") == 0) {
int model = 0;
TCHAR *tmpp = _tcschr (value, ',');
if (tmpp) {
*tmpp++ = 0;
TCHAR *tmpp2 = _tcschr (value, ',');
if (tmpp2)
*tmpp2 = 0;
cfgfile_strval (option, value, option, &model, qsmodes, 0);
if (model >= 0) {
int config = _tstol (tmpp);
built_in_prefs (p, model, config, 0, 0);
}
}
return 1;
}
for (i = 0; i < MAX_FILESYSTEM_UNITS; i++) { for (i = 0; i < MAX_FILESYSTEM_UNITS; i++) {
char tmp[100]; TCHAR tmp[100];
_stprintf (tmp, "uaehf%d", i); _stprintf (tmp, "uaehf%d", i);
if (_tcscmp (option, tmp) == 0) if (_tcscmp (option, tmp) == 0)
return 1; return 1;
...@@ -1868,10 +1897,11 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu ...@@ -1868,10 +1897,11 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
if (_tcscmp (option, "filesystem") == 0 if (_tcscmp (option, "filesystem") == 0
|| _tcscmp (option, "hardfile") == 0) || _tcscmp (option, "hardfile") == 0)
{ {
int secs, heads, reserved, bs, ro; int secs, heads, reserved, bs;
char *aname, *root; bool ro;
char *tmpp = _tcschr (value, ','); TCHAR *aname, *root;
char *str; TCHAR *tmpp = _tcschr (value, ',');
TCHAR *str;
if (config_newfilesystem) if (config_newfilesystem)
return 1; return 1;
...@@ -1883,11 +1913,11 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu ...@@ -1883,11 +1913,11 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
if (strcmp (value, "1") == 0 || strcasecmp (value, "ro") == 0 if (strcmp (value, "1") == 0 || strcasecmp (value, "ro") == 0
|| strcasecmp (value, "readonly") == 0 || strcasecmp (value, "readonly") == 0
|| strcasecmp (value, "read-only") == 0) || strcasecmp (value, "read-only") == 0)
ro = 1; ro = true;
else if (strcmp (value, "0") == 0 || strcasecmp (value, "rw") == 0 else if (strcmp (value, "0") == 0 || strcasecmp (value, "rw") == 0
|| strcasecmp (value, "readwrite") == 0 || strcasecmp (value, "readwrite") == 0
|| strcasecmp (value, "read-write") == 0) || strcasecmp (value, "read-write") == 0)
ro = 0; ro = false;
else else
goto invalid_fs; goto invalid_fs;
secs = 0; heads = 0; reserved = 0; bs = 0; secs = 0; heads = 0; reserved = 0; bs = 0;
...@@ -1936,10 +1966,11 @@ add_filesys_unit (struct uaedev_mount_info *mountinfo, const char *devname, cons ...@@ -1936,10 +1966,11 @@ add_filesys_unit (struct uaedev_mount_info *mountinfo, const char *devname, cons
if (_tcscmp (option, "filesystem2") == 0 if (_tcscmp (option, "filesystem2") == 0
|| _tcscmp (option, "hardfile2") == 0) || _tcscmp (option, "hardfile2") == 0)
{ {
int secs, heads, reserved, bs, ro, bp, hdcv; int secs, heads, reserved, bs, bp, hdcv;
char *dname = NULL, *aname = "", *root = NULL, *fs = NULL, *hdc; bool ro;
char *tmpp = _tcschr (value, ','); TCHAR *dname = NULL, *aname = "", *root = NULL, *fs = NULL, *hdc;
char *str = NULL; TCHAR *tmpp = _tcschr (value, ',');
TCHAR *str = NULL;
config_newfilesystem = 1; config_newfilesystem = 1;
if (tmpp == 0) if (tmpp == 0)
...@@ -1947,9 +1978,9 @@ add_filesys_unit (struct uaedev_mount_info *mountinfo, const char *devname, cons ...@@ -1947,9 +1978,9 @@ add_filesys_unit (struct uaedev_mount_info *mountinfo, const char *devname, cons
*tmpp++ = '\0'; *tmpp++ = '\0';
if (strcasecmp (value, "ro") == 0) if (strcasecmp (value, "ro") == 0)
ro = 1; ro = true;
else if (strcasecmp (value, "rw") == 0) else if (strcasecmp (value, "rw") == 0)
ro = 0; ro = false;
else else
goto invalid_fs; goto invalid_fs;
secs = 0; heads = 0; reserved = 0; bs = 0; bp = 0; secs = 0; heads = 0; reserved = 0; bs = 0; bp = 0;
...@@ -2101,7 +2132,7 @@ static int cfgfile_separate_linea (char *line, char *line1b, char *line2b) ...@@ -2101,7 +2132,7 @@ static int cfgfile_separate_linea (char *line, char *line1b, char *line2b)
static int cfgfile_separate_line (char *line, char *line1b, char *line2b) static int cfgfile_separate_line (char *line, char *line1b, char *line2b)
{ {
char *line1, *line2; TCHAR *line1, *line2;
int i; int i;
line1 = line; line1 = line;
...@@ -2127,7 +2158,7 @@ static int cfgfile_separate_line (char *line, char *line1b, char *line2b) ...@@ -2127,7 +2158,7 @@ static int cfgfile_separate_line (char *line, char *line1b, char *line2b)
_tcscpy (line1b, line); _tcscpy (line1b, line);
if (line2b[0] == '"' || line2b[0] == '\"') { if (line2b[0] == '"' || line2b[0] == '\"') {
char c = line2b[0]; TCHAR c = line2b[0];
int i = 0; int i = 0;
memmove (line2b, line2b + 1, (_tcslen (line2b) + 1) * sizeof (char)); memmove (line2b, line2b + 1, (_tcslen (line2b) + 1) * sizeof (char));
while (line2b[i] != 0 && line2b[i] != c) while (line2b[i] != 0 && line2b[i] != c)
...@@ -2163,7 +2194,7 @@ static int isobsolete (char *s) ...@@ -2163,7 +2194,7 @@ static int isobsolete (char *s)
static void cfgfile_parse_separated_line (struct uae_prefs *p, char *line1b, char *line2b, int type) static void cfgfile_parse_separated_line (struct uae_prefs *p, char *line1b, char *line2b, int type)
{ {
char line3b[CONFIG_BLEN], line4b[CONFIG_BLEN]; TCHAR line3b[CONFIG_BLEN], line4b[CONFIG_BLEN];
struct strlist *sl; struct strlist *sl;
int ret; int ret;
...@@ -2188,9 +2219,9 @@ static void cfgfile_parse_separated_line (struct uae_prefs *p, char *line1b, cha ...@@ -2188,9 +2219,9 @@ static void cfgfile_parse_separated_line (struct uae_prefs *p, char *line1b, cha
} }
} }
void cfgfile_parse_line (struct uae_prefs *p, char *line, int type) void cfgfile_parse_line (struct uae_prefs *p, TCHAR *line, int type)
{ {
char line1b[CONFIG_BLEN], line2b[CONFIG_BLEN]; TCHAR line1b[CONFIG_BLEN], line2b[CONFIG_BLEN];
if (!cfgfile_separate_line (line, line1b, line2b)) if (!cfgfile_separate_line (line, line1b, line2b))
return; return;
...@@ -2198,10 +2229,10 @@ void cfgfile_parse_line (struct uae_prefs *p, char *line, int type) ...@@ -2198,10 +2229,10 @@ void cfgfile_parse_line (struct uae_prefs *p, char *line, int type)
return; return;
} }
static void subst (const char *p, char *f, int n) static void subst (TCHAR *p, TCHAR *f, int n)
{ {
char *str = cfgfile_subst_path (UNEXPANDED, p, f); TCHAR *str = cfgfile_subst_path (UNEXPANDED, p, f);
strncpy (f, str, n - 1); _tcsncpy (f, str, n - 1);
f[n - 1] = '\0'; f[n - 1] = '\0';
free (str); free (str);
} }
...@@ -2209,9 +2240,9 @@ static void subst (const char *p, char *f, int n) ...@@ -2209,9 +2240,9 @@ static void subst (const char *p, char *f, int n)
static char *cfg_fgets (char *line, int max, FILE *fh) static char *cfg_fgets (char *line, int max, FILE *fh)
{ {
#ifdef SINGLEFILE #ifdef SINGLEFILE
extern char singlefile_config[]; extern TCHAR singlefile_config[];
static char *sfile_ptr; static TCHAR *sfile_ptr;
char *p; TCHAR *p;
#endif #endif
if (fh) if (fh)
...@@ -2231,7 +2262,7 @@ static char *cfg_fgets (char *line, int max, FILE *fh) ...@@ -2231,7 +2262,7 @@ static char *cfg_fgets (char *line, int max, FILE *fh)
p = sfile_ptr; p = sfile_ptr;
while (*p != 13 && *p != 10 && *p != 0) p++; while (*p != 13 && *p != 10 && *p != 0) p++;
memset (line, 0, max); memset (line, 0, max);
memcpy (line, sfile_ptr, p - sfile_ptr); memcpy (line, sfile_ptr, (p - sfile_ptr) * sizeof (TCHAR));
sfile_ptr = p + 1; sfile_ptr = p + 1;
if (*sfile_ptr == 13) if (*sfile_ptr == 13)
sfile_ptr++; sfile_ptr++;
...@@ -2247,9 +2278,10 @@ static int cfgfile_load_2 (struct uae_prefs *p, const char *filename, int real, ...@@ -2247,9 +2278,10 @@ static int cfgfile_load_2 (struct uae_prefs *p, const char *filename, int real,
int i; int i;
FILE *fh; FILE *fh;
char linea[CONFIG_BLEN]; char linea[CONFIG_BLEN];
char line[CONFIG_BLEN], line1b[CONFIG_BLEN], line2b[CONFIG_BLEN]; TCHAR line[CONFIG_BLEN], line1b[CONFIG_BLEN], line2b[CONFIG_BLEN];
struct strlist *sl; struct strlist *sl;
int type1 = 0, type2 = 0, askedtype = 0; bool type1 = false, type2 = false;
int askedtype = 0;
if (type) { if (type) {
askedtype = *type; askedtype = *type;
...@@ -2258,7 +2290,7 @@ static int cfgfile_load_2 (struct uae_prefs *p, const char *filename, int real, ...@@ -2258,7 +2290,7 @@ static int cfgfile_load_2 (struct uae_prefs *p, const char *filename, int real,
if (real) { if (real) {
p->config_version = 0; p->config_version = 0;
config_newfilesystem = 0; config_newfilesystem = 0;
reset_inputdevice_config (p); //reset_inputdevice_config (p);
} }
write_log ("Opening cfgfile '%s': ", filename); write_log ("Opening cfgfile '%s': ", filename);
...@@ -2384,13 +2416,13 @@ void cfgfile_show_usage (void) ...@@ -2384,13 +2416,13 @@ void cfgfile_show_usage (void)
is far less annoying to use. */ is far less annoying to use. */
static void parse_gfx_specs (struct uae_prefs *p, char *spec) static void parse_gfx_specs (struct uae_prefs *p, char *spec)
{ {
char *x0 = my_strdup (spec); TCHAR *x0 = my_strdup (spec);
char *x1, *x2; TCHAR *x1, *x2;
x1 = strchr (x0, ':'); x1 = _tcschr (x0, ':');
if (x1 == 0) if (x1 == 0)
goto argh; goto argh;
x2 = strchr (x1+1, ':'); x2 = _tcschr (x1+1, ':');
if (x2 == 0) if (x2 == 0)
goto argh; goto argh;
*x1++ = 0; *x2++ = 0; *x1++ = 0; *x2++ = 0;
...@@ -2414,7 +2446,7 @@ static void parse_gfx_specs (struct uae_prefs *p, char *spec) ...@@ -2414,7 +2446,7 @@ static void parse_gfx_specs (struct uae_prefs *p, char *spec)
free (x0); free (x0);
return; return;
argh: argh:
write_log ("Bad display mode specification.\n"); write_log ("Bad display mode specification.\n");
write_log ("The format to use is: \"width:height:modifiers\"\n"); write_log ("The format to use is: \"width:height:modifiers\"\n");
write_log ("Type \"uae -h\" for detailed help.\n"); write_log ("Type \"uae -h\" for detailed help.\n");
...@@ -2423,8 +2455,8 @@ static void parse_gfx_specs (struct uae_prefs *p, char *spec) ...@@ -2423,8 +2455,8 @@ static void parse_gfx_specs (struct uae_prefs *p, char *spec)
static void parse_sound_spec (struct uae_prefs *p, char *spec) static void parse_sound_spec (struct uae_prefs *p, char *spec)
{ {
char *x0 = my_strdup (spec); TCHAR *x0 = my_strdup (spec);
char *x1, *x2 = NULL, *x3 = NULL, *x4 = NULL, *x5 = NULL; TCHAR *x1, *x2 = NULL, *x3 = NULL, *x4 = NULL, *x5 = NULL;
x1 = _tcschr (x0, ':'); x1 = _tcschr (x0, ':');
if (x1 != NULL) { if (x1 != NULL) {
...@@ -2503,8 +2535,8 @@ bad: ...@@ -2503,8 +2535,8 @@ bad:
static void parse_filesys_spec (int readonly, const char *spec) static void parse_filesys_spec (int readonly, const char *spec)
{ {
char buf[256]; TCHAR buf[256];
char *s2; TCHAR *s2;
_tcsncpy (buf, spec, 255); buf[255] = 0; _tcsncpy (buf, spec, 255); buf[255] = 0;
s2 = _tcschr (buf, ':'); s2 = _tcschr (buf, ':');
...@@ -2541,8 +2573,8 @@ add_filesys_unit (struct uaedev_mount_info *mountinfo, const char *devname, cons ...@@ -2541,8 +2573,8 @@ add_filesys_unit (struct uaedev_mount_info *mountinfo, const char *devname, cons
static void parse_hardfile_spec (char *spec) static void parse_hardfile_spec (char *spec)
{ {
char *x0 = my_strdup (spec); TCHAR *x0 = my_strdup (spec);
char *x1, *x2, *x3, *x4; TCHAR *x1, *x2, *x3, *x4;
x1 = _tcschr (x0, ':'); x1 = _tcschr (x0, ':');
if (x1 == NULL) if (x1 == NULL)
...@@ -2578,7 +2610,7 @@ add_filesys_unit (struct uaedev_mount_info *mountinfo, const char *devname, cons ...@@ -2578,7 +2610,7 @@ add_filesys_unit (struct uaedev_mount_info *mountinfo, const char *devname, cons
free (x0); free (x0);
return; return;
argh: argh:
free (x0); free (x0);
write_log ("Bad hardfile parameter specified - type \"uae -h\" for help.\n"); write_log ("Bad hardfile parameter specified - type \"uae -h\" for help.\n");
return; return;
...@@ -2623,17 +2655,17 @@ static void parse_cpu_specs (struct uae_prefs *p, char *spec) ...@@ -2623,17 +2655,17 @@ static void parse_cpu_specs (struct uae_prefs *p, char *spec)
int parse_cmdline_option (struct uae_prefs *p, char c, char *arg) int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
{ {
struct strlist *u = xcalloc (struct strlist, 1); struct strlist *u = xcalloc (struct strlist, 1);
const char arg_required[] = "0123rKpImWSAJwNCZUFcblOdHRv"; const TCHAR arg_required[] = "0123rKpImWSAJwNCZUFcblOdHRv";
if (strchr (arg_required, c) && ! arg) { if (_tcschr (arg_required, c) && ! arg) {
write_log ("Missing argument for option `-%c'!\n", c); write_log ("Missing argument for option `-%c'!\n", c);
return 0; return 0;
} }
u->option = xmalloc (char, 2); u->option = xmalloc (TCHAR, 2);
u->option[0] = c; u->option[0] = c;
u->option[1] = 0; u->option[1] = 0;
u->value = arg ? my_strdup (arg) : NULL; u->value = my_strdup (arg);
u->next = p->all_lines; u->next = p->all_lines;
p->all_lines = u; p->all_lines = u;
...@@ -2674,12 +2706,12 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg) ...@@ -2674,12 +2706,12 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
#endif #endif
case 'n': case 'n':
if (strchr (arg, 'i') != 0) if (_tcschr (arg, 'i') != 0)
p->immediate_blits = 1; p->immediate_blits = 1;
break; break;
case 'v': case 'v':
set_chipset_mask (p, atoi (arg)); set_chipset_mask (p, _tstoi (arg));
break; break;
case 'C': case 'C':
...@@ -2687,23 +2719,23 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg) ...@@ -2687,23 +2719,23 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
break; break;
case 'Z': case 'Z':
p->z3fastmem_size = atoi (arg) * 0x100000; p->z3fastmem_size = _tstoi (arg) * 0x100000;
break; break;
case 'U': case 'U':
p->gfxmem_size = atoi (arg) * 0x100000; p->gfxmem_size = _tstoi (arg) * 0x100000;
break; break;
case 'F': case 'F':
p->fastmem_size = atoi (arg) * 0x100000; p->fastmem_size = _tstoi (arg) * 0x100000;
break; break;
case 'b': case 'b':
p->bogomem_size = atoi (arg) * 0x40000; p->bogomem_size = _tstoi (arg) * 0x40000;
break; break;
case 'c': case 'c':
p->chipmem_size = atoi (arg) * 0x80000; p->chipmem_size = _tstoi (arg) * 0x80000;
break; break;
case 'l': case 'l':
...@@ -2725,11 +2757,11 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg) ...@@ -2725,11 +2757,11 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
case 'O': parse_gfx_specs (p, arg); break; case 'O': parse_gfx_specs (p, arg); break;
case 'd': case 'd':
if (strchr (arg, 'S') != NULL || strchr (arg, 's')) { if (_tcschr (arg, 'S') != NULL || _tcschr (arg, 's')) {
write_log (" Serial on demand.\n"); write_log (" Serial on demand.\n");
p->serial_demand = 1; p->serial_demand = 1;
} }
if (strchr (arg, 'P') != NULL || strchr (arg, 'p')) { if (_tcschr (arg, 'P') != NULL || _tcschr (arg, 'p')) {
write_log (" Parallel on demand.\n"); write_log (" Parallel on demand.\n");
p->parallel_demand = 1; p->parallel_demand = 1;
} }
...@@ -2755,13 +2787,13 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg) ...@@ -2755,13 +2787,13 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
write_log ("Unknown option `-%c'!\n", c); write_log ("Unknown option `-%c'!\n", c);
break; break;
} }
return !! strchr (arg_required, c); return !! _tcschr (arg_required, c);
} }
void cfgfile_addcfgparam (char *line) void cfgfile_addcfgparam (char *line)
{ {
struct strlist *u; struct strlist *u;
char line1b[CONFIG_BLEN], line2b[CONFIG_BLEN]; TCHAR line1b[CONFIG_BLEN], line2b[CONFIG_BLEN];
if (!line) { if (!line) {
struct strlist **ps = &temp_lines; struct strlist **ps = &temp_lines;
...@@ -2778,8 +2810,8 @@ void cfgfile_addcfgparam (char *line) ...@@ -2778,8 +2810,8 @@ void cfgfile_addcfgparam (char *line)
if (!cfgfile_separate_line (line, line1b, line2b)) if (!cfgfile_separate_line (line, line1b, line2b))
return; return;
u = xcalloc (struct strlist, 1); u = xcalloc (struct strlist, 1);
u->option = my_strdup(line1b); u->option = my_strdup (line1b);
u->value = my_strdup(line2b); u->value = my_strdup (line2b);
u->next = temp_lines; u->next = temp_lines;
temp_lines = u; temp_lines = u;
} }
...@@ -2790,15 +2822,16 @@ unsigned int cmdlineparser (const char *s, char *outp[], unsigned int max) ...@@ -2790,15 +2822,16 @@ unsigned int cmdlineparser (const char *s, char *outp[], unsigned int max)
unsigned int cnt = 0; unsigned int cnt = 0;
int slash = 0; int slash = 0;
int quote = 0; int quote = 0;
char tmp1[MAX_DPATH]; TCHAR tmp1[MAX_DPATH];
const char *prev; const char *prev;
int doout; int doout;
doout = 0; doout = 0;
prev = s; prev = s;
j = 0; j = 0;
outp[0] = 0;
while (cnt < max) { while (cnt < max) {
char c = *s++; TCHAR c = *s++;
if (!c) if (!c)
break; break;
if (c < 32) if (c < 32)
...@@ -2825,15 +2858,17 @@ unsigned int cmdlineparser (const char *s, char *outp[], unsigned int max) ...@@ -2825,15 +2858,17 @@ unsigned int cmdlineparser (const char *s, char *outp[], unsigned int max)
} }
if (doout) { if (doout) {
outp[cnt++] = my_strdup (tmp1); outp[cnt++] = my_strdup (tmp1);
outp[cnt] = 0;
tmp1[0] = 0; tmp1[0] = 0;
doout = 0; doout = 0;
j = 0; j = 0;
} }
slash = 0; slash = 0;
} }
if (j > 0 && cnt < max) if (j > 0 && cnt < max) {
outp[cnt++] = my_strdup (tmp1); outp[cnt++] = my_strdup (tmp1);
outp[cnt] = 0;
}
return cnt; return cnt;
} }
...@@ -2841,13 +2876,13 @@ unsigned int cmdlineparser (const char *s, char *outp[], unsigned int max) ...@@ -2841,13 +2876,13 @@ unsigned int cmdlineparser (const char *s, char *outp[], unsigned int max)
uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae_u32 outsize) uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae_u32 outsize)
{ {
char *p; TCHAR *p;
char *argc[UAELIB_MAX_PARSE]; TCHAR *argc[UAELIB_MAX_PARSE];
unsigned int argv, i; unsigned int argv, i;
uae_u32 err; uae_u32 err;
uae_u8 zero = 0; TCHAR zero = 0;
static FILE *configstore = 0; static FILE *configstore = 0;
static char *configsearch; static TCHAR *configsearch;
static int configsearchfound; static int configsearchfound;
config_changed = 1; config_changed = 1;
...@@ -2860,9 +2895,9 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae ...@@ -2860,9 +2895,9 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae
goto end; goto end;
} }
if (configsearch) { if (configsearch) {
char tmp[CONFIG_BLEN]; TCHAR tmp[CONFIG_BLEN];
unsigned int j = 0; unsigned int j = 0;
char *in = configsearch; TCHAR *in = configsearch;
unsigned int inlen = strlen (configsearch); unsigned int inlen = strlen (configsearch);
int joker = 0; int joker = 0;
...@@ -2882,8 +2917,8 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae ...@@ -2882,8 +2917,8 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae
err = 0; err = 0;
goto end; goto end;
} }
if (j >= sizeof (tmp) / sizeof (char) - 1) if (j >= sizeof (tmp) / sizeof (TCHAR) - 1)
j = sizeof (tmp) / sizeof (char) - 1; j = sizeof (tmp) / sizeof (TCHAR) - 1;
if (b == 0) { if (b == 0) {
err = 10; err = 10;
if (configsearch) if (configsearch)
...@@ -2893,16 +2928,16 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae ...@@ -2893,16 +2928,16 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae
goto end; goto end;
} }
if (b == '\n') { if (b == '\n') {
if (configsearch && !strncmp (tmp, in, inlen) && if (configsearch && !_tcsncmp (tmp, in, inlen) &&
((inlen > 0 && strlen (tmp) > inlen && tmp[inlen] == '=') || (joker))) { ((inlen > 0 && _tcslen (tmp) > inlen && tmp[inlen] == '=') || (joker))) {
char *p; TCHAR *p;
if (joker) if (joker)
p = tmp - 1; p = tmp - 1;
else else
p = strchr (tmp, '='); p = _tcschr (tmp, '=');
if (p) { if (p) {
for (i = 0; i < outsize - 1; i++) { for (i = 0; out && i < outsize - 1; i++) {
uae_u8 b = *++p; TCHAR b = *++p;
out[i] = b; out[i] = b;
out[i + 1] = 0; out[i + 1] = 0;
if (!b) if (!b)
...@@ -2922,9 +2957,9 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae ...@@ -2922,9 +2957,9 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae
} }
} }
err = 0xffffffff; err = 0xffffffff;
for (i = 0; i < outsize - 1; i++) { for (i = 0; out && i < outsize - 1; i++) {
uae_u8 b = 0; uae_u8 b = 0;
if (fread (&b, 1, 1, configstore) != 1) if (zfile_fread (&b, 1, 1, configstore) != 1)
err = 0; err = 0;
if (b == 0) if (b == 0)
err = 0; err = 0;
...@@ -2951,7 +2986,7 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae ...@@ -2951,7 +2986,7 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae
configstore = fopen ("configstore", "w+"); configstore = fopen ("configstore", "w+");
configsearch = NULL; configsearch = NULL;
if (argv > 0 && strlen (argc[0]) > 0) if (argv > 0 && _tcslen (argc[0]) > 0)
configsearch = my_strdup (argc[0]); configsearch = my_strdup (argc[0]);
if (!configstore) { if (!configstore) {
err = 20; err = 20;
...@@ -2980,8 +3015,8 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae ...@@ -2980,8 +3015,8 @@ uae_u32 cfgfile_modify (uae_u32 index, char *parms, uae_u32 size, char *out, uae
} }
end: end:
for (i = 0; i < argv; i++) for (i = 0; i < argv; i++)
free (argc[i]); xfree (argc[i]);
free (p); xfree (p);
return err; return err;
} }
...@@ -3003,7 +3038,7 @@ uae_u32 cfgfile_uaelib_modify (uae_u32 index, uae_u32 parms, uae_u32 size, uae_u ...@@ -3003,7 +3038,7 @@ uae_u32 cfgfile_uaelib_modify (uae_u32 index, uae_u32 parms, uae_u32 size, uae_u
goto end; goto end;
} }
if (out) { if (out) {
out_p = xmalloc (char, outsize + 1); out_p = xmalloc (TCHAR, outsize + 1);
if (!out_p) { if (!out_p) {
ret = 10; ret = 10;
goto end; goto end;
...@@ -3037,19 +3072,19 @@ end: ...@@ -3037,19 +3072,19 @@ end:
uae_u32 cfgfile_uaelib (int mode, uae_u32 name, uae_u32 dst, uae_u32 maxlen) uae_u32 cfgfile_uaelib (int mode, uae_u32 name, uae_u32 dst, uae_u32 maxlen)
{ {
char tmp[CONFIG_BLEN]; TCHAR tmp[CONFIG_BLEN];
unsigned int i; int i;
struct strlist *sl; struct strlist *sl;
if (mode) if (mode)
return 0; return 0;
for (i = 0; i < sizeof(tmp); i++) { for (i = 0; i < sizeof (tmp) / sizeof (TCHAR); i++) {
tmp[i] = get_byte (name + i); tmp[i] = get_byte (name + i);
if (tmp[i] == 0) if (tmp[i] == 0)
break; break;
} }
tmp[sizeof(tmp) - 1] = 0; tmp[sizeof(tmp) / sizeof (TCHAR) - 1] = 0;
if (tmp[0] == 0) if (tmp[0] == 0)
return 0; return 0;
for (sl = currprefs.all_lines; sl; sl = sl->next) { for (sl = currprefs.all_lines; sl; sl = sl->next) {
...@@ -3086,7 +3121,7 @@ uae_u8 *save_configuration (int *len) ...@@ -3086,7 +3121,7 @@ uae_u8 *save_configuration (int *len)
dstbak = dst = xmalloc (uae_u8, tmpsize); dstbak = dst = xmalloc (uae_u8, tmpsize);
p = dst; p = dst;
for (;;) { for (;;) {
char tmpout[256]; TCHAR tmpout[256];
int ret; int ret;
tmpout[0] = 0; tmpout[0] = 0;
ret = cfgfile_modify (index, "*", 1, tmpout, sizeof (tmpout) / sizeof (char)); ret = cfgfile_modify (index, "*", 1, tmpout, sizeof (tmpout) / sizeof (char));
...@@ -3127,11 +3162,12 @@ void default_prefs (struct uae_prefs *p, int type) ...@@ -3127,11 +3162,12 @@ void default_prefs (struct uae_prefs *p, int type)
{ {
int i; int i;
int roms[] = { 6, 7, 8, 9, 10, 14, 5, 4, 3, 2, 1, -1 }; int roms[] = { 6, 7, 8, 9, 10, 14, 5, 4, 3, 2, 1, -1 };
uae_u8 zero = 0; TCHAR zero = 0;
struct zfile *f; struct zfile *f;
reset_inputdevice_config (p);
memset (p, 0, sizeof (*p)); memset (p, 0, sizeof (*p));
strcpy (p->description, "UAE default configuration"); _tcscpy (p->description, "UAE default configuration");
p->config_hardware_path[0] = 0; p->config_hardware_path[0] = 0;
p->config_host_path[0] = 0; p->config_host_path[0] = 0;
...@@ -3877,8 +3913,8 @@ static int bip_super (struct uae_prefs *p, int config, int compa, int romcheck) ...@@ -3877,8 +3913,8 @@ static int bip_super (struct uae_prefs *p, int config, int compa, int romcheck)
p->produce_sound = 2; p->produce_sound = 2;
#ifdef JIT #ifdef JIT
p->cachesize = 8192; p->cachesize = 8192;
#endif
#endif p->dfxtype[0] = DRV_35_HD; p->dfxtype[0] = DRV_35_HD;
p->dfxtype[1] = DRV_35_HD; p->dfxtype[1] = DRV_35_HD;
p->floppy_speed = 0; p->floppy_speed = 0;
p->cpu_idle = 150; p->cpu_idle = 150;
......
...@@ -3036,7 +3036,7 @@ STATIC_INLINE uae_u16 VPOSR (void) ...@@ -3036,7 +3036,7 @@ STATIC_INLINE uae_u16 VPOSR (void)
vp |= lol ? 0x80 : 0; vp |= lol ? 0x80 : 0;
#if 0 #if 0
if (M68K_GETPC < 0x00f00000 || M68K_GETPC >= 0x10000000) if (M68K_GETPC < 0x00f00000 || M68K_GETPC >= 0x10000000)
write_log (L"VPOSR %04x at %08x\n", vp, M68K_GETPC); write_log ("VPOSR %04x at %08x\n", vp, M68K_GETPC);
#endif #endif
if (currprefs.cpu_model >= 68020) if (currprefs.cpu_model >= 68020)
hsyncdelay (); hsyncdelay ();
...@@ -5782,7 +5782,7 @@ void customreset (int hardreset) ...@@ -5782,7 +5782,7 @@ void customreset (int hardreset)
CLXCON (clxcon); CLXCON (clxcon);
CLXCON2 (clxcon2); CLXCON2 (clxcon2);
calcdiw (); calcdiw ();
write_log (L"CPU=%d Chipset=%s %s\n", write_log ("CPU=%d Chipset=%s %s\n",
currprefs.cpu_model, currprefs.cpu_model,
(currprefs.chipset_mask & CSMASK_AGA) ? "AGA" : (currprefs.chipset_mask & CSMASK_AGA) ? "AGA" :
(currprefs.chipset_mask & CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE) == (CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE) ? "Full ECS" : (currprefs.chipset_mask & CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE) == (CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE) ? "Full ECS" :
......
...@@ -3809,7 +3809,6 @@ int main (int argc, char **argv) ...@@ -3809,7 +3809,6 @@ int main (int argc, char **argv)
* I don't dare to touch the 68k version. */ * I don't dare to touch the 68k version. */
headerfile = fopen ("cputbl.h", "wb"); headerfile = fopen ("cputbl.h", "wb");
stblfile = fopen ("cpustbl.c", "wb"); stblfile = fopen ("cpustbl.c", "wb");
generate_includes (stblfile); generate_includes (stblfile);
......
...@@ -123,13 +123,13 @@ static int mousegrab; ...@@ -123,13 +123,13 @@ static int mousegrab;
static int mousehack; static int mousehack;
static int is_hwsurface; static int is_hwsurface;
static int have_rawkeys; static int have_rawkeys;
static int refresh_necessary; static int refresh_necessary;
static int last_state = -1; static int last_state = -1;
int alt_pressed;
unsigned int mouse_capture;
/* /*
* Set window title with some useful status info. * Set window title with some useful status info.
*/ */
...@@ -1330,6 +1330,23 @@ void handle_events (void) ...@@ -1330,6 +1330,23 @@ void handle_events (void)
int keycode; int keycode;
int ievent; int ievent;
// Hack -- Alt + Tab
/*
if (rEvent.key.keysym.sym == SDLK_LALT) alt_pressed = rEvent.key.type;
if (rEvent.key.keysym.sym == SDLK_RALT) alt_pressed = rEvent.key.type;
if ((rEvent.key.keysym.sym == SDLK_TAB) && (alt_pressed == SDL_KEYDOWN)) {
alt_pressed = SDL_KEYUP;
if (mouse_capture) {
SDL_WM_GrabInput(SDL_GRAB_ON);
SDL_ShowCursor(SDL_DISABLE);
} else {
SDL_WM_GrabInput(SDL_GRAB_OFF);
SDL_ShowCursor(SDL_ENABLE);
}
break;
}
*/
if (currprefs.map_raw_keys) { if (currprefs.map_raw_keys) {
keycode = rEvent.key.keysym.scancode; keycode = rEvent.key.keysym.scancode;
// Hack - OS4 keyup events have bit 7 set. // Hack - OS4 keyup events have bit 7 set.
......
...@@ -836,3 +836,4 @@ int input_get_default_joystick_analog (struct uae_input_device *uid, int i, int ...@@ -836,3 +836,4 @@ int input_get_default_joystick_analog (struct uae_input_device *uid, int i, int
return 0; return 0;
} }
//
...@@ -4254,9 +4254,9 @@ void write_dcache030 (uaecptr addr, uae_u32 val, int size) ...@@ -4254,9 +4254,9 @@ void write_dcache030 (uaecptr addr, uae_u32 val, int size)
#if 0 #if 0
uaecptr a = 0x1db0c; uaecptr a = 0x1db0c;
if (addr - (1 << size) + 1 <= a && addr + (1 << size) >= a) { if (addr - (1 << size) + 1 <= a && addr + (1 << size) >= a) {
write_log (L"%08x %d %d %08x %08x %d\n", addr, aligned, size, val, tag1, lws1); write_log ("%08x %d %d %08x %08x %d\n", addr, aligned, size, val, tag1, lws1);
if (aligned == 2) if (aligned == 2)
write_log (L"*\n"); write_log ("*\n");
} }
#endif #endif
...@@ -4330,7 +4330,7 @@ uae_u32 read_dcache030 (uaecptr addr, int size) ...@@ -4330,7 +4330,7 @@ uae_u32 read_dcache030 (uaecptr addr, int size)
} else { } else {
v1 = c1->data[lws1]; v1 = c1->data[lws1];
if (get_long (addr) != v1) { if (get_long (addr) != v1) {
write_log (L"data cache mismatch %d %d %08x %08x != %08x %08x %d PC=%08x\n", write_log ("data cache mismatch %d %d %08x %08x != %08x %08x %d PC=%08x\n",
size, aligned, addr, get_long (addr), v1, tag1, lws1, M68K_GETPC); size, aligned, addr, get_long (addr), v1, tag1, lws1, M68K_GETPC);
v1 = get_long (addr); v1 = get_long (addr);
} }
...@@ -4354,7 +4354,7 @@ uae_u32 read_dcache030 (uaecptr addr, int size) ...@@ -4354,7 +4354,7 @@ uae_u32 read_dcache030 (uaecptr addr, int size)
} else { } else {
v2 = c2->data[lws2]; v2 = c2->data[lws2];
if (get_long (addr) != v2) { if (get_long (addr) != v2) {
write_log (L"data cache mismatch %d %d %08x %08x != %08x %08x %d PC=%08x\n", write_log ("data cache mismatch %d %d %08x %08x != %08x %08x %d PC=%08x\n",
size, aligned, addr, get_long (addr), v2, tag2, lws2, M68K_GETPC); size, aligned, addr, get_long (addr), v2, tag2, lws2, M68K_GETPC);
v2 = get_long (addr); v2 = get_long (addr);
} }
...@@ -4368,7 +4368,7 @@ uae_u32 read_dcache030 (uaecptr addr, int size) ...@@ -4368,7 +4368,7 @@ uae_u32 read_dcache030 (uaecptr addr, int size)
else if (size == 2 && aligned == 3) else if (size == 2 && aligned == 3)
return (v1 << 24) | (v2 >> 8); return (v1 << 24) | (v2 >> 8);
write_log (L"dcache030 weirdness!?\n"); write_log ("dcache030 weirdness!?\n");
return 0; return 0;
} }
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
<key>CFBundleName</key> <key>CFBundleName</key>
<string>PUAE</string> <string>PUAE</string>
<key>CFBundleGetInfoString</key> <key>CFBundleGetInfoString</key>
<string>2.1.0</string> <string>2.2.0</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>2.1.0</string> <string>2.2.0</string>
</dict> </dict>
</plist> </plist>
...@@ -47,7 +47,7 @@ static int scsierr(SCSI *scgp) ...@@ -47,7 +47,7 @@ static int scsierr(SCSI *scgp)
{ {
register struct scg_cmd *cp = scgp->scmd; register struct scg_cmd *cp = scgp->scmd;
if(cp->error != SCG_NO_ERROR || if (cp->error != SCG_NO_ERROR ||
cp->ux_errno != 0 || *(u_char *)&cp->scb != 0) cp->ux_errno != 0 || *(u_char *)&cp->scb != 0)
return -1; return -1;
return 0; return 0;
...@@ -219,8 +219,7 @@ static uae_u32 scsidev_open (void) ...@@ -219,8 +219,7 @@ static uae_u32 scsidev_open (void)
#endif #endif
/* Check unit number */ /* Check unit number */
if ((sdd = get_scsidev_data (unit)) && if ((sdd = get_scsidev_data (unit)) && start_thread (sdd)) {
start_thread (sdd)) {
opencount++; opencount++;
put_word (m68k_areg (regs, 6)+32, get_word (m68k_areg (regs, 6)+32) + 1); put_word (m68k_areg (regs, 6)+32, get_word (m68k_areg (regs, 6)+32) + 1);
put_long (tmp1 + 24, unit); /* io_Unit */ put_long (tmp1 + 24, unit); /* io_Unit */
...@@ -320,8 +319,7 @@ static void scsidev_do_scsi (struct scsidevdata *sdd, uaecptr request) ...@@ -320,8 +319,7 @@ static void scsidev_do_scsi (struct scsidevdata *sdd, uaecptr request)
addrbank *bank_cmd = &get_mem_bank (scsi_cmd); addrbank *bank_cmd = &get_mem_bank (scsi_cmd);
/* do transfer directly to and from Amiga memory */ /* do transfer directly to and from Amiga memory */
if (!bank_data || !bank_data->check (scsi_data, scsi_len) || if (!bank_data || !bank_data->check (scsi_data, scsi_len) || !bank_cmd || !bank_cmd->check (scsi_cmd, scsi_cmd_len)) {
!bank_cmd || !bank_cmd->check (scsi_cmd, scsi_cmd_len)) {
put_byte (request + 31, (uae_u8)-5); /* IOERR_BADADDRESS */ put_byte (request + 31, (uae_u8)-5); /* IOERR_BADADDRESS */
return; return;
} }
......
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
#define PACKAGE_NAME "PUAE" #define PACKAGE_NAME "PUAE"
/* Define to the full name and version of this package. */ /* Define to the full name and version of this package. */
#define PACKAGE_STRING "PUAE 2.1.0" #define PACKAGE_STRING "PUAE 2.2.0"
/* Define to the one symbol short name of this package. */ /* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "puae" #define PACKAGE_TARNAME "puae"
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
#define PACKAGE_URL "" #define PACKAGE_URL ""
/* Define to the version of this package. */ /* Define to the version of this package. */
#define PACKAGE_VERSION "2.1.0" #define PACKAGE_VERSION "2.2.0"
/* Define to the necessary symbol if this constant uses a non-standard name on /* Define to the necessary symbol if this constant uses a non-standard name on
your system. */ your system. */
...@@ -395,7 +395,7 @@ ...@@ -395,7 +395,7 @@
/* Version number of package */ /* Version number of package */
#define VERSION "2.1.0" #define VERSION "2.2.0"
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */ significant byte first (like Motorola and SPARC, unlike Intel). */
......
...@@ -445,7 +445,7 @@ configure:4344: $? = 0 ...@@ -445,7 +445,7 @@ configure:4344: $? = 0
configure:4344: result: yes configure:4344: result: yes
configure:4350: checking for _doprnt configure:4350: checking for _doprnt
configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5 configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/ccSMtDaE.o: In function `main': /tmp/ccduySMn.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt' /home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt'
collect2: ld returned 1 exit status collect2: ld returned 1 exit status
configure:4350: $? = 1 configure:4350: $? = 1
...@@ -533,7 +533,7 @@ configure:4364: $? = 0 ...@@ -533,7 +533,7 @@ configure:4364: $? = 0
configure:4364: result: yes configure:4364: result: yes
configure:4364: checking for strcmpi configure:4364: checking for strcmpi
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5 configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/ccMreunT.o: In function `main': /tmp/ccgpaTxE.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi' /home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi'
collect2: ld returned 1 exit status collect2: ld returned 1 exit status
configure:4364: $? = 1 configure:4364: $? = 1
...@@ -613,7 +613,7 @@ configure: failed program was: ...@@ -613,7 +613,7 @@ configure: failed program was:
configure:4364: result: no configure:4364: result: no
configure:4364: checking for stricmp configure:4364: checking for stricmp
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5 configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/ccfHXHOY.o: In function `main': /tmp/ccAjejvH.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp' /home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp'
collect2: ld returned 1 exit status collect2: ld returned 1 exit status
configure:4364: $? = 1 configure:4364: $? = 1
......
...@@ -227,8 +227,6 @@ static void *trap_thread (void *arg) ...@@ -227,8 +227,6 @@ static void *trap_thread (void *arg)
{ {
TrapContext *context = (TrapContext *) arg; TrapContext *context = (TrapContext *) arg;
uae_set_thread_priority (2);
/* Wait until main thread is ready to switch to the /* Wait until main thread is ready to switch to the
* this trap context. */ * this trap context. */
uae_sem_wait (&context->switch_to_trap_sem); uae_sem_wait (&context->switch_to_trap_sem);
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
static struct uae_xcmd *first = NULL; static struct uae_xcmd *first = NULL;
static struct uae_xcmd *last = NULL; static struct uae_xcmd *last = NULL;
static TCHAR running = 0; static TCHAR running = 0;
static uae_u32 uaeexe_server (TrapContext *context) REGPARAM; static uae_u32 REGPARAM3 uaeexe_server (TrapContext *context) REGPARAM;
/* /*
* Install the server * Install the server
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment