- some more cleanup in the plugin code (non-devmodel stuff removed)

This commit is contained in:
Volker Ruppert 2006-01-21 09:28:49 +00:00
parent 88183335e9
commit b1b7b5e70d
2 changed files with 4 additions and 14 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: plugin.cc,v 1.14 2006-01-20 19:12:03 vruppert Exp $
// $Id: plugin.cc,v 1.15 2006-01-21 09:28:49 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// This file defines the plugin and plugin-device registration functions and
@ -390,7 +390,7 @@ plugin_load (char *name, char *args, plugintype_t type)
return;
}
sprintf (buf, PLUGIN_INIT_FMT_STRING, name);
sprintf(buf, PLUGIN_INIT_FMT_STRING, name);
plugin->plugin_init =
(int (*)(struct _plugin_t *, enum plugintype_t, int, char *[])) /* monster typecast */
lt_dlsym (plugin->handle, buf);
@ -399,7 +399,7 @@ plugin_load (char *name, char *args, plugintype_t type)
plugin_abort ();
}
sprintf (buf, PLUGIN_FINI_FMT_STRING, name);
sprintf(buf, PLUGIN_FINI_FMT_STRING, name);
plugin->plugin_fini = (void (*)(void)) lt_dlsym (plugin->handle, buf);
if (plugin->plugin_init == NULL) {
pluginlog->panic("could not find plugin_fini: %s", lt_dlerror ());
@ -507,11 +507,6 @@ void pluginRegisterDeviceDevmodel(plugin_t *plugin, plugintype_t type, bx_devmod
BX_ASSERT (devmodel != NULL);
device->devmodel = devmodel;
device->plugin = plugin; // this can be NULL
device->device_init_mem = NULL; // maybe should use 1 to detect any use?
device->device_init_dev = NULL;
device->device_reset = NULL;
device->device_load_state = NULL;
device->device_save_state = NULL;
device->next = NULL;
// Don't add every kind of device to the list.

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: plugin.h,v 1.47 2006-01-20 19:12:03 vruppert Exp $
// $Id: plugin.h,v 1.48 2006-01-21 09:28:49 vruppert Exp $
/////////////////////////////////////////////////////////////////////////
//
// This file provides macros and types needed for plugins. It is based on
@ -240,11 +240,6 @@ typedef struct _device_t
{
const char *name;
plugin_t *plugin;
void (*device_init_mem)(BX_MEM_C *);
void (*device_init_dev)();
void (*device_reset)(unsigned);
void (*device_load_state)();
void (*device_save_state)();
class bx_devmodel_c *devmodel; // BBD hack