src/mess/opresolv.c
| r2890 | r2891 | |
| 23 | 23 | |
| 24 | 24 | struct option_resolution_entry |
| 25 | 25 | { |
| 26 | | const struct OptionGuide *guide_entry; |
| 26 | const option_guide *guide_entry; |
| 27 | 27 | enum resolution_entry_state state; |
| 28 | 28 | union |
| 29 | 29 | { |
| r2890 | r2891 | |
| 191 | 191 | |
| 192 | 192 | |
| 193 | 193 | |
| 194 | | static const char *lookup_in_specification(const char *specification, const struct OptionGuide *option) |
| 194 | static const char *lookup_in_specification(const char *specification, const option_guide *option) |
| 195 | 195 | { |
| 196 | 196 | const char *s; |
| 197 | 197 | s = strchr(specification, option->parameter); |
| r2890 | r2891 | |
| 200 | 200 | |
| 201 | 201 | |
| 202 | 202 | |
| 203 | | option_resolution *option_resolution_create(const struct OptionGuide *guide, const char *specification) |
| 203 | option_resolution *option_resolution_create(const option_guide *guide, const char *specification) |
| 204 | 204 | { |
| 205 | 205 | option_resolution *resolution = NULL; |
| 206 | | const struct OptionGuide *guide_entry; |
| 206 | const option_guide *guide_entry; |
| 207 | 207 | int option_count; |
| 208 | 208 | int opt = -1; |
| 209 | 209 | object_pool *pool; |
| r2890 | r2891 | |
| 452 | 452 | |
| 453 | 453 | |
| 454 | 454 | |
| 455 | | const struct OptionGuide *option_resolution_find_option(option_resolution *resolution, int option_char) |
| 455 | const option_guide *option_resolution_find_option(option_resolution *resolution, int option_char) |
| 456 | 456 | { |
| 457 | 457 | const struct option_resolution_entry *entry; |
| 458 | 458 | entry = option_resolution_lookup_entry(resolution, option_char); |
| r2890 | r2891 | |
| 461 | 461 | |
| 462 | 462 | |
| 463 | 463 | |
| 464 | | const struct OptionGuide *option_resolution_index_option(option_resolution *resolution, int indx) |
| 464 | const option_guide *option_resolution_index_option(option_resolution *resolution, int indx) |
| 465 | 465 | { |
| 466 | 466 | if ((indx < 0) || (indx >= resolution->option_count)) |
| 467 | 467 | return NULL; |
| r2890 | r2891 | |
| 470 | 470 | |
| 471 | 471 | |
| 472 | 472 | |
| 473 | | int option_resolution_countoptions(const struct OptionGuide *guide, const char *specification) |
| 473 | int option_resolution_countoptions(const option_guide *guide, const char *specification) |
| 474 | 474 | { |
| 475 | 475 | int option_count = 0; |
| 476 | 476 | |
src/mess/opresolv.h
| r2890 | r2891 | |
| 36 | 36 | |
| 37 | 37 | ****************************************************************************/ |
| 38 | 38 | |
| 39 | | #ifndef RANGEOPT_H |
| 40 | | #define RANGEOPT_H |
| 39 | #ifndef __OPRESOLV_H__ |
| 40 | #define __OPRESOLV_H__ |
| 41 | 41 | |
| 42 | 42 | #include <stdlib.h> |
| 43 | 43 | |
| r2890 | r2891 | |
| 57 | 57 | OPTIONTYPE_ENUM_VALUE |
| 58 | 58 | }; |
| 59 | 59 | |
| 60 | | struct OptionGuide |
| 60 | typedef struct _option_guide option_guide; |
| 61 | struct _option_guide |
| 61 | 62 | { |
| 62 | 63 | enum option_type option_type; |
| 63 | 64 | int parameter; |
| r2890 | r2891 | |
| 65 | 66 | const char *display_name; |
| 66 | 67 | }; |
| 67 | 68 | |
| 68 | | #define OPTION_GUIDE_START(option_guide) \ |
| 69 | | const struct OptionGuide option_guide[] = \ |
| 69 | #define OPTION_GUIDE_START(option_guide_) \ |
| 70 | const option_guide option_guide_[] = \ |
| 70 | 71 | { \ |
| 71 | 72 | |
| 72 | 73 | #define OPTION_GUIDE_END \ |
| 73 | 74 | { OPTIONTYPE_END } \ |
| 74 | 75 | }; \ |
| 75 | 76 | |
| 76 | | #define OPTION_GUIDE_EXTERN(option_guide) \ |
| 77 | | extern const struct OptionGuide option_guide[] \ |
| 77 | #define OPTION_GUIDE_EXTERN(option_guide_) \ |
| 78 | extern const option_guide option_guide_[] \ |
| 78 | 79 | |
| 79 | 80 | #define OPTION_INT(option_char, identifier, display_name) \ |
| 80 | 81 | { OPTIONTYPE_INT, (option_char), (identifier), (display_name) }, \ |
| r2890 | r2891 | |
| 108 | 109 | |
| 109 | 110 | struct OptionResolutionError |
| 110 | 111 | { |
| 111 | | const struct OptionGuide *option; |
| 112 | const option_guide *option; |
| 112 | 113 | optreserr_t error; |
| 113 | 114 | }; |
| 114 | 115 | |
| r2890 | r2891 | |
| 130 | 131 | ***************************************************************************/ |
| 131 | 132 | |
| 132 | 133 | /* processing options with option_resolution objects */ |
| 133 | | option_resolution *option_resolution_create(const struct OptionGuide *guide, const char *specification); |
| 134 | option_resolution *option_resolution_create(const option_guide *guide, const char *specification); |
| 134 | 135 | optreserr_t option_resolution_add_param(option_resolution *resolution, const char *param, const char *value); |
| 135 | 136 | optreserr_t option_resolution_finish(option_resolution *resolution); |
| 136 | 137 | void option_resolution_close(option_resolution *resolution); |
| r2890 | r2891 | |
| 139 | 140 | |
| 140 | 141 | /* option resolution accessors */ |
| 141 | 142 | const char *option_resolution_specification(option_resolution *resolution); |
| 142 | | const struct OptionGuide *option_resolution_find_option(option_resolution *resolution, int option_char); |
| 143 | | const struct OptionGuide *option_resolution_index_option(option_resolution *resolution, int indx); |
| 143 | const option_guide *option_resolution_find_option(option_resolution *resolution, int option_char); |
| 144 | const option_guide *option_resolution_index_option(option_resolution *resolution, int indx); |
| 144 | 145 | |
| 145 | 146 | /* processing option guides */ |
| 146 | | int option_resolution_countoptions(const struct OptionGuide *guide, const char *specification); |
| 147 | int option_resolution_countoptions(const option_guide *guide, const char *specification); |
| 147 | 148 | |
| 148 | 149 | /* processing option specifications */ |
| 149 | 150 | optreserr_t option_resolution_listranges(const char *specification, int option_char, |
| r2890 | r2891 | |
| 155 | 156 | /* misc */ |
| 156 | 157 | const char *option_resolution_error_string(optreserr_t err); |
| 157 | 158 | |
| 158 | | #endif /* RANGEOPT_H */ |
| 159 | #endif /* __OPRESOLV_H__ */ |
| 159 | 160 | |
src/mess/tools/imgtool/library.c
| r2890 | r2891 | |
| 102 | 102 | module->write_block = (imgtoolerr_t (*)(imgtool_image *, const void *, UINT64)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_WRITE_BLOCK); |
| 103 | 103 | module->list_partitions = (imgtoolerr_t (*)(imgtool_image *, imgtool_partition_info *, size_t)) imgtool_get_info_fct(imgclass, IMGTOOLINFO_PTR_LIST_PARTITIONS); |
| 104 | 104 | module->block_size = imgtool_get_info_int(imgclass, IMGTOOLINFO_INT_BLOCK_SIZE); |
| 105 | | module->createimage_optguide = (const struct OptionGuide *) imgtool_get_info_ptr(imgclass, IMGTOOLINFO_PTR_CREATEIMAGE_OPTGUIDE); |
| 105 | module->createimage_optguide = (const option_guide *) imgtool_get_info_ptr(imgclass, IMGTOOLINFO_PTR_CREATEIMAGE_OPTGUIDE); |
| 106 | 106 | module->createimage_optspec = imgtool_library_strdup_allow_null(library, imgtool_get_info_ptr(imgclass, IMGTOOLINFO_STR_CREATEIMAGE_OPTSPEC)); |
| 107 | 107 | module->image_extra_bytes += imgtool_get_info_int(imgclass, IMGTOOLINFO_INT_IMAGE_EXTRA_BYTES); |
| 108 | 108 | } |
src/mess/tools/imgtool/windows/wimgtool.c
| r2890 | r2891 | |
| 1167 | 1167 | int use_suggestion_info; |
| 1168 | 1168 | imgtool_stream *stream = NULL; |
| 1169 | 1169 | filter_getinfoproc filter = NULL; |
| 1170 | | const struct OptionGuide *writefile_optguide; |
| 1170 | const option_guide *writefile_optguide; |
| 1171 | 1171 | const char *writefile_optspec; |
| 1172 | 1172 | |
| 1173 | 1173 | info = get_wimgtool_info(window); |
| r2890 | r2891 | |
| 1197 | 1197 | sizeof(suggestion_info.suggestions) / sizeof(suggestion_info.suggestions[0])); |
| 1198 | 1198 | |
| 1199 | 1199 | /* do we need to show an option dialog? */ |
| 1200 | | writefile_optguide = (const struct OptionGuide *) imgtool_partition_get_info_ptr(info->partition, IMGTOOLINFO_PTR_WRITEFILE_OPTGUIDE); |
| 1200 | writefile_optguide = (const option_guide *) imgtool_partition_get_info_ptr(info->partition, IMGTOOLINFO_PTR_WRITEFILE_OPTGUIDE); |
| 1201 | 1201 | writefile_optspec = imgtool_partition_get_info_string(info->partition, IMGTOOLINFO_STR_WRITEFILE_OPTSPEC); |
| 1202 | 1202 | if (suggestion_info.suggestions[0].viability || (writefile_optguide && writefile_optspec)) |
| 1203 | 1203 | { |
src/mess/tools/imgtool/windows/attrdlg.c
| r2890 | r2891 | |
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | static int create_option_controls(HWND dialog, HFONT font, int margin, int *y, |
| 28 | | struct transfer_suggestion_info *suggestion_info, const struct OptionGuide *guide, const char *optspec) |
| 28 | struct transfer_suggestion_info *suggestion_info, const option_guide *guide, const char *optspec) |
| 29 | 29 | { |
| 30 | 30 | int label_width = 100; |
| 31 | 31 | int control_height = 20; |
| r2890 | r2891 | |
| 216 | 216 | { |
| 217 | 217 | struct new_dialog_info *info; |
| 218 | 218 | int y; |
| 219 | | const struct OptionGuide *guide; |
| 219 | const option_guide *guide; |
| 220 | 220 | LONG_PTR l; |
| 221 | 221 | HWND more_button; |
| 222 | 222 | HWND control, next_control; |
| r2890 | r2891 | |
| 374 | 374 | { |
| 375 | 375 | struct transfer_suggestion_info *suggestion_info; |
| 376 | 376 | option_resolution *resolution; |
| 377 | | const struct OptionGuide *guide; |
| 377 | const option_guide *guide; |
| 378 | 378 | const char *optspec; |
| 379 | 379 | int control_count; |
| 380 | 380 | }; |
| r2890 | r2891 | |
| 437 | 437 | |
| 438 | 438 | |
| 439 | 439 | imgtoolerr_t win_show_option_dialog(HWND parent, struct transfer_suggestion_info *suggestion_info, |
| 440 | | const struct OptionGuide *guide, const char *optspec, |
| 440 | const option_guide *guide, const char *optspec, |
| 441 | 441 | option_resolution **result, BOOL *cancel) |
| 442 | 442 | { |
| 443 | 443 | imgtoolerr_t err = IMGTOOLERR_SUCCESS; |
src/mess/tools/imgtool/imgtool.c
| r2890 | r2891 | |
| 67 | 67 | imgtoolerr_t (*suggest_transfer)(imgtool_partition *partition, const char *path, imgtool_transfer_suggestion *suggestions, size_t suggestions_length); |
| 68 | 68 | imgtoolerr_t (*get_chain) (imgtool_partition *partition, const char *path, imgtool_chainent *chain, size_t chain_size); |
| 69 | 69 | |
| 70 | | const struct OptionGuide *writefile_optguide; |
| 70 | const option_guide *writefile_optguide; |
| 71 | 71 | const char *writefile_optspec; |
| 72 | 72 | }; |
| 73 | 73 | |
| r2890 | r2891 | |
| 744 | 744 | p->get_iconinfo = (imgtoolerr_t (*)(imgtool_partition *, const char *, imgtool_iconinfo *)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_GET_ICON_INFO); |
| 745 | 745 | p->suggest_transfer = (imgtoolerr_t (*)(imgtool_partition *, const char *, imgtool_transfer_suggestion *, size_t)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_SUGGEST_TRANSFER); |
| 746 | 746 | p->get_chain = (imgtoolerr_t (*)(imgtool_partition *, const char *, imgtool_chainent *, size_t)) imgtool_get_info_fct(&imgclass, IMGTOOLINFO_PTR_GET_CHAIN); |
| 747 | | p->writefile_optguide = (const struct OptionGuide *) imgtool_get_info_ptr(&imgclass, IMGTOOLINFO_PTR_WRITEFILE_OPTGUIDE); |
| 747 | p->writefile_optguide = (const option_guide *) imgtool_get_info_ptr(&imgclass, IMGTOOLINFO_PTR_WRITEFILE_OPTGUIDE); |
| 748 | 748 | p->writefile_optspec = pool_strdup_allow_null(p->pool, imgtool_get_info_ptr(&imgclass, IMGTOOLINFO_STR_WRITEFILE_OPTSPEC)); |
| 749 | 749 | |
| 750 | 750 | /* mask out if writing is untested */ |
| r2890 | r2891 | |
| 875 | 875 | int val; |
| 876 | 876 | imgtoolerr_t err = IMGTOOLERR_SUCCESS; |
| 877 | 877 | const imgtool_module *module = NULL; |
| 878 | | const struct OptionGuide *guide_entry; |
| 878 | const option_guide *guide_entry; |
| 879 | 879 | imgtool_module_features features; |
| 880 | 880 | int created_library = FALSE; |
| 881 | 881 | |
src/mess/tools/imgtool/main.c
| r2890 | r2891 | |
| 316 | 316 | char **filename_list; |
| 317 | 317 | int filename_count; |
| 318 | 318 | int partition_index = 0; |
| 319 | | const struct OptionGuide *writefile_optguide; |
| 319 | const option_guide *writefile_optguide; |
| 320 | 320 | const char *writefile_optspec; |
| 321 | 321 | |
| 322 | 322 | module = imgtool_find_module(argv[0]); |
| r2890 | r2891 | |
| 341 | 341 | if (err) |
| 342 | 342 | goto done; |
| 343 | 343 | |
| 344 | | writefile_optguide = (const struct OptionGuide *) imgtool_partition_get_info_ptr(partition, IMGTOOLINFO_PTR_WRITEFILE_OPTGUIDE); |
| 344 | writefile_optguide = (const option_guide *) imgtool_partition_get_info_ptr(partition, IMGTOOLINFO_PTR_WRITEFILE_OPTGUIDE); |
| 345 | 345 | writefile_optspec = imgtool_partition_get_info_ptr(partition, IMGTOOLINFO_STR_WRITEFILE_OPTSPEC); |
| 346 | 346 | |
| 347 | 347 | if (writefile_optguide && writefile_optspec) |
| r2890 | r2891 | |
| 749 | 749 | return 0; |
| 750 | 750 | } |
| 751 | 751 | |
| 752 | | static void listoptions(const struct OptionGuide *opt_guide, const char *opt_spec) |
| 752 | static void listoptions(const option_guide *opt_guide, const char *opt_spec) |
| 753 | 753 | { |
| 754 | 754 | char opt_name[32]; |
| 755 | 755 | const char *opt_desc; |
| r2890 | r2891 | |
| 828 | 828 | static int cmd_listdriveroptions(const struct command *c, int argc, char *argv[]) |
| 829 | 829 | { |
| 830 | 830 | const imgtool_module *mod; |
| 831 | | const struct OptionGuide *opt_guide; |
| 831 | const option_guide *opt_guide; |
| 832 | 832 | const char *opt_spec; |
| 833 | 833 | |
| 834 | 834 | mod = imgtool_find_module(argv[0]); |
| r2890 | r2891 | |
| 838 | 838 | fprintf(stdout, "Driver specific options for module '%s':\n\n", argv[0]); |
| 839 | 839 | |
| 840 | 840 | /* list write options */ |
| 841 | | opt_guide = (const struct OptionGuide *) imgtool_get_info_ptr(&mod->imgclass, IMGTOOLINFO_PTR_WRITEFILE_OPTGUIDE); |
| 841 | opt_guide = (const option_guide *) imgtool_get_info_ptr(&mod->imgclass, IMGTOOLINFO_PTR_WRITEFILE_OPTGUIDE); |
| 842 | 842 | opt_spec = imgtool_get_info_string(&mod->imgclass, IMGTOOLINFO_STR_WRITEFILE_OPTSPEC); |
| 843 | 843 | if (opt_guide) |
| 844 | 844 | { |
src/mess/device.c
| r2890 | r2891 | |
| 35 | 35 | { |
| 36 | 36 | struct IODevice io_device; |
| 37 | 37 | char string_buffer[1024]; |
| 38 | | struct CreateImageOptions createimage_options[MESS_DEVINFO_CREATE_OPTMAX + 1]; |
| 38 | create_image_options createimage_options[MESS_DEVINFO_CREATE_OPTMAX + 1]; |
| 39 | 39 | }; |
| 40 | 40 | |
| 41 | 41 | |
| r2890 | r2891 | |
| 373 | 373 | mess_device->io_device.start = (device_start_func) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_START); |
| 374 | 374 | mess_device->io_device.stop = (device_stop_func) mess_device_get_info_fct(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_STOP); |
| 375 | 375 | |
| 376 | | mess_device->io_device.createimage_optguide = (const struct OptionGuide *) mess_device_get_info_ptr(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_CREATE_OPTGUIDE); |
| 376 | mess_device->io_device.createimage_optguide = (const option_guide *) mess_device_get_info_ptr(&mess_device->io_device.devclass, MESS_DEVINFO_PTR_CREATE_OPTGUIDE); |
| 377 | 377 | |
| 378 | 378 | createimage_optcount = (int) mess_device_get_info_int(&mess_device->io_device.devclass, MESS_DEVINFO_INT_CREATE_OPTCOUNT); |
| 379 | 379 | if (createimage_optcount > 0) |
src/mess/device.h
| r2890 | r2891 | |
| 181 | 181 | * |
| 182 | 182 | *************************************/ |
| 183 | 183 | |
| 184 | | struct CreateImageOptions |
| 184 | typedef struct _create_image_options create_image_options; |
| 185 | struct _create_image_options |
| 185 | 186 | { |
| 186 | 187 | const char *name; |
| 187 | 188 | const char *description; |
| r2890 | r2891 | |
| 215 | 216 | device_stop_func stop; |
| 216 | 217 | |
| 217 | 218 | /* image creation options */ |
| 218 | | const struct OptionGuide *createimage_optguide; |
| 219 | | const struct CreateImageOptions *createimage_options; |
| 219 | const option_guide *createimage_optguide; |
| 220 | const create_image_options *createimage_options; |
| 220 | 221 | }; |
| 221 | 222 | |
| 222 | 223 | /* interoperability with MAME devices */ |
src/mess/osd/windows/menu.c
| r2890 | r2891 | |
| 585 | 585 | int format_combo_val; |
| 586 | 586 | const device_config *dev; |
| 587 | 587 | const struct IODevice *iodev; |
| 588 | | const struct OptionGuide *guide; |
| 588 | const option_guide *guide; |
| 589 | 589 | const char *optspec; |
| 590 | 590 | struct file_dialog_params *params; |
| 591 | 591 | int has_option; |
| r2890 | r2891 | |
| 650 | 650 | struct storeval_optres_params |
| 651 | 651 | { |
| 652 | 652 | struct file_dialog_params *fdparams; |
| 653 | | const struct OptionGuide *guide_entry; |
| 653 | const option_guide *guide_entry; |
| 654 | 654 | }; |
| 655 | 655 | |
| 656 | 656 | static void storeval_option_resolution(void *storeval_param, int val) |
| r2890 | r2891 | |
| 688 | 688 | static dialog_box *build_option_dialog(const device_config *dev, char *filter, size_t filter_len, int *create_format, option_resolution **create_args) |
| 689 | 689 | { |
| 690 | 690 | dialog_box *dialog; |
| 691 | | const struct OptionGuide *guide_entry; |
| 691 | const option_guide *guide_entry; |
| 692 | 692 | int found, i, pos; |
| 693 | 693 | char buf[256]; |
| 694 | 694 | struct file_dialog_params *params; |
src/mess/osd/windows/opcntrl.c
| r2890 | r2891 | |
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | |
| 28 | | static int get_option_count(const struct OptionGuide *guide, |
| 28 | static int get_option_count(const option_guide *guide, |
| 29 | 29 | const char *optspec) |
| 30 | 30 | { |
| 31 | 31 | struct OptionRange ranges[128]; |
| r2890 | r2891 | |
| 41 | 41 | |
| 42 | 42 | |
| 43 | 43 | |
| 44 | | static BOOL prepare_combobox(HWND control, const struct OptionGuide *guide, |
| 44 | static BOOL prepare_combobox(HWND control, const option_guide *guide, |
| 45 | 45 | const char *optspec) |
| 46 | 46 | { |
| 47 | 47 | struct OptionRange ranges[128]; |
| r2890 | r2891 | |
| 136 | 136 | |
| 137 | 137 | |
| 138 | 138 | |
| 139 | | static BOOL prepare_editbox(HWND control, const struct OptionGuide *guide, |
| 139 | static BOOL prepare_editbox(HWND control, const option_guide *guide, |
| 140 | 140 | const char *optspec) |
| 141 | 141 | { |
| 142 | 142 | optreserr_t err = OPTIONRESOLUTION_ERROR_SUCCESS; |
| r2890 | r2891 | |
| 185 | 185 | static BOOL check_editbox(HWND control) |
| 186 | 186 | { |
| 187 | 187 | char buf[256]; |
| 188 | | const struct OptionGuide *guide; |
| 188 | const option_guide *guide; |
| 189 | 189 | const char *optspec; |
| 190 | 190 | optreserr_t err; |
| 191 | 191 | HANDLE h; |
| 192 | 192 | FPTR val; |
| 193 | 193 | |
| 194 | | guide = (const struct OptionGuide *) GetProp(control, guide_prop); |
| 194 | guide = (const option_guide *) GetProp(control, guide_prop); |
| 195 | 195 | optspec = (const char *) GetProp(control, spec_prop); |
| 196 | 196 | |
| 197 | 197 | win_get_window_text_utf8(control, buf, sizeof(buf) / sizeof(buf[0])); |
| r2890 | r2891 | |
| 226 | 226 | |
| 227 | 227 | |
| 228 | 228 | |
| 229 | | BOOL win_prepare_option_control(HWND control, const struct OptionGuide *guide, |
| 229 | BOOL win_prepare_option_control(HWND control, const option_guide *guide, |
| 230 | 230 | const char *optspec) |
| 231 | 231 | { |
| 232 | 232 | BOOL rc = FALSE; |
| r2890 | r2891 | |
| 267 | 267 | |
| 268 | 268 | BOOL win_adjust_option_control(HWND control, int delta) |
| 269 | 269 | { |
| 270 | | const struct OptionGuide *guide; |
| 270 | const option_guide *guide; |
| 271 | 271 | const char *optspec; |
| 272 | 272 | struct OptionRange ranges[128]; |
| 273 | 273 | char buf[64]; |
| 274 | 274 | int val, original_val, i; |
| 275 | 275 | BOOL changed = FALSE; |
| 276 | 276 | |
| 277 | | guide = (const struct OptionGuide *) GetProp(control, guide_prop); |
| 277 | guide = (const option_guide *) GetProp(control, guide_prop); |
| 278 | 278 | optspec = (const char *) GetProp(control, spec_prop); |
| 279 | 279 | |
| 280 | 280 | assert(guide->option_type == OPTIONTYPE_INT); |
| r2890 | r2891 | |
| 316 | 316 | |
| 317 | 317 | optreserr_t win_add_resolution_parameter(HWND control, option_resolution *resolution) |
| 318 | 318 | { |
| 319 | | const struct OptionGuide *guide; |
| 319 | const option_guide *guide; |
| 320 | 320 | char buf[256]; |
| 321 | 321 | optreserr_t err; |
| 322 | 322 | const char *text; |
| r2890 | r2891 | |
| 330 | 330 | } |
| 331 | 331 | text = buf; |
| 332 | 332 | |
| 333 | | guide = (const struct OptionGuide *) GetProp(control, guide_prop); |
| 333 | guide = (const option_guide *) GetProp(control, guide_prop); |
| 334 | 334 | if (!guide) |
| 335 | 335 | { |
| 336 | 336 | err = OPTIONRESOLTUION_ERROR_INTERNAL; |