| 3671 | } |
| 3672 | |
| 3673 | static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) |
| 3674 | { |
| 3675 | int i, v; |
| 3676 | bool vb; |
| 3677 | TCHAR *tmpp; |
| 3678 | TCHAR tmpbuf[CONFIG_BLEN]; |
| 3679 | |
| 3680 | if (_tcsncmp (option, _T("input."), 6) == 0 || _tcsncmp(option, _T("input_"), 6) == 0) { |
| 3681 | read_inputdevice_config (p, option, value); |
| 3682 | return 1; |
| 3683 | } |
| 3684 | |
| 3685 | for (tmpp = option; *tmpp != '\0'; tmpp++) |
| 3686 | if (_istupper (*tmpp)) |
| 3687 | *tmpp = _totlower (*tmpp); |
| 3688 | tmpp = _tcschr (option, '.'); |
| 3689 | if (tmpp) { |
| 3690 | TCHAR *section = option; |
| 3691 | option = tmpp + 1; |
| 3692 | *tmpp = '\0'; |
| 3693 | if (_tcscmp (section, TARGET_NAME) == 0) { |
| 3694 | /* We special case the various path options here. */ |
| 3695 | if (cfgfile_multipath(option, value, _T("rom_path"), &p->path_rom, p) |
| 3696 | || cfgfile_multipath(option, value, _T("floppy_path"), &p->path_floppy, p) |
| 3697 | || cfgfile_multipath(option, value, _T("cd_path"), &p->path_cd, p) |
| 3698 | || cfgfile_multipath(option, value, _T("hardfile_path"), &p->path_hardfile, p)) |
| 3699 | return 1; |
| 3700 | return target_parse_option(p, option, value, CONFIG_TYPE_HOST); |
| 3701 | } |
| 3702 | return 0; |
| 3703 | } |
| 3704 | |
| 3705 | for (i = 0; i < MAX_SPARE_DRIVES; i++) { |
| 3706 | _sntprintf (tmpbuf, sizeof tmpbuf, _T("diskimage%d"), i); |
| 3707 | if (cfgfile_string(option, value, tmpbuf, p->dfxlist[i], sizeof p->dfxlist[i] / sizeof(TCHAR))) { |
| 3708 | return 1; |
| 3709 | } |
| 3710 | } |
| 3711 | |
| 3712 | for (i = 0; i < MAX_TOTAL_SCSI_DEVICES; i++) { |
| 3713 | TCHAR tmp[20]; |
| 3714 | _sntprintf (tmp, sizeof tmp, _T("cdimage%d"), i); |
| 3715 | if (!_tcsicmp (option, tmp)) { |
| 3716 | if (!_tcsicmp (value, _T("autodetect"))) { |
| 3717 | p->cdslots[i].type = SCSI_UNIT_DEFAULT; |
| 3718 | p->cdslots[i].inuse = true; |
| 3719 | p->cdslots[i].name[0] = 0; |
| 3720 | } else { |
| 3721 | p->cdslots[i].delayed = false; |
| 3722 | TCHAR *path = value; |
| 3723 | TCHAR *next = _tcsrchr(value, ','); |
| 3724 | if (value[0] == '\"') { |
| 3725 | const TCHAR *end; |
| 3726 | TCHAR *n = cfgfile_unescape(value, &end, 0, true); |
| 3727 | if (n) { |
| 3728 | path = n; |
| 3729 | next = _tcsrchr(value + (end - value), ','); |
| 3730 | } |
no test coverage detected