diff --git a/src/acpi.c b/src/acpi.c index 02d97ebf8..6932bf1e4 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -1691,7 +1691,7 @@ acpi_reset(void *priv) - Bit 3: 80-conductor cable on secondary IDE channel (active low) - Bit 1: 80-conductor cable on primary IDE channel (active low) */ dev->regs.gpi_val = 0xfff57fc1; - if (!strcmp(machines[machine].internal_name, "ficva503a") || !strcmp(machines[machine].internal_name, "6via90ap")) + if (!strcmp(machine_get_internal_name(machine), "ficva503a") || !strcmp(machine_get_internal_name(machine), "6via90ap")) dev->regs.gpi_val |= 0x00000004; } diff --git a/src/device/isamem.c b/src/device/isamem.c index e26b51035..3ec41103b 100644 --- a/src/device/isamem.c +++ b/src/device/isamem.c @@ -1342,7 +1342,7 @@ isamem_get_name(int board) const char * isamem_get_internal_name(int board) { - return(boards[board].internal_name); + return(boards[board].dev->internal_name); } @@ -1352,8 +1352,8 @@ isamem_get_from_internal_name(const char *s) { int c = 0; - while (boards[c].internal_name != NULL) { - if (! strcmp(boards[c].internal_name, s)) + while (boards[c].dev->internal_name != NULL) { + if (! strcmp(boards[c].dev->internal_name, s)) return(c); c++; } diff --git a/src/device/isartc.c b/src/device/isartc.c index efaaf65f5..c58448cef 100644 --- a/src/device/isartc.c +++ b/src/device/isartc.c @@ -771,7 +771,7 @@ isartc_reset(void) char * isartc_get_internal_name(int board) { - return((char *)boards[board].internal_name); + return((char *)boards[board].dev->internal_name); } @@ -780,8 +780,8 @@ isartc_get_from_internal_name(char *s) { int c = 0; - while (strlen((char *) boards[c].internal_name)) { - if (! strcmp(boards[c].internal_name, s)) + while (strlen((char *) boards[c].dev->internal_name)) { + if (! strcmp(boards[c].dev->internal_name, s)) return(c); c++; } diff --git a/src/device/mouse.c b/src/device/mouse.c index 6720ddabd..c75b82201 100644 --- a/src/device/mouse.c +++ b/src/device/mouse.c @@ -208,7 +208,7 @@ mouse_get_name(int mouse) char * mouse_get_internal_name(int mouse) { - return((char *)mouse_devices[mouse].internal_name); + return((char *)mouse_devices[mouse].device->internal_name); } @@ -217,8 +217,8 @@ mouse_get_from_internal_name(char *s) { int c = 0; - while (mouse_devices[c].internal_name != NULL) { - if (! strcmp((char *)mouse_devices[c].internal_name, s)) + while (mouse_devices[c].device->internal_name != NULL) { + if (! strcmp((char *)mouse_devices[c].device->internal_name, s)) return(c); c++; } diff --git a/src/disk/hdc.c b/src/disk/hdc.c index e5d26309c..0b6c0679c 100644 --- a/src/disk/hdc.c +++ b/src/disk/hdc.c @@ -157,7 +157,7 @@ hdc_reset(void) char * hdc_get_internal_name(int hdc) { - return((char *) controllers[hdc].internal_name); + return((char *) controllers[hdc].device->internal_name); } @@ -166,9 +166,9 @@ hdc_get_from_internal_name(char *s) { int c = 0; - while (strlen((char *) controllers[c].internal_name)) + while (strlen((char *) controllers[c].device->internal_name)) { - if (!strcmp((char *) controllers[c].internal_name, s)) + if (!strcmp((char *) controllers[c].device->internal_name, s)) return c; c++; } diff --git a/src/floppy/fdc.c b/src/floppy/fdc.c index 4860897af..5d87d833b 100644 --- a/src/floppy/fdc.c +++ b/src/floppy/fdc.c @@ -145,7 +145,7 @@ fdc_card_has_config(int card) char * fdc_card_get_internal_name(int card) { - return((char *) fdc_cards[card].internal_name); + return((char *) fdc_cards[card].device->internal_name); } @@ -154,8 +154,8 @@ fdc_card_get_from_internal_name(char *s) { int c = 0; - while (strlen((char *) fdc_cards[c].internal_name)) { - if (!strcmp((char *) fdc_cards[c].internal_name, s)) + while (strlen((char *) fdc_cards[c].device->internal_name)) { + if (!strcmp((char *) fdc_cards[c].device->internal_name, s)) return(c); c++; } diff --git a/src/lpt.c b/src/lpt.c index e2cb6ad5e..c619cf55d 100644 --- a/src/lpt.c +++ b/src/lpt.c @@ -37,7 +37,7 @@ static const struct { char * lpt_device_get_name(int id) { - if (strlen((char *) lpt_devices[id].internal_name) == 0) + if (strlen((char *) lpt_devices[id].device->internal_name) == 0) return NULL; if (!lpt_devices[id].device) return "None"; @@ -48,9 +48,9 @@ lpt_device_get_name(int id) char * lpt_device_get_internal_name(int id) { - if (strlen((char *) lpt_devices[id].internal_name) == 0) + if (strlen((char *) lpt_devices[id].device->internal_name) == 0) return NULL; - return (char *) lpt_devices[id].internal_name; + return (char *) lpt_devices[id].device->internal_name; } @@ -59,8 +59,8 @@ lpt_device_get_from_internal_name(char *s) { int c = 0; - while (strlen((char *) lpt_devices[c].internal_name) != 0) { - if (strcmp(lpt_devices[c].internal_name, s) == 0) + while (strlen((char *) lpt_devices[c].device->internal_name) != 0) { + if (strcmp(lpt_devices[c].device->internal_name, s) == 0) return c; c++; } diff --git a/src/network/network.c b/src/network/network.c index 0e7f16bac..fea6b5c93 100644 --- a/src/network/network.c +++ b/src/network/network.c @@ -649,7 +649,7 @@ network_card_has_config(int card) char * network_card_get_internal_name(int card) { - return((char *)net_cards[card].internal_name); + return((char *)net_cards[card].device->internal_name); } @@ -659,8 +659,8 @@ network_card_get_from_internal_name(char *s) { int c = 0; - while (strlen((char *)net_cards[c].internal_name)) { - if (! strcmp((char *)net_cards[c].internal_name, s)) + while (strlen((char *)net_cards[c].device->internal_name)) { + if (! strcmp((char *)net_cards[c].device->internal_name, s)) return(c); c++; } diff --git a/src/scsi/scsi.c b/src/scsi/scsi.c index d3b0a91e6..22a85f1eb 100644 --- a/src/scsi/scsi.c +++ b/src/scsi/scsi.c @@ -143,7 +143,7 @@ scsi_card_has_config(int card) char * scsi_card_get_internal_name(int card) { - return((char *) scsi_cards[card].internal_name); + return((char *) scsi_cards[card].device->internal_name); } @@ -152,8 +152,8 @@ scsi_card_get_from_internal_name(char *s) { int c = 0; - while (strlen((char *) scsi_cards[c].internal_name)) { - if (!strcmp((char *) scsi_cards[c].internal_name, s)) + while (strlen((char *) scsi_cards[c].device->internal_name)) { + if (!strcmp((char *) scsi_cards[c].device->internal_name, s)) return(c); c++; } diff --git a/src/sound/midi.c b/src/sound/midi.c index b09e75e78..9e0824b25 100644 --- a/src/sound/midi.c +++ b/src/sound/midi.c @@ -123,7 +123,7 @@ midi_device_has_config(int card) char * midi_device_get_internal_name(int card) { - return (char *) devices[card].internal_name; + return (char *) devices[card].device->internal_name; } @@ -132,8 +132,8 @@ midi_device_get_from_internal_name(char *s) { int c = 0; - while (strlen(devices[c].internal_name)) { - if (!strcmp(devices[c].internal_name, s)) + while (strlen(devices[c].device->internal_name)) { + if (!strcmp(devices[c].device->internal_name, s)) return c; c++; } @@ -252,7 +252,7 @@ midi_in_device_has_config(int card) char * midi_in_device_get_internal_name(int card) { - return (char *) midi_in_devices[card].internal_name; + return (char *) midi_in_devices[card].device->internal_name; } @@ -261,8 +261,8 @@ midi_in_device_get_from_internal_name(char *s) { int c = 0; - while (strlen(midi_in_devices[c].internal_name)) { - if (!strcmp(midi_in_devices[c].internal_name, s)) + while (strlen(midi_in_devices[c].device->internal_name)) { + if (!strcmp(midi_in_devices[c].device->internal_name, s)) return c; c++; } diff --git a/src/sound/sound.c b/src/sound/sound.c index 9ba4fb3df..cf62c587a 100644 --- a/src/sound/sound.c +++ b/src/sound/sound.c @@ -166,7 +166,7 @@ sound_card_has_config(int card) char * sound_card_get_internal_name(int card) { - return (char *) sound_cards[card].internal_name; + return (char *) sound_cards[card].device->internal_name; } @@ -175,8 +175,8 @@ sound_card_get_from_internal_name(char *s) { int c = 0; - while (strlen((char *) sound_cards[c].internal_name)) { - if (!strcmp((char *) sound_cards[c].internal_name, s)) + while (strlen((char *) sound_cards[c].device->internal_name)) { + if (!strcmp((char *) sound_cards[c].device->internal_name, s)) return c; c++; } diff --git a/src/video/vid_table.c b/src/video/vid_table.c index 4cccea754..9399f1614 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -341,7 +341,7 @@ video_card_has_config(int card) char * video_get_internal_name(int card) { - return((char *) video_cards[card].internal_name); + return((char *) video_cards[card].device->internal_name); } @@ -350,8 +350,8 @@ video_get_video_from_internal_name(char *s) { int c = 0; - while (strcmp(video_cards[c].internal_name, "") != 0) { - if (!strcmp((char *) video_cards[c].internal_name, s)) + while (strcmp(video_cards[c].device->internal_name, "") != 0) { + if (!strcmp((char *) video_cards[c].device->internal_name, s)) return(c); c++; }