Make a dedicated struct for shared library.

For example :

typedef struct {
  /* for nothing */
  UInt16 (*noInput)();

  /* for keyboard */
  UInt16 (*keyboard1)();
  UInt16 (*keyboard2)();
  UInt16 (*keyboard3)();
  UInt16 (*keyboard4)();
  UInt16 (*keyboard5)();

  /* for joypad */
  UInt16 (*joypad1)();
  UInt16 (*joypad2)();
  UInt16 (*joypad3)();
  UInt16 (*joypad4)();

  /* for mouse */
  UInt16 (*mouse1)();
  UInt16 (*mouse2)();

  /* for synaptic link */
  UInt16 (*synaplink)();
}InputFunctions;

SO/DLL handling will be put in the osd_machine