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

src/mess/mslegacy.c
r6775r6776
4949   "[empty slot]",
5050   "Input Devices",
5151   "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"
6853};
6954
7055
src/mess/device.c
r6775r6776
9191   }
9292   return -1;
9393}
94
95/*************************************
96 *
97 *  Diagnostics
98 *
99 *************************************/
100
101int 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
src/mess/device.h
r6775r6776
2929const char *device_typename(iodevice_t type);
3030const char *device_brieftypename(iodevice_t type);
3131iodevice_t device_typeid(const char *name);
32int device_valididtychecks(void);
3332
3433#endif /* DEVICE_H */
src/mess/mesvalid.c
r6775r6776
9292
9393   /* call other validity checks */
9494   error = mess_validate_natural_keyboard_statics() || error;
95   error = device_valididtychecks() || error;
9695
9796   return error;
9897}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team