Removed unused argc and argv parameters from plugin init functions.

This commit is contained in:
Volker Ruppert 2017-01-28 09:52:09 +00:00
parent 65dc62883c
commit 458f747b48
43 changed files with 81 additions and 80 deletions

View File

@ -35,7 +35,7 @@ enum plugintype_t {
PLUGTYPE_USER
};
typedef int (CDECL *plugin_init_t)(struct _plugin_t *plugin, plugintype_t type, int argc, char *argv[]);
typedef int (CDECL *plugin_init_t)(struct _plugin_t *plugin, plugintype_t type);
typedef void (CDECL *plugin_fini_t)(void);
typedef struct _plugin_t

View File

@ -528,7 +528,7 @@ virtual void graphics_tile_update_in_place(unsigned x, unsigned y, \
#define IMPLEMENT_GUI_PLUGIN_CODE(gui_name) \
int CDECL lib##gui_name##_LTX_plugin_init(plugin_t *plugin, \
plugintype_t type, int argc, char *argv[]) { \
plugintype_t type) { \
genlog->info("installing %s module as the Bochs GUI", #gui_name); \
theGui = new bx_##gui_name##_gui_c (); \
bx_gui = theGui; \

View File

@ -66,7 +66,7 @@ const Bit8u acpi_sm_iomask[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 2, 0, 0, 0
extern void apic_bus_deliver_smi(void);
int CDECL libacpi_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libacpi_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theACPIController = new bx_acpi_ctrl_c();
bx_devices.pluginACPIController = theACPIController;

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2014 The Bochs Project
// Copyright (C) 2002-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -45,7 +45,7 @@ bx_biosdev_c *theBiosDevice = NULL;
#define bioslog theBiosDevice
logfunctions *vgabioslog;
int CDECL libbiosdev_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libbiosdev_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theBiosDevice = new bx_biosdev_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theBiosDevice, BX_PLUGIN_BIOSDEV);

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2004-2016 The Bochs Project
// Copyright (C) 2004-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -79,7 +79,7 @@ bx_busm_c *theBusMouse = NULL;
#define READ_Y_HIGH (READ_Y | READ_HIGH)
int CDECL libbusmouse_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libbusmouse_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
// Create one instance of the busmouse device object.
theBusMouse = new bx_busm_c();

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2015 The Bochs Project
// Copyright (C) 2002-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -100,7 +100,7 @@ Bit8u bin_to_bcd(Bit8u value, bx_bool is_binary)
return ((value / 10) << 4) | (value % 10);
}
int CDECL libcmos_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libcmos_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
if (type == PLUGTYPE_CORE) {
theCmosDevice = new bx_cmos_c();

View File

@ -5,7 +5,7 @@
// Copyright (c) 2004 Makoto Suzuki (suzu)
// Volker Ruppert (vruppert)
// Robin Kay (komadori)
// Copyright (C) 2004-2015 The Bochs Project
// Copyright (C) 2004-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -224,7 +224,7 @@
static bx_svga_cirrus_c *theSvga = NULL;
int CDECL libsvga_cirrus_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libsvga_cirrus_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
if (type == PLUGTYPE_CORE) {
theSvga = new bx_svga_cirrus_c();

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2014 The Bochs Project
// Copyright (C) 2002-2017 The Bochs Project
// PCI VGA dummy adapter Copyright (C) 2002,2003 Mike Nordell
//
// This library is free software; you can redistribute it and/or
@ -58,7 +58,7 @@
bx_vga_c *theVga = NULL;
int CDECL libvga_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libvga_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
if (type == PLUGTYPE_CORE) {
theVga = new bx_vga_c();

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2012-2014 The Bochs Project
// Copyright (C) 2012-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -130,7 +130,7 @@ Bit32s voodoo_options_save(FILE *fp)
// device plugin entry points
int CDECL libvoodoo_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libvoodoo_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theVoodooDevice = new bx_voodoo_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theVoodooDevice, BX_PLUGIN_VOODOO);

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2015 The Bochs Project
// Copyright (C) 2002-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -37,7 +37,7 @@
bx_dma_c *theDmaDevice = NULL;
int CDECL libdma_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libdma_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
if (type == PLUGTYPE_CORE) {
theDmaDevice = new bx_dma_c ();

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2014 The Bochs Project
// Copyright (C) 2002-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -34,7 +34,7 @@
bx_extfpuirq_c *theExternalFpuIrq = NULL;
int CDECL libextfpuirq_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libextfpuirq_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theExternalFpuIrq = new bx_extfpuirq_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theExternalFpuIrq, BX_PLUGIN_EXTFPUIRQ);

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2015 The Bochs Project
// Copyright (C) 2002-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -104,7 +104,7 @@ static Bit16u drate_in_k[4] = {
};
int CDECL libfloppy_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libfloppy_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
if (type == PLUGTYPE_CORE) {
theFloppyController = new bx_floppy_ctrl_c();

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2003-2014 The Bochs Project
// Copyright (C) 2003-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -57,7 +57,7 @@ UINT STDCALL joyGetPos(UINT, LPJOYINFO);
bx_gameport_c *theGameport = NULL;
int CDECL libgameport_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libgameport_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theGameport = new bx_gameport_c();
bx_devices.pluginGameport = theGameport;

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001-2016 The Bochs Project
// Copyright (C) 2001-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -109,7 +109,7 @@ BX_CPP_INLINE Bit32u read_32bit(const Bit8u* buf)
bx_hard_drive_c *theHardDrive = NULL;
logfunctions *atapilog = NULL;
int CDECL libharddrv_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libharddrv_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theHardDrive = new bx_hard_drive_c();
bx_devices.pluginHardDrive = theHardDrive;

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2015 The Bochs Project
// Copyright (C) 2002-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -59,7 +59,7 @@
bx_hdimage_ctl_c* theHDImageCtl = NULL;
int CDECL libhdimage_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libhdimage_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
if (type == PLUGTYPE_CORE) {
theHDImageCtl = new bx_hdimage_ctl_c;

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2014 The Bochs Project
// Copyright (C) 2002-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -34,7 +34,7 @@
bx_ioapic_c *theIOAPIC = NULL;
int CDECL libioapic_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libioapic_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theIOAPIC = new bx_ioapic_c();
bx_devices.pluginIOAPIC = theIOAPIC;

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001-2014 The Bochs Project
// Copyright (C) 2001-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -35,7 +35,7 @@
bx_iodebug_c *theIODebugDevice = NULL;
int CDECL libiodebug_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libiodebug_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theIODebugDevice = new bx_iodebug_c();
bx_devices.pluginIODebug = theIODebugDevice;

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2015 The Bochs Project
// Copyright (C) 2002-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -56,7 +56,7 @@
bx_keyb_c *theKeyboard = NULL;
int CDECL libkeyboard_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libkeyboard_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
// Create one instance of the keyboard device object.
theKeyboard = new bx_keyb_c();

View File

@ -12,7 +12,7 @@
// Copyright (c) 2007 Dan Aloni
// Copyright (c) 2004 Antony T Curtis
//
// Copyright (C) 2011-2015 The Bochs Project
// Copyright (C) 2011-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -343,7 +343,7 @@ Bit32s e1000_options_save(FILE *fp)
// device plugin entry points
int CDECL libe1000_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libe1000_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theE1000Device = new bx_e1000_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theE1000Device, BX_PLUGIN_E1000);

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001-2015 The Bochs Project
// Copyright (C) 2001-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -132,7 +132,7 @@ Bit32s ne2k_options_save(FILE *fp)
// device plugin entry points
int CDECL libne2k_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libne2k_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theNE2kDevice = new bx_ne2k_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theNE2kDevice, BX_PLUGIN_NE2K);

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001-2014 The Bochs Project
// Copyright (C) 2001-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -45,7 +45,7 @@
bx_netmod_ctl_c* theNetModCtl = NULL;
int CDECL libnetmod_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libnetmod_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
if (type == PLUGTYPE_CORE) {
theNetModCtl = new bx_netmod_ctl_c;

View File

@ -3,7 +3,7 @@
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2003 Fen Systems Ltd. (http://www.fensystems.co.uk/)
// Copyright (C) 2003-2014 The Bochs Project
// Copyright (C) 2003-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -97,7 +97,7 @@ Bit32s pnic_options_save(FILE *fp)
// device plugin entry points
int CDECL libpcipnic_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libpcipnic_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
thePNICDevice = new bx_pcipnic_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, thePNICDevice, BX_PLUGIN_PCIPNIC);

View File

@ -102,7 +102,7 @@ Bit32s parport_options_save(FILE *fp)
// device plugin entry points
int CDECL libparallel_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libparallel_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theParallelDevice = new bx_parallel_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theParallelDevice, BX_PLUGIN_PARALLEL);

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2014 The Bochs Project
// Copyright (C) 2002-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -39,7 +39,7 @@ const char csname[2][20] = {"i430FX TSC", "i440FX PMC"};
bx_pci_bridge_c *thePciBridge = NULL;
int CDECL libpci_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libpci_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
if (type == PLUGTYPE_CORE) {
thePciBridge = new bx_pci_bridge_c();

View File

@ -38,7 +38,7 @@
bx_piix3_c *thePci2IsaBridge = NULL;
int CDECL libpci2isa_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libpci2isa_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
if (type == PLUGTYPE_CORE) {
thePci2IsaBridge = new bx_piix3_c();

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2004-2015 The Bochs Project
// Copyright (C) 2004-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -40,7 +40,7 @@ bx_pci_ide_c *thePciIdeController = NULL;
const Bit8u bmdma_iomask[16] = {1, 0, 1, 0, 4, 0, 0, 0, 1, 0, 1, 0, 4, 0, 0, 0};
int CDECL libpci_ide_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libpci_ide_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
thePciIdeController = new bx_pci_ide_c();
bx_devices.pluginPciIdeController = thePciIdeController;

View File

@ -4,7 +4,8 @@
/*
* PCIDEV: PCI host device mapping
* Copyright (C) 2003 - Frank Cornelis
* Copyright (C) 2003 Frank Cornelis
* Copyright (C) 2003-2017 The Bochs Project
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -114,7 +115,7 @@ Bit32s pcidev_options_save(FILE *fp)
// device plugin entry points
int CDECL libpcidev_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libpcidev_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
thePciDevAdapter = new bx_pcidev_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, thePciDevAdapter, BX_PLUGIN_PCIDEV);

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2014 The Bochs Project
// Copyright (C) 2002-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -31,7 +31,7 @@
bx_pic_c *thePic = NULL;
int CDECL libpic_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libpic_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
if (type == PLUGTYPE_CORE) {
thePic = new bx_pic_c();

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001-2014 The Bochs Project
// Copyright (C) 2001-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -33,7 +33,7 @@
bx_pit_c *thePit = NULL;
int CDECL libpit_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libpit_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
if (type == PLUGTYPE_CORE) {
thePit = new bx_pit_c();

View File

@ -147,7 +147,7 @@ Bit32s serial_options_save(FILE *fp)
// device plugin entry points
int CDECL libserial_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libserial_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theSerialDevice = new bx_serial_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theSerialDevice, BX_PLUGIN_SERIAL);

View File

@ -5,7 +5,7 @@
// ES1370 soundcard support (ported from QEMU)
//
// Copyright (c) 2005 Vassili Karpov (malc)
// Copyright (C) 2011-2015 The Bochs Project
// Copyright (C) 2011-2017 The Bochs Project
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@ -186,7 +186,7 @@ Bit32s es1370_options_save(FILE *fp)
// device plugin entry points
int CDECL libes1370_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libes1370_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theES1370Device = new bx_es1370_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theES1370Device, BX_PLUGIN_ES1370);

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001-2015 The Bochs Project
// Copyright (C) 2001-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -162,7 +162,7 @@ Bit32s sb16_options_save(FILE *fp)
// device plugin entry points
int CDECL libsb16_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libsb16_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theSB16Device = new bx_sb16_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theSB16Device, BX_PLUGIN_SB16);

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2011-2015 The Bochs Project
// Copyright (C) 2011-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -46,7 +46,7 @@
bx_soundmod_ctl_c* theSoundModCtl = NULL;
int CDECL libsoundmod_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libsoundmod_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
if (type == PLUGTYPE_CORE) {
theSoundModCtl = new bx_soundmod_ctl_c;

View File

@ -3,7 +3,7 @@
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2003 David N. Welton <davidw@dedasys.com>.
// Copyright (C) 2003-2015 The Bochs Project
// Copyright (C) 2003-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -120,7 +120,7 @@ Bit32s speaker_options_save(FILE *fp)
// device plugin entry points
int CDECL libspeaker_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libspeaker_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theSpeaker = new bx_speaker_c();
bx_devices.pluginSpeaker = theSpeaker;

View File

@ -31,7 +31,7 @@
bx_unmapped_c *theUnmappedDevice = NULL;
int CDECL libunmapped_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libunmapped_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theUnmappedDevice = new bx_unmapped_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theUnmappedDevice, BX_PLUGIN_UNMAPPED);

View File

@ -6,7 +6,7 @@
//
// Copyright (c) 2005 Fabrice Bellard
// Copyright (C) 2009-2015 Benjamin D Lunt (fys at fysnet net)
// 2009-2016 The Bochs Project
// 2009-2017 The Bochs Project
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@ -47,7 +47,7 @@
bx_usb_devctl_c* theUsbDevCtl = NULL;
int CDECL libusb_common_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libusb_common_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
if (type == PLUGTYPE_CORE) {
theUsbDevCtl = new bx_usb_devctl_c;

View File

@ -4,7 +4,7 @@
//
// Experimental USB EHCI adapter (partly ported from Qemu)
//
// Copyright (C) 2015-2016 The Bochs Project
// Copyright (C) 2015-2017 The Bochs Project
//
// Copyright(c) 2008 Emutex Ltd. (address@hidden)
// Copyright(c) 2011-2012 Red Hat, Inc.
@ -161,7 +161,7 @@ Bit32s usb_ehci_options_save(FILE *fp)
// device plugin entry points
int CDECL libusb_ehci_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libusb_ehci_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theUSB_EHCI = new bx_usb_ehci_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theUSB_EHCI, BX_PLUGIN_USB_EHCI);

View File

@ -3,7 +3,7 @@
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2009-2016 Benjamin D Lunt (fys [at] fysnet [dot] net)
// 2009-2016 The Bochs Project
// 2009-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -107,7 +107,7 @@ Bit32s usb_ohci_options_save(FILE *fp)
// device plugin entry points
int CDECL libusb_ohci_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libusb_ohci_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theUSB_OHCI = new bx_usb_ohci_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theUSB_OHCI, BX_PLUGIN_USB_OHCI);

View File

@ -3,7 +3,7 @@
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2009-2015 Benjamin D Lunt (fys [at] fysnet [dot] net)
// 2009-2016 The Bochs Project
// 2009-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -82,7 +82,7 @@ Bit32s usb_uhci_options_save(FILE *fp)
// device plugin entry points
int CDECL libusb_uhci_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libusb_uhci_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theUSB_UHCI = new bx_usb_uhci_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theUSB_UHCI, BX_PLUGIN_USB_UHCI);

View File

@ -3,7 +3,7 @@
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2010-2016 Benjamin D Lunt (fys [at] fysnet [dot] net)
// 2011-2016 The Bochs Project
// 2011-2017 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -186,7 +186,7 @@ Bit32s usb_xhci_options_save(FILE *fp)
// device plugin entry points
int CDECL libusb_xhci_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
int CDECL libusb_xhci_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
{
theUSB_XHCI = new bx_usb_xhci_c();
BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theUSB_XHCI, BX_PLUGIN_USB_XHCI);

View File

@ -212,7 +212,7 @@ diff ../bochs/user_plugins/testdev.cc ./user_plugins/testdev.cc
+
+// device plugin entry points
+
+int libuser_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
+int libuser_LTX_plugin_init(plugin_t *plugin, plugintype_t type)
+{
+ theTestDevice = new bx_testdev_c();
+ BX_REGISTER_DEVICE_DEVMODEL(plugin, type, theTestDevice, "testdev");

View File

@ -271,7 +271,7 @@ builtinActivateTimer(unsigned id, Bit32u usec, bx_bool continuous)
void plugin_init_one(plugin_t *plugin)
{
/* initialize the plugin */
if (plugin->plugin_init (plugin, plugin->type, 0, NULL))
if (plugin->plugin_init(plugin, plugin->type))
{
pluginlog->info("Plugin initialization failed for %s", plugin->name);
plugin_abort();
@ -870,7 +870,7 @@ int bx_load_opt_plugin(const char *name)
while (strcmp(builtin_opt_plugins[i].name, "NULL")) {
if (!strcmp(name, builtin_opt_plugins[i].name)) {
if (builtin_opt_plugins[i].status == 0) {
builtin_opt_plugins[i].plugin_init(NULL, PLUGTYPE_OPTIONAL, 0, NULL);
builtin_opt_plugins[i].plugin_init(NULL, PLUGTYPE_OPTIONAL);
builtin_opt_plugins[i].status = 1;
}
return 1;

View File

@ -110,7 +110,7 @@ extern "C" {
// When plugins are off, PLUG_load_plugin will call the plugin_init function
// directly.
#define PLUG_load_plugin(name,type) {lib##name##_LTX_plugin_init(NULL,type,0,NULL);}
#define PLUG_load_plugin(name,type) {lib##name##_LTX_plugin_init(NULL,type);}
#define PLUG_load_opt_plugin(name) bx_load_opt_plugin(name)
#define PLUG_unload_plugin(name) {lib##name##_LTX_plugin_fini();}
#define PLUG_unload_opt_plugin(name) bx_unload_opt_plugin(name,1);
@ -358,16 +358,16 @@ int bx_unload_opt_plugin(const char *name, bx_bool devflag);
// every plugin must define these, within the extern"C" block, so that
// a non-mangled function symbol is available in the shared library.
void plugin_fini(void);
int plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[]);
int plugin_init(plugin_t *plugin, plugintype_t type);
// still in extern "C"
#if BX_PLUGINS && defined(_MSC_VER)
#define DECLARE_PLUGIN_INIT_FINI_FOR_MODULE(mod) \
extern "C" __declspec(dllexport) int __cdecl lib##mod##_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[]); \
extern "C" __declspec(dllexport) int __cdecl lib##mod##_LTX_plugin_init(plugin_t *plugin, plugintype_t type); \
extern "C" __declspec(dllexport) void __cdecl lib##mod##_LTX_plugin_fini(void);
#else
#define DECLARE_PLUGIN_INIT_FINI_FOR_MODULE(mod) \
int CDECL lib##mod##_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[]); \
int CDECL lib##mod##_LTX_plugin_init(plugin_t *plugin, plugintype_t type); \
void CDECL lib##mod##_LTX_plugin_fini(void);
#endif