mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-28 04:38:00 +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:
@@ -280,7 +280,7 @@ void docopy(int newx, int newy)
|
||||
#endif /* NEWBITBLT */
|
||||
}
|
||||
|
||||
dostaking_mouse_up(int newx, int newy)
|
||||
unsigned long dostaking_mouse_up(int newx, int newy)
|
||||
{
|
||||
/* save hidden bitmap */
|
||||
|
||||
@@ -329,6 +329,7 @@ dostaking_mouse_up(int newx, int newy)
|
||||
|
||||
(currentdsp->bitblt_to_screen)(currentdsp, DisplayRegion68k, currentmouse->Cursor.Last.x,
|
||||
currentmouse->Cursor.Last.y, w, h);
|
||||
return (T);
|
||||
}
|
||||
|
||||
dostaking_mouse_down(DspInterface dsp, IOPAGE *iop)
|
||||
@@ -357,6 +358,7 @@ dostaking_mouse_down(DspInterface dsp, IOPAGE *iop)
|
||||
|
||||
(dsp->bitblt_to_screen)(dsp, DisplayRegion68k, currentmouse->Cursor.Last.x,
|
||||
currentmouse->Cursor.Last.y, w, h);
|
||||
return (T);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
@@ -82,9 +82,10 @@ void make_dsp_instance(DspInterface dsp, char *lispbitmap, int width_hint, int h
|
||||
/* Utility function that just returns T */
|
||||
/* */
|
||||
/*********************************************************************/
|
||||
unsigned long GenericReturnT(void) { return (T); }
|
||||
|
||||
void GenericPanic(DspInterface dsp) {
|
||||
unsigned long GenericReturnT(void *d) { (void)d; return (T); }
|
||||
void GenericReturnVoid(void *d) {(void)d; return; }
|
||||
void GenericPanic(void *d) {
|
||||
(void)d;
|
||||
TPRINT(("Enter GenericPanic\n"));
|
||||
fprintf(stderr, "Panic! Call to uninitialized display slot!");
|
||||
exit(0);
|
||||
|
||||
@@ -229,7 +229,7 @@ void init_keyboard(int flg) /* if 0 init else re-init */
|
||||
|
||||
void device_before_exit(void) {
|
||||
#if DOS
|
||||
(currentmouse->device.exit)(currentmouse, currentdsp);
|
||||
(currentmouse->device.exit)(currentmouse);
|
||||
(currentkbd->device.exit)(currentkbd);
|
||||
#endif /* SUNDISPLAY DOS*/
|
||||
display_before_exit();
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "lispemul.h"
|
||||
#include "dbprint.h"
|
||||
#include "devif.h"
|
||||
#include "dspifdefs.h"
|
||||
|
||||
KbdInterfaceRec curkbd;
|
||||
KbdInterface currentkbd = &curkbd;
|
||||
@@ -23,7 +24,6 @@ KbdInterface currentkbd = &curkbd;
|
||||
extern void Kbd_event(void);
|
||||
extern void EnterDosKbd(void);
|
||||
extern void ExitDosKbd(void);
|
||||
extern unsigned long GenericReturnT(void);
|
||||
#endif /* DOS */
|
||||
|
||||
void make_kbd_instance(KbdInterface kbd) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <graph.h>
|
||||
|
||||
#include "dbprint.h"
|
||||
#include "dspifdefs.h"
|
||||
#include "lispemul.h"
|
||||
#include "devif.h"
|
||||
#include "iopage.h"
|
||||
@@ -68,8 +69,6 @@ extern DLword *DisplayRegion68k_end_addr;
|
||||
extern DspInterface currentdsp;
|
||||
extern void docopy(int newx, int newy);
|
||||
|
||||
extern PFUL GenericReturnT(void);
|
||||
extern void GenericPanic(void);
|
||||
extern unsigned long VGA_not_color(DspInterface dsp);
|
||||
extern void VGA_exit(DspInterface dsp);
|
||||
extern unsigned long Dosbbt1(DspInterface dsp, DLword *buf, DLword left, DLword top, DLword swidth, DLword height);
|
||||
@@ -78,8 +77,8 @@ extern unsigned long Dosbbt3(DspInterface dsp, DLword *buf, DLword left, DLword
|
||||
extern void Dosclearbanks(DspInterface dsp);
|
||||
extern long DOSCursorVisible(DspInterface dsp, IOPAGE *iop);
|
||||
extern long dos_cursor_invisible(DspInterface dsp, IOPAGE *iop);
|
||||
extern int dostaking_mouse_down(DspInterface dsp, IOPAGE *iop);
|
||||
extern int dostaking_mouse_up(int newx, int newy);
|
||||
extern unsigned long dostaking_mouse_down(DspInterface dsp, IOPAGE *iop);
|
||||
extern unsigned long dostaking_mouse_up(int newx, int newy);
|
||||
|
||||
void VESA_Intrpt_Hndlr(void);
|
||||
void *VESA_prev_hndlr; /* addr of previous 0x10 intercept */
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
extern unsigned long Dosbbt1(DspInterface dsp, DLword *buf, DLword left, DLword top, DLword swidth, DLword height);
|
||||
extern unsigned long Dosbbt2(DspInterface dsp, DLword *buf, DLword left, DLword top, DLword swidth, DLword height);
|
||||
extern int dostaking_mouse_down(DspInterface dsp, IOPAGE *iop);
|
||||
extern int dostaking_mouse_up(int newx, int newy);
|
||||
extern unsigned long dostaking_mouse_down(DspInterface dsp, IOPAGE *iop);
|
||||
extern unsigned long dostaking_mouse_up(int newx, int newy);
|
||||
|
||||
extern DLword *DisplayRegion68k;
|
||||
extern DLword *DisplayRegion68k_end_addr;
|
||||
@@ -139,8 +139,8 @@ VGA_init(DspInterface dsp, char *lispbitmap, int width_hint, int height_hint, in
|
||||
dsp->BytesPerLine = 80;
|
||||
dsp->LinesPerBank = 512;
|
||||
|
||||
dsp->mouse_invisible = (PFV)&dostaking_mouse_down;
|
||||
dsp->mouse_visible = (PFV)&dostaking_mouse_up;
|
||||
dsp->mouse_invisible = &dostaking_mouse_down;
|
||||
dsp->mouse_visible = &dostaking_mouse_up;
|
||||
|
||||
dsp->device.locked = FALSE;
|
||||
dsp->device.active = FALSE;
|
||||
|
||||
18
src/xinit.c
18
src/xinit.c
@@ -275,18 +275,20 @@ DspInterface X_init(DspInterface dsp, LispPTR lispbitmap, unsigned width_hint, u
|
||||
/************************************************************/
|
||||
dsp->Display.width = ((dsp->Display.width + 31) >> 5) << 5;
|
||||
|
||||
dsp->device.enter = (PFV)Open_Display;
|
||||
dsp->device.exit = (PFV)lisp_Xexit;
|
||||
/*
|
||||
* Device methods
|
||||
*/
|
||||
dsp->device.enter = (void (*)(void *))Open_Display;
|
||||
dsp->device.exit = (void (*)(void *))lisp_Xexit;
|
||||
dsp->device.before_raid = (void (*)(void *))Xevent_before_raid;
|
||||
dsp->device.after_raid = (void (*)(void *))Xevent_after_raid;
|
||||
|
||||
dsp->bitblt_to_screen = (PFUL)clipping_Xbitblt;
|
||||
|
||||
dsp->device.before_raid = (PFV)Xevent_before_raid;
|
||||
dsp->device.after_raid = (PFV)Xevent_after_raid;
|
||||
dsp->bitblt_to_screen = clipping_Xbitblt;
|
||||
|
||||
dsp->BitGravity = NorthWestGravity;
|
||||
|
||||
dsp->cleardisplay = (PFV)GenericReturnT;
|
||||
dsp->set_color_map_entry = (PFUL)GenericReturnT;
|
||||
dsp->cleardisplay = (unsigned long (*)(DspInterface))GenericReturnT;
|
||||
dsp->set_color_map_entry = GenericReturnT;
|
||||
|
||||
/* Set the geometry of the Visible (Lisp) window. */
|
||||
dsp->Visible.width =
|
||||
|
||||
Reference in New Issue
Block a user