2 * JBP (Jim Peterson <jspeter@birch.ee.vt.edu>): Lots of stubs needed for
16 int CallTo32_LargeStack( int (*func
)(), int nbargs
, ...)
21 va_start(arglist
,nbargs
);
23 for(i
=0; i
<nbargs
; i
++) a
[i
]=va_arg(arglist
,int);
25 switch(nbargs
) /* Ewww... Icky. But what can I do? */
27 case 5: return func(a
[0],a
[1],a
[2],a
[3],a
[4]);
28 case 6: return func(a
[0],a
[1],a
[2],a
[3],a
[4],a
[5]);
29 case 8: return func(a
[0],a
[1],a
[2],a
[3],a
[4],a
[5],a
[6],a
[7]);
30 case 10: return func(a
[0],a
[1],a
[2],a
[3],a
[4],a
[5],a
[6],
32 case 11: return func(a
[0],a
[1],a
[2],a
[3],a
[4],a
[5],a
[6],
33 a
[7],a
[8],a
[9],a
[10]);
34 case 14: return func(a
[0],a
[1],a
[2],a
[3],a
[4],a
[5],a
[6],
35 a
[7],a
[8],a
[9],a
[10],a
[11],a
[12],a
[13]);
36 case 17: return func(a
[0],a
[1],a
[2],a
[3],a
[4],a
[5],a
[6],
37 a
[7],a
[8],a
[9],a
[10],a
[11],a
[12],a
[13],a
[14],a
[15],a
[16]);
38 default: fprintf(stderr
,"JBP: CallTo32_LargeStack called with unsupported "
39 "number of arguments (%d). Ignored.\n",nbargs
);
44 WORD
CallTo16_word_ ( FARPROC16 func
, WORD arg
) { return func(arg
); }
46 extern LRESULT
AboutDlgProc(HWND
,UINT
,WPARAM
,LPARAM
);
47 extern LRESULT
ColorDlgProc(HWND
,UINT
,WPARAM
,LPARAM
);
48 extern LRESULT
ComboBoxWndProc(HWND
,UINT
,WPARAM
,LPARAM
);
49 extern LRESULT
ComboLBoxWndProc(HWND
,UINT
,WPARAM
,LPARAM
);
50 extern LRESULT
EditWndProc(HWND
,UINT
,WPARAM
,LPARAM
);
51 extern LRESULT
FileOpenDlgProc(HWND
,UINT
,WPARAM
,LPARAM
);
52 extern LRESULT
FileSaveDlgProc(HWND
,UINT
,WPARAM
,LPARAM
);
53 extern LRESULT
FindTextDlgProc(HWND
,UINT
,WPARAM
,LPARAM
);
54 extern LRESULT
ListBoxWndProc(HWND
,UINT
,WPARAM
,LPARAM
);
55 extern LRESULT
MDIClientWndProc(HWND
,UINT
,WPARAM
,LPARAM
);
56 extern LRESULT
PopupMenuWndProc(HWND
,UINT
,WPARAM
,LPARAM
);
57 extern LRESULT
PrintDlgProc(HWND
,UINT
,WPARAM
,LPARAM
);
58 extern LRESULT
PrintSetupDlgProc(HWND
,UINT
,WPARAM
,LPARAM
);
59 extern LRESULT
ReplaceTextDlgProc(HWND
,UINT
,WPARAM
,LPARAM
);
60 extern LRESULT
ScrollBarWndProc(HWND
,UINT
,WPARAM
,LPARAM
);
61 extern LRESULT
StaticWndProc(HWND
,UINT
,WPARAM
,LPARAM
);
62 extern LRESULT
SystemMessageBoxProc(HWND
,UINT
,WPARAM
,LPARAM
);
63 extern LRESULT
TASK_Reschedule(void);
65 /***********************************************************************
66 * MODULE_GetWndProcEntry16 (not a Windows API function)
68 * Return an entry point from the WPROCS dll.
70 FARPROC16
MODULE_GetWndProcEntry16( char *name
)
72 #define MAP_STR_TO_PROC(str,proc) if(!strcmp(name,str))return (FARPROC16)proc
73 MAP_STR_TO_PROC("AboutDlgProc",AboutDlgProc
);
74 MAP_STR_TO_PROC("ColorDlgProc",ColorDlgProc
);
75 MAP_STR_TO_PROC("ComboBoxWndProc",ComboBoxWndProc
);
76 MAP_STR_TO_PROC("ComboLBoxWndProc",ComboLBoxWndProc
);
77 MAP_STR_TO_PROC("DefDlgProc",DefDlgProc16
);
78 MAP_STR_TO_PROC("EditWndProc",EditWndProc
);
79 MAP_STR_TO_PROC("FileOpenDlgProc",FileOpenDlgProc
);
80 MAP_STR_TO_PROC("FileSaveDlgProc",FileSaveDlgProc
);
81 MAP_STR_TO_PROC("FindTextDlgProc",FindTextDlgProc
);
82 MAP_STR_TO_PROC("ListBoxWndProc",ListBoxWndProc
);
83 MAP_STR_TO_PROC("MDIClientWndProc",MDIClientWndProc
);
84 MAP_STR_TO_PROC("PopupMenuWndProc",PopupMenuWndProc
);
85 MAP_STR_TO_PROC("PrintDlgProc",PrintDlgProc
);
86 MAP_STR_TO_PROC("PrintSetupDlgProc",PrintSetupDlgProc
);
87 MAP_STR_TO_PROC("ReplaceTextDlgProc",ReplaceTextDlgProc
);
88 MAP_STR_TO_PROC("ScrollBarWndProc",ScrollBarWndProc
);
89 MAP_STR_TO_PROC("StaticWndProc",StaticWndProc
);
90 MAP_STR_TO_PROC("SystemMessageBoxProc",SystemMessageBoxProc
);
91 MAP_STR_TO_PROC("TASK_Reschedule",TASK_Reschedule
);
92 fprintf(stderr
,"warning: No mapping for %s(), add one in library/miscstubs.c\n",name
);
96 void DEBUG_EnterDebugger(void)