1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-17 21:17:35 +00:00

Address "warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x"

* Update struct DevRec methods to take a "void *" parameter
   since they get called with different xxxInterface records
   depending on whether they are a keyboard, mouse, or display.
   Introduce GenericReturnVoid method implementation for use
   where needed with DevRec methods. (see mouseif.c)

 * Cast functions implementing DevRec methods as appropriate to match
   the method signature.

 * Update struct DspInterfaceRec methods cleardisplay,
   bitblt_to_screen, mouse_invisible, and mouse_visible to declare
   the parameters they require and all return unsigned long results
   (though it's not clear that this is actually the correct type).
   Requires updating dosmouse.c method implementations.

 * Update GenericReturnT and GenericPanic method implementations
   to have the signature required by the method slots they
   are used in.

 * Correct DOS-only section with incorrect arguments to device.exit
   call for the mouse.

 * Use include "dspifdefs.h" for prototypes for GenericReturnXXX method
   implementations.
This commit is contained in:
Nick Briggs
2022-12-20 16:48:59 -08:00
parent 80e40fa942
commit 80c9c796c5
10 changed files with 63 additions and 54 deletions

View File

@@ -21,6 +21,7 @@ MouseInterface currentmouse = &curmouse;
#ifdef DOS
#include <dos.h>
#include "lispemul.h"
#include "dspifdefs.h" /* for GenericReturnVoid */
int nomouseflag = FALSE;
extern DLword *Lisp_world;
@@ -31,7 +32,6 @@ extern void EnterDosMouse(void);
extern void ExitDosMouse(void);
extern void DosMouseAfterRaid(void);
extern void DosMouseBeforeRaid(void);
extern unsigned long GenericReturnT(void);
extern void ThreeButtonHandler(void);
extern void TwoButtonHandler(void);
#endif /* DOS */
@@ -67,10 +67,10 @@ void make_mouse_instance(MouseInterface mouse)
int NumberOfButtons;
if (nomouseflag) {
mouse->device.enter = &GenericReturnT;
mouse->device.exit = &GenericReturnT;
mouse->device.before_raid = &GenericReturnT;
mouse->device.after_raid = &GenericReturnT;
mouse->device.enter = GenericReturnVoid;
mouse->device.exit = GenericReturnVoid;
mouse->device.before_raid = GenericReturnVoid;
mouse->device.after_raid = GenericReturnVoid;
mouse->device.active = FALSE;
NumberOfButtons = 3;
} else {