1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-14 23:46:14 +00:00

Remove typedefs for function pointers and their uses. Methods which are defined but never used get (void) args until they are implemented.

This commit is contained in:
Nick Briggs 2022-12-22 16:55:07 -08:00
parent 4853f0e3f5
commit 2b7228f37e
3 changed files with 40 additions and 47 deletions

View File

@ -11,13 +11,6 @@
/************************************************************************/
#include "lispemul.h" /* for LispPTR, DLword */
typedef void (*PFV)(); /* Pointer to Function returning Void */
typedef int (*PFI)(); /* Pointer to Function returning Int */
typedef char (*PFC)(); /* Pointer to Function returning Char */
typedef float (*PFF)(); /* Pointer to Function returning Float */
typedef int (*PFP)(); /* Pointer to Function returning a Pointer */
typedef unsigned long (*PFUL)(); /* Pointer to Function returning an unsigned long */
#ifdef XWINDOW
#include <X11/Xlib.h>
#endif /* XWINDOW */
@ -113,7 +106,7 @@ typedef struct
short tick; /* Clock for timeout. */
long StartTime; /* The maximum timeout */
long RunTimer; /* Chording timer activate flag. */
PFV NextHandler; /* Pointer to the next timer (used with 2button) */
void (* NextHandler)(void); /* Pointer to the next timer (used with 2button) */
} Button;
@ -132,7 +125,7 @@ typedef struct {
typedef struct
{
DevRec device;
void (* Handler)(); /* Event handler for the mouse. */
void (* Handler)(void); /* Event handler for the mouse. */
MCursor Cursor;
Button Button;
LispPTR *timestamp;
@ -153,7 +146,7 @@ typedef MouseInterfaceRec *MouseInterface;
typedef struct
{
DevRec device;
PFV device_event; /* Event handler for the keyboard. */
void (*device_event)(void); /* Event handler for the keyboard. */
#ifdef DOS
u_char KeyMap[0x80]; /* The key translation table. Use the keycode you
get from the keyboard as an index. The value
@ -162,7 +155,7 @@ typedef struct
unsigned int keyeventsize; /* The sizeof() one kbd event */
unsigned int maxkeyevent; /* Offset to the end of the ringbuffer. */
int eurokbd; /* Keep tabs of the euro-ness of the kbd */
PFV prev_handler; /* The previous keyboard handler.
void (* prev_handler)(void);/* The previous keyboard handler.
Keep this around
to restore when we exit Medley */
int URaid; /* Put this in a better place later.. /jarl */
@ -186,31 +179,31 @@ typedef struct DspInterfaceRec
{
DevRec device;
unsigned long (* drawline)(); /* DRAWLINE
unsigned long (* drawline)(void); /* DRAWLINE
args: dont know yet. Not yet implemented.*/
unsigned long (* cleardisplay)(struct DspInterfaceRec *); /* CLEARDISPLAY, a function
args: self
clears the screen.*/
unsigned long (* get_color_map_entry)();
unsigned long (* set_color_map_entry)();
unsigned long (* available_colors)(); /* How many colors do I have on my palette */
unsigned long (* possible_colors)(); /* How many colors is it possible to select from */
unsigned long (* get_color_map_entry)(void);
unsigned long (* set_color_map_entry)(void *);
unsigned long (* available_colors)(void); /* How many colors do I have on my palette */
unsigned long (* possible_colors)(void); /* How many colors is it possible to select from */
#ifdef NOTYET
unsigned long (* get_color_map)(); /* get a pointer to a colormap */
unsigned long (* set_color_map)(); /* set the current colormap */
unsigned long (* make_color_map)(); /* return a brand new colormap */
unsigned long (* get_color_map)(void); /* get a pointer to a colormap */
unsigned long (* set_color_map)(void); /* set the current colormap */
unsigned long (* make_color_map)(void); /* return a brand new colormap */
#endif /* NOTYET */
unsigned long (* medley_to_native_bm)(); /* 1 bit/pix to native bit/pix */
unsigned long (* native_to_medley_bm)(); /* native bit/pix to 1 bit/pix */
unsigned long (* medley_to_native_bm)(void); /* 1 bit/pix to native bit/pix */
unsigned long (* native_to_medley_bm)(void); /* native bit/pix to 1 bit/pix */
unsigned long (* bitblt_to_screen)(struct DspInterfaceRec *, DLword *, int, int, int, int); /* BITBLT_TO_SCREEN, a function
args: self, buffer left top width height.
biblt's buffer to the screen. */
unsigned long (* bitblt_from_screen)();
unsigned long (* scroll_region)(); /* ie. bbt from screen to screen */
unsigned long (* bitblt_from_screen)(void);
unsigned long (* scroll_region)(void); /* ie. bbt from screen to screen */
unsigned long (* mouse_invisible)(struct DspInterfaceRec *, void *); /* MOUSE_INVISIBLE
args: self (a dsp), iop (an IOPAGE preferably the one and only)
This method makes the mouse invisible on the screen. Note that

View File

@ -49,7 +49,7 @@
#define VESA_OPT_INFO_P(vector) ((((short *)vector)[0] & 2) ? TRUE : FALSE)
#define VESA_COLOR_MODE_P(vector) ((((short *)vector)[0] & 4) ? TRUE : FALSE)
#define VESA_GRAPHICS_MODE_P(vector) ((((short *)vector)[0] & 8) ? TRUE : FALSE)
#define VESA_SWITCH_BANK(vector) ((PFV)(((long *)vector)[3]))
#define VESA_SWITCH_BANK(vector) ((((long *)vector)[3]))
#define VESA_DSP_SEGSIZE(vector) ((long)(0xffff & ((short *)vector)[3]))
#define VESA_DSP_STARTSEG_A(vector) ((long)(0xffff & ((short *)vector)[4]))
#define VESA_DSP_WIDTH(vector) ((long)(((short *)vector)[9]))
@ -81,7 +81,7 @@ 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 */
void (*VESA_prev_hndlr)(void); /* addr of previous 0x10 intercept */
extern int dosdisplaymode;
@ -204,7 +204,7 @@ void VESA_Intrpt_Hndlr(void) {
stk_ptr->edi = MAKE_OFF(inbuffer); /* convert to seg:off form */
stk_ptr->es = MAKE_SEG(inbuffer); /* service requires it in es:di */
((PFV)VESA_prev_hndlr)(); /* call VESA getmode */
(*VESA_prev_hndlr)(); /* call VESA getmode */
} else {
_chain_intr(VESA_prev_hndlr); /* always best to chain to prev int*/
}
@ -439,14 +439,14 @@ void VESA_init(DspInterface dsp, char *lispbitmap, int width_hint, int height_hi
dsp->available_colors = &VGA_not_color;
dsp->possible_colors = &VGA_not_color;
dsp->medley_to_native_bm = (PFUL)&GenericPanic;
dsp->native_to_medley_bm = (PFUL)&GenericPanic;
dsp->medley_to_native_bm = &GenericPanic;
dsp->native_to_medley_bm = &GenericPanic;
dsp->bitblt_from_screen = (PFUL)&GenericPanic;
dsp->scroll_region = (PFUL)&GenericPanic;
dsp->bitblt_from_screen = &GenericPanic;
dsp->scroll_region = &GenericPanic;
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;
TPRINT(("Exit VESA_init\n"));
}

View File

@ -111,27 +111,27 @@ VGA_init(DspInterface dsp, char *lispbitmap, int width_hint, int height_hint, in
{
struct videoconfig vc;
dsp->device.enter = (PFV)&VGA_setmax;
dsp->device.exit = (PFV)&VGA_exit;
dsp->device.enter = &VGA_setmax;
dsp->device.exit = &VGA_exit;
dsp->device.before_raid = (PFV)&VGA_exit;
dsp->device.after_raid = (PFV)&VGA_setmax;
dsp->device.before_raid = &VGA_exit;
dsp->device.after_raid = &VGA_setmax;
dsp->drawline = (PFV)&VGA_mono_drawline;
dsp->drawline = &VGA_mono_drawline;
dsp->cleardisplay = (PFV)&VGA_cleardisplay;
dsp->cleardisplay = &VGA_cleardisplay;
dsp->get_color_map_entry = (PFUL)&VGA_not_color;
dsp->set_color_map_entry = (PFUL)&VGA_not_color;
dsp->available_colors = (PFUL)&VGA_not_color;
dsp->possible_colors = (PFUL)&VGA_not_color;
dsp->get_color_map_entry = &VGA_not_color;
dsp->set_color_map_entry = &VGA_not_color;
dsp->available_colors = &VGA_not_color;
dsp->possible_colors = &VGA_not_color;
dsp->medley_to_native_bm = (PFUL)&GenericPanic;
dsp->native_to_medley_bm = (PFUL)&GenericPanic;
dsp->medley_to_native_bm = &GenericPanic;
dsp->native_to_medley_bm = &GenericPanic;
dsp->bitblt_to_screen = (PFUL)&Dosbbt1;
dsp->bitblt_from_screen = (PFUL)&GenericPanic;
dsp->scroll_region = (PFUL)&GenericPanic;
dsp->bitblt_to_screen = &Dosbbt1;
dsp->bitblt_from_screen = &GenericPanic;
dsp->scroll_region = &GenericPanic;
dsp->DisplayStartAddr = 0xa0000;
dsp->DisplaySegSize = 0x10000; /* 64K segments */