Previous 15994 Revisions Next

r2069 Saturday 22nd March, 2008 at 19:01:22 UTC by Nathan Woods
More machine->devices[] elimination
[src/mess]device.c filemngr.c

src/mess/device.c
r2068r2069
452452/* this function is deprecated */
453453int device_count(iodevice_t type)
454454{
455   const struct IODevice *dev = NULL;
456   if (Machine->devices)
457      dev = device_find(Machine->devices, type);
458   return dev ? dev->count : 0;
455   const struct IODevice *iodev = device_find_from_machine(Machine, type);
456   return (iodev != NULL) ? iodev->count : 0;
459457}
460458
461459
src/mess/filemngr.c
r2068r2069
648648   total = 0;
649649
650650   /* Cycle through all devices for this system */
651   for (dev = Machine->devices; dev->type < IO_COUNT; dev++)
651   for (dev = mess_device_first_from_machine(Machine); dev != NULL; dev = mess_device_next(dev))
652652   {
653653      for (id = 0; id < dev->count; id++)
654654      {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team