diff --git a/bochs/plugin.cc b/bochs/plugin.cc index 0388e637e..75f9ce63d 100644 --- a/bochs/plugin.cc +++ b/bochs/plugin.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: plugin.cc,v 1.9 2004-01-15 02:08:34 danielg4 Exp $ +// $Id: plugin.cc,v 1.10 2004-01-19 21:43:50 cbothamy Exp $ ///////////////////////////////////////////////////////////////////////// // // This file defines the plugin and plugin-device registration functions and @@ -58,9 +58,9 @@ int (*pluginRegisterDefaultIOReadHandler)(void *thisPtr, ioReadHandler_t callbac int (*pluginRegisterDefaultIOWriteHandler)(void *thisPtr, ioWriteHandler_t callback, const char *name, Bit8u mask) = 0; int (*pluginRegisterTimer)(void *this_ptr, void (*funct)(void *), - Bit32u useconds, bx_bool continuous, - bx_bool active, const char* name) = 0; -void (*pluginActivateTimer)(unsigned id, Bit32u usec, bx_bool continuous) = 0; + Bit32u useconds, bx_bool continuous, +bx_bool active, const char* name) = 0; + void (*pluginActivateTimer)(unsigned id, Bit32u usec, bx_bool continuous) = 0; void (*pluginHRQHackCallback)(void); unsigned pluginHRQ = 0; @@ -234,8 +234,8 @@ builtinRegisterDefaultIOWriteHandler(void *thisPtr, ioWriteHandler_t callback, static int builtinRegisterTimer(void *this_ptr, void (*funct)(void *), - Bit32u useconds, bx_bool continuous, - bx_bool active, const char* name) + Bit32u useconds, bx_bool continuous, + bx_bool active, const char* name) { int id = bx_pc_system.register_timer (this_ptr, funct, useconds, continuous, active, name); pluginlog->ldebug("plugin %s registered timer %d", name, id); @@ -377,10 +377,10 @@ plugin_load (char *name, char *args, plugintype_t type) plugin->name = name; plugin->args = args; plugin->initialized = 0; - - char plugin_filename[BX_PATHNAME_LEN], buf[BX_PATHNAME_LEN]; - sprintf (buf, PLUGIN_FILENAME_FORMAT, name); - sprintf(plugin_filename, "%s%s", PLUGIN_PATH, buf); + + char plugin_filename[BX_PATHNAME_LEN], buf[BX_PATHNAME_LEN]; + sprintf (buf, PLUGIN_FILENAME_FORMAT, name); + sprintf(plugin_filename, "%s%s", PLUGIN_PATH, buf); // Set context so that any devices that the plugin registers will // be able to see which plugin created them. The registration will @@ -397,7 +397,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); @@ -406,7 +406,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 ()); @@ -527,15 +527,15 @@ void pluginRegisterDeviceDevmodel(plugin_t *plugin, plugintype_t type, bx_devmod // Don't add every kind of device to the list. switch (type) { case PLUGTYPE_CORE: - // Core devices are present whether or not we are using plugins, so - // they are managed by the same code in iodev/devices.cc whether - // plugins are on or off. - return; // Do not add core devices to the devices list. + // Core devices are present whether or not we are using plugins, so + // they are managed by the same code in iodev/devices.cc whether + // plugins are on or off. + return; // Do not add core devices to the devices list. case PLUGTYPE_OPTIONAL: case PLUGTYPE_USER: default: - // The plugin system will manage optional and user devices only. - break; + // The plugin system will manage optional and user devices only. + break; } if (!devices) @@ -600,10 +600,10 @@ void bx_init_plugins() if (device->device_init_mem != NULL) { pluginlog->info("init_mem of '%s' plugin device by function pointer",device->name); device->device_init_mem(BX_MEM(0)); - } + } } else { - pluginlog->info("init_mem of '%s' plugin device by virtual method",device->name); - device->devmodel->init_mem (BX_MEM(0)); + pluginlog->info("init_mem of '%s' plugin device by virtual method",device->name); + device->devmodel->init_mem (BX_MEM(0)); } } @@ -613,10 +613,10 @@ void bx_init_plugins() if (device->device_init_dev != NULL) { pluginlog->info("init_dev of '%s' plugin device by function pointer",device->name); device->device_init_dev(); - } + } } else { - pluginlog->info("init_dev of '%s' plugin device by virtual method",device->name); - device->devmodel->init (); + pluginlog->info("init_dev of '%s' plugin device by virtual method",device->name); + device->devmodel->init (); } } } @@ -636,8 +636,8 @@ void bx_reset_plugins(unsigned signal) device->device_reset(signal); } } else { - pluginlog->info("reset of '%s' plugin device by virtual method",device->name); - device->devmodel->reset (signal); + pluginlog->info("reset of '%s' plugin device by virtual method",device->name); + device->devmodel->reset (signal); } } }