| Previous | 15994 Revisions | Next |
| r6776 Saturday 26th December, 2009 at 15:44:12 UTC by Miodrag Milanović |
|---|
| Some code cleaning |
| [src/mess] | device.c device.h mesvalid.c mslegacy.c |
| r6775 | r6776 | |
|---|---|---|
| 49 | 49 | "[empty slot]", |
| 50 | 50 | "Input Devices", |
| 51 | 51 | "Quit Fileselector", |
| 52 | "File Specification", /* IMPORTANT: be careful to ensure that the following */ | |
| 53 | "Cartridge", /* device list matches the order found in device.h */ | |
| 54 | "Floppy Disk", /* and is ALWAYS placed after "File Specification" */ | |
| 55 | "Hard Disk", | |
| 56 | "Cylinder", | |
| 57 | "Cassette", | |
| 58 | "Punched Card", | |
| 59 | "Punched Tape", | |
| 60 | "Printer", | |
| 61 | "Serial Port", | |
| 62 | "Parallel Port", | |
| 63 | "Snapshot", | |
| 64 | "Quickload", | |
| 65 | "Memory Card", | |
| 66 | "CD-ROM", | |
| 67 | "Magnetic Tape" | |
| 52 | "File Specification" | |
| 68 | 53 | }; |
| 69 | 54 | |
| 70 | 55 |
| r6775 | r6776 | |
|---|---|---|
| 91 | 91 | } |
| 92 | 92 | return -1; |
| 93 | 93 | } |
| 94 | ||
| 95 | /************************************* | |
| 96 | * | |
| 97 | * Diagnostics | |
| 98 | * | |
| 99 | *************************************/ | |
| 100 | ||
| 101 | int device_valididtychecks(void) | |
| 102 | { | |
| 103 | int error = 0; | |
| 104 | int i; | |
| 105 | ||
| 106 | /* Check the device struct array */ | |
| 107 | for (i = 0; i < ARRAY_LENGTH(device_info_array); i++) | |
| 108 | { | |
| 109 | if (!device_info_array[i].name) | |
| 110 | { | |
| 111 | mame_printf_error("device_info_array[%d].name appears to be NULL\n", i); | |
| 112 | error = 1; | |
| 113 | } | |
| 114 | ||
| 115 | if (!device_info_array[i].shortname) | |
| 116 | { | |
| 117 | mame_printf_error("device_info_array[%d].shortname appears to be NULL\n", i); | |
| 118 | error = 1; | |
| 119 | } | |
| 120 | } | |
| 121 | return error; | |
| 122 | } | |
| 123 |
| r6775 | r6776 | |
|---|---|---|
| 29 | 29 | const char *device_typename(iodevice_t type); |
| 30 | 30 | const char *device_brieftypename(iodevice_t type); |
| 31 | 31 | iodevice_t device_typeid(const char *name); |
| 32 | int device_valididtychecks(void); | |
| 33 | 32 | |
| 34 | 33 | #endif /* DEVICE_H */ |
| r6775 | r6776 | |
|---|---|---|
| 92 | 92 | |
| 93 | 93 | /* call other validity checks */ |
| 94 | 94 | error = mess_validate_natural_keyboard_statics() || error; |
| 95 | error = device_valididtychecks() || error; | |
| 96 | 95 | |
| 97 | 96 | return error; |
| 98 | 97 | } |
| Previous | 15994 Revisions | Next |