diff options
author | obache <obache@pkgsrc.org> | 2011-03-15 11:30:05 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2011-03-15 11:30:05 +0000 |
commit | 88ac6de9ac667ecf34bec794324690543415800c (patch) | |
tree | bb4cb23199cda5fd5f5630d5b448434dcf616ffb /emulators/twin | |
parent | 4d3642f97b40286dc9e2e03d094363093b40c0d9 (diff) | |
download | pkgsrc-88ac6de9ac667ecf34bec794324690543415800c.tar.gz |
* LICENSE=gnu-lgpl-v2
* add user-destdir installation support.
* fixes build failure on recent C compiler.
* disable debugger, it is not buildable.
Bump PKGREVISION.
Diffstat (limited to 'emulators/twin')
-rw-r--r-- | emulators/twin/Makefile | 29 | ||||
-rw-r--r-- | emulators/twin/PLIST | 3 | ||||
-rw-r--r-- | emulators/twin/PLIST.i386 | 4 | ||||
-rw-r--r-- | emulators/twin/distinfo | 5 | ||||
-rw-r--r-- | emulators/twin/patches/patch-windows_GdiDC.h | 16 | ||||
-rw-r--r-- | emulators/twin/patches/patch-windows_MenuAPI.c | 369 | ||||
-rw-r--r-- | emulators/twin/patches/patch-windows_MenuProc.c | 597 |
7 files changed, 1007 insertions, 16 deletions
diff --git a/emulators/twin/Makefile b/emulators/twin/Makefile index c11e497eeab..0e79abbeb96 100644 --- a/emulators/twin/Makefile +++ b/emulators/twin/Makefile @@ -1,33 +1,42 @@ -# $NetBSD: Makefile,v 1.30 2009/08/25 12:32:55 wiz Exp $ +# $NetBSD: Makefile,v 1.31 2011/03/15 11:30:05 obache Exp $ # DISTNAME= twin-src-3.1.14 PKGNAME= twin-3.1.14 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= emulators MASTER_SITES= ftp://ftp.willows.com/pub/twin/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://www.willows.com/ COMMENT= Cross-platform implementation of the Win32 API +LICENSE= gnu-lgpl-v2 + +PKG_DESTDIR_SUPPORT= user-destdir WRKSRC= ${WRKDIR}/twin GNU_CONFIGURE= yes USE_TOOLS+= gmake lex yacc BUILD_TARGET= depend world -CONFIGURE_ARGS+= --enable-debugger +CONFIGURE_ARGS+= --disable-debugger + +MAKE_JOBS_SAFE= no + +INSTALL_MAKE_FLAGS+= prefix=${DESTDIR}${PREFIX} + +INSTALLATION_DIRS+= share/doc/twin +INSTALLATION_DIRS+= include +INSTALLATION_DIRS+= ${PKGMANDIR}/man1 pre-build: ${CP} ${WRKSRC}/windows/Execfreebsd.c ${WRKSRC}/windows/Execnetbsd.c post-install: - ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/twin - ${INSTALL_DATA} ${WRKSRC}/documentation/* ${PREFIX}/share/doc/twin/ - ${INSTALL_DATA} ${WRKSRC}/include/*.h ${PREFIX}/include/ - ${INSTALL_DATA} ${WRKSRC}/include/*.h.in ${PREFIX}/include/ - ${INSTALL_DATA} ${WRKSRC}/documentation/rc.1 ${PREFIX}/${PKGMANDIR}/man1 - ${INSTALL_DATA} ${WRKSRC}/documentation/debugger.1 ${PREFIX}/${PKGMANDIR}/man1 - ${INSTALL_PROGRAM} ${WRKSRC}/tools/rc/rc ${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/documentation/* ${DESTDIR}${PREFIX}/share/doc/twin/ + ${INSTALL_DATA} ${WRKSRC}/include/*.h ${DESTDIR}${PREFIX}/include/ + ${INSTALL_DATA} ${WRKSRC}/include/*.h.in ${DESTDIR}${PREFIX}/include/ + ${INSTALL_DATA} ${WRKSRC}/documentation/rc.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 + ${INSTALL_PROGRAM} ${WRKSRC}/tools/rc/rc ${DESTDIR}${PREFIX}/bin BUILDLINK_DEPMETHOD.libXt?= build diff --git a/emulators/twin/PLIST b/emulators/twin/PLIST index f954692ec8b..a61671710a5 100644 --- a/emulators/twin/PLIST +++ b/emulators/twin/PLIST @@ -1,8 +1,7 @@ -@comment $NetBSD: PLIST,v 1.3 2009/06/14 17:51:08 joerg Exp $ +@comment $NetBSD: PLIST,v 1.4 2011/03/15 11:30:05 obache Exp $ bin/xwin32 bin/rc man/man1/rc.1 -man/man1/debugger.1 lib/libdll.a lib/libcommdlg.so lib/libshell.so diff --git a/emulators/twin/PLIST.i386 b/emulators/twin/PLIST.i386 index 897b3c1be0f..c792c68f214 100644 --- a/emulators/twin/PLIST.i386 +++ b/emulators/twin/PLIST.i386 @@ -1,4 +1,2 @@ -@comment $NetBSD: PLIST.i386,v 1.2 2003/04/21 20:25:45 cjep Exp $ -lib/libreadline.a -lib/libdebug.so +@comment $NetBSD: PLIST.i386,v 1.3 2011/03/15 11:30:05 obache Exp $ lib/libpe32.so diff --git a/emulators/twin/distinfo b/emulators/twin/distinfo index 912eb6890cf..cbb4a93e043 100644 --- a/emulators/twin/distinfo +++ b/emulators/twin/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.7 2008/08/10 06:35:00 obache Exp $ +$NetBSD: distinfo,v 1.8 2011/03/15 11:30:05 obache Exp $ SHA1 (twin-src-3.1.14.tar.gz) = b1652f07adcc2c98948a4458480b2d8436cc893f RMD160 (twin-src-3.1.14.tar.gz) = e4b54f515505176498335387415dc5797b3e63eb @@ -19,3 +19,6 @@ SHA1 (patch-am) = 1df7aa9125830374cb52a02638249473c69af833 SHA1 (patch-an) = 8eb83db7351e146bfb0357dd2f4495a38d28530b SHA1 (patch-ao) = 7c4a48ad57d76238e097bcf9f1b2fe773cf374ff SHA1 (patch-ap) = af23478b138f97261aa173eefcfc1bb5da946cb9 +SHA1 (patch-windows_GdiDC.h) = 6ff43bccb01403eaafc37a9c5081f27201861e8e +SHA1 (patch-windows_MenuAPI.c) = 1bddef20af7e6f2f6845ff1d8a5cb777caea5c45 +SHA1 (patch-windows_MenuProc.c) = 66671520298204906f454936f0e68b8de1afc44d diff --git a/emulators/twin/patches/patch-windows_GdiDC.h b/emulators/twin/patches/patch-windows_GdiDC.h new file mode 100644 index 00000000000..ee7f10f7549 --- /dev/null +++ b/emulators/twin/patches/patch-windows_GdiDC.h @@ -0,0 +1,16 @@ +$NetBSD: patch-windows_GdiDC.h,v 1.1 2011/03/15 11:30:05 obache Exp $ + +* used as static variables in graphics/GdiDC.c and not refered anywhere else. + +--- windows/GdiDC.h.orig 1999-11-16 06:35:55.000000000 +0000 ++++ windows/GdiDC.h +@@ -133,9 +133,6 @@ typedef struct tagDCCACHE + DCINFO *lpDC; + } DCCACHE; + +-extern DCCACHE *TWIN_DCCache; +-extern int TWIN_DCCacheSize; +- + #define GETHDC32 GETDCINFO + #define GETHDC16(h32) (HDC)((h32)->ObjHead.hObj) + diff --git a/emulators/twin/patches/patch-windows_MenuAPI.c b/emulators/twin/patches/patch-windows_MenuAPI.c new file mode 100644 index 00000000000..cf3a52f4796 --- /dev/null +++ b/emulators/twin/patches/patch-windows_MenuAPI.c @@ -0,0 +1,369 @@ +$NetBSD: patch-windows_MenuAPI.c,v 1.1 2011/03/15 11:30:05 obache Exp $ + +* remove needless cast + +--- windows/MenuAPI.c.orig 2001-01-13 08:47:52.000000000 +0000 ++++ windows/MenuAPI.c +@@ -121,7 +121,7 @@ DestroyMenu(HMENU hMenu) + return FALSE; + + bResult = LBoxAPI(hMenu32,LBA_DESTROY,0); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return bResult; + } + +@@ -170,7 +170,7 @@ ModifyMenuEx(HMENU32 hMenu32, UINT uiPos + lFlags = LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mis); + if (lFlags == (LONG)-1) { + if (hMenu32 != hMenu32orig) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return FALSE; + } + } +@@ -227,7 +227,7 @@ ModifyMenuEx(HMENU32 hMenu32, UINT uiPos + mis.lpItemData = lpItem; + rc = (BOOL)LBoxAPI(hMenu32,uiAction,(LPARAM)&mis); + if (hMenu32 != hMenu32orig) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return rc; + } + +@@ -281,7 +281,7 @@ InsertMenu(HMENU hMenu, UINT uiPosition, + bResult = ModifyMenuEx(hMenu32, + uiPosition,uiFlags,uiIDNewItem,lpNewItem, + LBA_INSERTITEM); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + } + APISTR((LF_APIRET,"InsertMenu: returns BOOL %d\n",bResult)); + return bResult; +@@ -320,7 +320,7 @@ InsertMenuItem(HMENU hMenu,UINT ItemID,B + lpmenuinfo->wID, /* id or position*/ + lpmenuinfo->dwTypeData, opcode); + +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + + APISTR((LF_APIRET,"InsertMenuItem: returns BOOL %d\n",rc)); + return rc; +@@ -336,7 +336,7 @@ AppendMenu(HMENU hMenu, UINT uiFlags, UI + if((hMenu32 = GETMENUINFO(hMenu))) { + bResult = ModifyMenuEx(hMenu32,(UINT)-1,uiFlags,uiIDNewItem,lpNewItem, + LBA_APPENDITEM); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + } + APISTR((LF_APIRET,"AppendMenu: returns BOOL %d\n",bResult)); + return bResult; +@@ -354,7 +354,7 @@ ModifyMenu(HMENU hMenu, UINT uiPosition, + bResult = ModifyMenuEx(hMenu32, + uiPosition,uiFlags,uiIDNewItem,lpNewItem, + LBA_MODIFYITEM); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + } + APISTR((LF_APIRET,"ModifyMenu: returns BOOL %d\n",bResult)); + return bResult; +@@ -374,7 +374,7 @@ RemoveMenu(HMENU hMenu, UINT idItem, UIN + bResult = ModifyMenuEx(hMenu32,0,uiFlags, + idItem,NULL,LBA_REMOVEITEM); + } +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + } + return bResult; + } +@@ -393,7 +393,7 @@ DeleteMenu(HMENU hMenu, UINT idItem, UIN + bResult = ModifyMenuEx(hMenu32,0, + uiFlags,idItem,NULL, LBA_DELETEITEM); + } +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + } + return bResult; + } +@@ -452,7 +452,7 @@ ChangeMIFlags(HMENU32 hMenu32, UINT uiIt + lFlags = LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mis); + if (lFlags < 0) { + if (hMenu32 != hMenu32orig) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return -1; + } + } +@@ -470,11 +470,11 @@ ChangeMIFlags(HMENU32 hMenu32, UINT uiIt + mis.wAction = LCA_SET | LCA_FLAGS; + if (LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mis) < 0) { + if (hMenu32 != hMenu32orig) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return -1; + } + if (hMenu32 != hMenu32orig) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return (LOWORD(lFlags) & uiMask); + } + +@@ -489,7 +489,7 @@ EnableMenuItem(HMENU hMenu, UINT uiIDEna + if(hMenu32) { + retcode = (BOOL)ChangeMIFlags(hMenu32, + uiIDEnableItem, uiEnable,MF_DISABLED); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + } + return retcode; + } +@@ -504,7 +504,7 @@ CheckMenuItem(HMENU hMenu, UINT uiIDChec + if(hMenu32) { + rc = (BOOL)ChangeMIFlags(hMenu32, + uiIDCheckItem,uiCheck,MF_CHECKED); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + } + return rc; + } +@@ -519,7 +519,7 @@ HiliteMenuItem(HWND hWnd, HMENU hMenu, U + if(hMenu32) { + bResult = (BOOL)ChangeMIFlags(hMenu32, + uiIDHiliteItem,uiHilite,MF_HILITE); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + } + return bResult; + } +@@ -798,7 +798,7 @@ CalcPopupMenuDimensions(HMENU hMenu, HWN + WinFree((LPSTR)lpItemHeights); + WinFree((LPSTR)lpColumnData); + +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + + return MAKELONG((WORD)nMenuWidth,(WORD)nMenuHeight); + } +@@ -916,7 +916,7 @@ DrawMenuBar(HWND hWnd) + #endif + + ReleaseDC(hWndMenu,hDC); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + } + + WORD +@@ -1044,7 +1044,7 @@ MeasureWindowMenu(HWND hWnd, HWND hWndMe + } + + ReleaseDC(hWndMenu,hDC); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return ((wLine+1)*wItemHeight + 1); + } + +@@ -1174,12 +1174,12 @@ SetMenu(HWND hWnd, HMENU hMenu) + + if (hMenu == SetWindowMenu(hWnd, hMenu)) { + if(hMenu32) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return TRUE; + } + if (!(hWndMenu = GetWindowFrame(hWnd))) { + if(hMenu32) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return FALSE; + } + +@@ -1191,13 +1191,13 @@ SetMenu(HWND hWnd, HMENU hMenu) + lptps = 0; + } + //no free required, hMenu == 0 +- //RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ //RELEASELBOXINFO(hMenu32); + //return TRUE; + } + else if (lptps == NULL) { + lptps = (LPTRACKPOPUPSTRUCT)WinMalloc(sizeof(TRACKPOPUPSTRUCT)); + if (!lptps) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return FALSE; + } + memset((LPSTR)lptps,'\0',sizeof(TRACKPOPUPSTRUCT)); +@@ -1214,7 +1214,7 @@ SetMenu(HWND hWnd, HMENU hMenu) + TWIN_RedrawWindow(hWnd,NULL,0,RDW_FRAME|RDW_INVALIDATE); + + if(hMenu32) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + + return TRUE; + } +@@ -1254,7 +1254,7 @@ GetSubMenu(HMENU hMenu, int nPos) + mis.wAction = LCA_GET | LCA_ITEMID; + uiItemID = (UINT)LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mis); + +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + + if (IsMenu((HMENU)uiItemID)) + return (HMENU)uiItemID; +@@ -1277,7 +1277,7 @@ GetMenuItemCount(HMENU hMenu) + mis.wPosition = (WORD)-1; + nCount = (int)LBoxAPI(hMenu32,LBA_GETDATA,(LPARAM)&mis); + +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return nCount; + } + +@@ -1302,7 +1302,7 @@ GetMenuItemID(HMENU hMenu, int nPos) + mis.wAction = LCA_GET | LCA_ITEMID; + rc = (UINT)LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mis); + +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return rc; + } + +@@ -1325,30 +1325,30 @@ GetMenuString(HMENU hMenu, UINT uiIDItem + lpItemString = (LPSTR)LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mis); + if (((LONG)lpItemString != (LONG)-1) && HIWORD(lpItemString)) { + strncpy(lpString,lpItemString,nMaxCount); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return strlen(lpString); + } + + if (lpItemString == NULL || !HIWORD(lpItemString)) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + + if (uiFlags & MF_BYPOSITION) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + + hMenu32a = TWIN_FindMenuItem(hMenu32,uiIDItem); + if (!hMenu32a) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + hMenu = ((LPOBJHEAD)hMenu32a)->hObj; + if (hMenu32a != hMenu32) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32a); ++ RELEASELBOXINFO(hMenu32a); + +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return GetMenuString(hMenu,uiIDItem,lpString,nMaxCount,uiFlags); + } + +@@ -1370,22 +1370,22 @@ GetMenuItemData(HMENU hMenu, UINT uiItem + lpItemData = (LPSTR)LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mis); + if (lpItemData == (LPSTR)-1) { + if (uiFlags & MF_BYPOSITION) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return lpItemData; + } + hMenu32a = TWIN_FindMenuItem(hMenu32,uiItem); + if (!hMenu32a) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return lpItemData; + } + hMenu = ((LPOBJHEAD)hMenu32a)->hObj; + if (hMenu32a != hMenu32) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32a); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32a); ++ RELEASELBOXINFO(hMenu32); + return GetMenuItemData(hMenu,uiItem,uiFlags); + } + } +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return lpItemData; + } + +@@ -1408,24 +1408,24 @@ GetMenuState(HMENU hMenu, UINT uiID, UIN + + HMENU32 hMenu32orig = hMenu32; + if (uiFlags & MF_BYPOSITION) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return (UINT)-1; + } + + hMenu32 = TWIN_FindMenuItem(hMenu32,uiID); + + if (!hMenu32) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32orig); ++ RELEASELBOXINFO(hMenu32orig); + return (UINT)-1; + } + hMenu = ((LPOBJHEAD)hMenu32)->hObj; + if (hMenu32 != hMenu32orig) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32orig); ++ RELEASELBOXINFO(hMenu32orig); + return GetMenuState(hMenu,uiID,uiFlags); + } +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return (UINT)(lFlags & ~MF_BYPOSITION); + } + +@@ -1449,20 +1449,20 @@ SetMenuItemBitmaps(HMENU hMenu, UINT uiI + lFlags = LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mis); + if (lFlags < 0) { + if (uiFlags & MF_BYPOSITION) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return FALSE; + } + hMenu32 = TWIN_FindMenuItem(hMenu32,uiItem); + if (!hMenu32) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32orig); ++ RELEASELBOXINFO(hMenu32orig); + return FALSE; + } + mis.wAction = LCA_GET|LCA_FLAGS; + lFlags = LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mis); + if (lFlags < 0) { + if (hMenu32 != hMenu32orig) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32orig); ++ RELEASELBOXINFO(hMenu32); ++ RELEASELBOXINFO(hMenu32orig); + return FALSE; + } + mis.wItemFlags = MF_BYPOSITION; +@@ -1472,13 +1472,13 @@ SetMenuItemBitmaps(HMENU hMenu, UINT uiI + mis.wAction = LCA_SET | LCA_BITMAPS; + if (LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mis) < 0) { + if (hMenu32 != hMenu32orig) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32orig); ++ RELEASELBOXINFO(hMenu32); ++ RELEASELBOXINFO(hMenu32orig); + return FALSE; + } + if (hMenu32 != hMenu32orig) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32orig); ++ RELEASELBOXINFO(hMenu32); ++ RELEASELBOXINFO(hMenu32orig); + return TRUE; + } + diff --git a/emulators/twin/patches/patch-windows_MenuProc.c b/emulators/twin/patches/patch-windows_MenuProc.c new file mode 100644 index 00000000000..4c4ec301039 --- /dev/null +++ b/emulators/twin/patches/patch-windows_MenuProc.c @@ -0,0 +1,597 @@ +$NetBSD: patch-windows_MenuProc.c,v 1.1 2011/03/15 11:30:05 obache Exp $ + +* remove needless cast + +--- windows/MenuProc.c.orig 2001-01-12 07:21:49.000000000 +0000 ++++ windows/MenuProc.c +@@ -263,7 +263,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + mnis.wAction = LCA_SELECTION; + wPrevSel = (WORD)LBoxAPI(hMenu32,LBA_GETDATA,(LPARAM)&mnis); + if ((wSel == wPrevSel) || (wSel == (WORD)-1)) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return TRUE; + } + ChangeMBSelection(hWnd,hMenu32,lptps,wPrevSel,wSel); +@@ -279,7 +279,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + GET_WM_MENUSELECT_MPS(wItemID,LOWORD(lFlags),hMenu)); + if (!((lFlags & MF_POPUP) && + !(lFlags & (MF_GRAYED|MF_DISABLED|MF_SEPARATOR)))) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return TRUE; + } + mnis.lpItemData = (LPSTR)&rcRect; +@@ -289,11 +289,11 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + pt.y = rcRect.bottom - 1; + ClientToScreen(hWnd,&pt); + SetRect(&rcRect,pt.x,pt.y,0,0); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return CreatePopup(hWnd,lptps,(HMENU)(UINT)wItemID,wSel,&rcRect,TRUE); + } + else { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + + ClientToScreen(hWnd,&pt); + /*nPopupHit = PopupHitTest(lptps->hPopups,lptps->nPopups,pt);*/ +@@ -331,7 +331,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + (wItemID == GetWindowID(hWndTmp))) { + SendMessage(hWndTmp,LB_SETCURSEL, + (WPARAM)-1,0L); +- RELEASELBOXINFO((LPLISTBOXINFO)hPopupMenu32); ++ RELEASELBOXINFO(hPopupMenu32); + return TRUE; + } + for (n = lptps->nPopups-1; n>nPopupHit; n--) +@@ -343,7 +343,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + } + if (!((lFlags & MF_POPUP) && + !(lFlags & (MF_GRAYED|MF_DISABLED|MF_SEPARATOR)))) { +- RELEASELBOXINFO((LPLISTBOXINFO)hPopupMenu32); ++ RELEASELBOXINFO(hPopupMenu32); + return TRUE; + } + mnis.wAction = LCA_GET|LCA_RECT; +@@ -357,7 +357,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + ClientToScreen(hPopup,&pt); + SetRect(&rcRect,pt.x,pt.y,0,0); + +- RELEASELBOXINFO((LPLISTBOXINFO)hPopupMenu32); ++ RELEASELBOXINFO(hPopupMenu32); + return CreatePopup(hWnd,lptps,(HMENU)(UINT)wItemID, + wSel,&rcRect,TRUE); + } +@@ -408,10 +408,10 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + + if (wPrevSel == (WORD)-1) { + if (wSel == (WORD)-1) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return TRUE; + } else if (!(lptps->uiFlags & LSF_CAPTUREACTIVE)) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return InternalMenuProc(hWnd,uiMsg,wParam,lParam); + } + } +@@ -419,7 +419,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + ChangeMBSelection(hWnd,hMenu32,lptps,wPrevSel,wSel); + if (wSel == (WORD)-1) { + SetWindowWord(hWnd,TP_STATUS,1); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return TRUE; + } + +@@ -449,12 +449,12 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + pt.y = rcRect.bottom - 1; + ClientToScreen(hWnd,&pt); + SetRect(&rcRect,pt.x,pt.y,0,0); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + + return CreatePopup(hWnd,lptps,(HMENU)(UINT)wItemID, + wSel,&rcRect,TRUE); + } +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return TRUE; + } + else { /* if (wSel == wPrevSel) => toggle selection */ +@@ -474,7 +474,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + ChangeMBSelection(hWnd,hMenu32,lptps,wPrevSel,-1); + SetWindowWord(hWnd,TP_STATUS,1); + lptps->uiFlags |= PSF_POPSELKILLED; +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return TRUE; + } + } +@@ -496,7 +496,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + (WORD)-1); + } + SetWindowWord(hWnd,TP_STATUS,1); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return TRUE; + } + +@@ -538,7 +538,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + lptps->hMenu)); + if (!(lFlags & MF_POPUP) || + (lFlags & (MF_GRAYED|MF_DISABLED|MF_SEPARATOR))) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return TRUE; + } + +@@ -551,7 +551,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + (WPARAM)-1,0L); + + lptps->wPopupFlags[nPopupHit] |= PSF_POPSELKILLED; +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return TRUE; + } + +@@ -565,8 +565,8 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + pt.y = rcRect.top; + ClientToScreen(hPopup,&pt); + SetRect(&rcRect,pt.x,pt.y,0,0); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); +- RELEASELBOXINFO((LPLISTBOXINFO)hPopupMenu32); ++ RELEASELBOXINFO(hMenu32); ++ RELEASELBOXINFO(hPopupMenu32); + return CreatePopup(hWnd,lptps,(HMENU)(UINT)wItemID,wSel,&rcRect,TRUE); + } + } +@@ -605,7 +605,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + ChangeMBSelection(hWnd,hMenu32,lptps,wPrevSel,wSel); + if (wSel == (WORD)-1) { + SetWindowWord(hWnd,TP_STATUS,1); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + else { +@@ -613,7 +613,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + ChangeMBSelection(hWnd,hMenu32,lptps,wPrevSel,(WORD)-1); + SetWindowWord(hWnd,TP_STATUS,1); + lptps->uiFlags &= ~PSF_POPSELKILLED; +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + mnis.wPosition = wSel; +@@ -636,13 +636,13 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + PostMessage(lptps->hWndOwner,WM_COMMAND, + GET_WM_COMMAND_MPS(wItemID,0,0)); + SetWindowWord(hWnd,TP_STATUS,1); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + if (!(lFlags & (MF_DISABLED|MF_GRAYED))) + SetPopupMenuSel(lptps->hWndOwner,lptps->hPopups[0],0, + (lFlags & MF_SYSMENU)|MF_MOUSESELECT); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + } +@@ -655,13 +655,13 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + if (!hPopup) { + SetWindowWord(hWnd,TP_STATUS,1); + ChangeMBSelection(hWnd,hMenu32,lptps,wPrevSel,(WORD)-1); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + } + else if (!hPopup) { + if(hMenu32) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + ScreenToClient(hPopup,&ptScreen); +@@ -681,7 +681,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + lptps->hPopups[nPopupHit+1],0, + (lFlags & MF_SYSMENU)|MF_MOUSESELECT); + if(hMenu32) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return TRUE; + } + SendMessage(hPopup,uiMsg,wParam, +@@ -720,11 +720,11 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + GET_WM_COMMAND_MPS(wItemID,0,0)); + SetWindowWord(hWnd,TP_STATUS,1); + } +- RELEASELBOXINFO((LPLISTBOXINFO)hPopupMenu32); ++ RELEASELBOXINFO(hPopupMenu32); + } + } + if(hMenu32) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + + case WM_LBUTTONDBLCLK: +@@ -742,7 +742,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + pt.y = (int)((signed short)HIWORD(lParam)); + GetClientRect(hWnd, &rcRect); + if (!PtInRect(&rcRect,pt)) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + wSel = MenuHitTest(hMenu32,&pt); +@@ -751,20 +751,20 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + mnis.wAction = LCA_GET | LCA_FLAGS; + lFlags = LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mnis); + if (!(lFlags & (MF_POPUP|MF_BITMAP))) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return FALSE; + } + mnis.wAction = LCA_GET|LCA_ITEMID; + mnis.wPosition = wSel; + wItemID = LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mnis); + if (!(hPopupMenu32 = GETMENUINFO(wItemID))) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return FALSE; + } + hPopupMenu32a = TWIN_FindMenuItem(hPopupMenu32,(WORD)SC_CLOSE); + if (hPopupMenu32a) { + if (hPopupMenu32a != hPopupMenu32) +- RELEASELBOXINFO((LPLISTBOXINFO) hPopupMenu32a); ++ RELEASELBOXINFO(hPopupMenu32a); + lptps->uiFlags &= ~LSF_BUTTONDOWN; + ChangeMBSelection(hWnd,hMenu32,lptps,wSel,(WORD)-1); + SetWindowWord(hWnd,TP_STATUS,1); +@@ -774,12 +774,12 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + else + PostMessage(lptps->hWndOwner,WM_COMMAND, + GET_WM_COMMAND_MPS(SC_CLOSE,0,0)); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); +- RELEASELBOXINFO((LPLISTBOXINFO)hPopupMenu32); ++ RELEASELBOXINFO(hMenu32); ++ RELEASELBOXINFO(hPopupMenu32); + return TRUE; + } + else { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return FALSE; + } + } +@@ -791,10 +791,10 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + PostMessage(lptps->hWndOwner,WM_SYSCOMMAND, + (WPARAM)SC_CLOSE,lParam); + SetWindowWord(hWnd,TP_STATUS,1); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return TRUE; + } +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + + case MM_MENUINIT: +@@ -815,7 +815,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + if (lptps->bSystemMenu) + lFlags |= MF_SYSMENU; + if (lFlags < 0) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 1; + } + ChangeMBSelection(hWnd,hMenu32,lptps,(WORD)-1,wSel); +@@ -834,7 +834,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + PostMessage(lptps->hWndOwner,WM_COMMAND, + GET_WM_COMMAND_MPS(wItemID,0,0)); + SetWindowWord(hWnd,TP_STATUS,1); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + mnis.lpItemData = (LPSTR)&rcRect; +@@ -847,7 +847,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + if (CreatePopup(hWnd,lptps,(HMENU)(UINT)wItemID,wSel,&rcRect,TRUE)) + SetPopupMenuSel(lptps->hWndOwner, + lptps->hPopups[0],0,lFlags & MF_SYSMENU); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + + case WM_CHAR: +@@ -866,14 +866,14 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + hPopupMenu = (HMENU)GetWindowID(hPopup); + hPopupMenu32 = GETMENUINFO(hPopupMenu); + if (!hPopupMenu32) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 1; + } +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + hMenu32 = hPopupMenu32; + } + else if (!(lptps->uiFlags & TP_MENUBAR)) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 1; + } + mnis.wAction = LCA_ITEMCOUNT; +@@ -912,7 +912,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + ChangeMBSelection(hWnd,hMenu32,lptps,wPrevSel,wSel); + if (lFlags & (MF_GRAYED|MF_DISABLED)) + return 0; +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + mnis.lpItemData = (LPSTR)&rcRect; + mnis.wAction = LCA_GET|LCA_RECT; + LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mnis); +@@ -941,7 +941,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + } + else { + if (lFlags & (MF_GRAYED|MF_DISABLED)) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + if (lFlags & MF_POPUP) { +@@ -977,7 +977,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + GET_WM_COMMAND_MPS(wItemID,0,0)); + } + } +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + + case WM_KEYDOWN: +@@ -993,7 +993,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + case VK_LEFT: + case VK_RIGHT: + if (!(lptps->uiFlags & TP_MENUBAR)) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + if ((lptps->nPopups > 1) && (wParam == VK_LEFT)) { +@@ -1021,8 +1021,8 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + SendMessage(lptps->hWndOwner,WM_MENUSELECT, + GET_WM_MENUSELECT_MPS(wItemID,LOWORD(lFlags), + hMenu)); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); +- RELEASELBOXINFO((LPLISTBOXINFO)hPopupMenu32); ++ RELEASELBOXINFO(hMenu32); ++ RELEASELBOXINFO(hPopupMenu32); + return 0; + } + if (lptps->nPopups && (wParam == VK_RIGHT)) { +@@ -1060,8 +1060,8 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + SetPopupMenuSel(lptps->hWndOwner, + lptps->hPopups[lptps->nPopups-1], + 0,lFlags & MF_SYSMENU); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); +- RELEASELBOXINFO((LPLISTBOXINFO)hPopupMenu32); ++ RELEASELBOXINFO(hMenu32); ++ RELEASELBOXINFO(hPopupMenu32); + return 0; + } + /* else -- fall through */ +@@ -1070,7 +1070,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + mnis.wAction = LCA_SELECTION; + wPrevSel = (WORD)LBoxAPI(hMenu32,LBA_GETDATA,(LPARAM)&mnis); + if (wPrevSel == (WORD)-1) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + mnis.wAction = LCA_ITEMCOUNT; +@@ -1095,7 +1095,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + GET_WM_MENUSELECT_MPS(wItemID,LOWORD(lFlags),hMenu)); + if (!((lFlags & MF_POPUP) && + !(lFlags & (MF_GRAYED|MF_DISABLED|MF_SEPARATOR)))) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + mnis.lpItemData = (LPSTR)&rcRect; +@@ -1109,19 +1109,19 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + &rcRect,TRUE)) + SetPopupMenuSel(lptps->hWndOwner,lptps->hPopups[0], + 0,lFlags & MF_SYSMENU); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + case VK_RETURN: + mnis.wPosition = (WORD)-1; + mnis.wAction = LCA_GET|LCA_SELECTION; + wPrevSel = (WORD)LBoxAPI(hMenu32,LBA_GETDATA,(LPARAM)&mnis); + if (wPrevSel == (WORD)-1) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + if (lptps->nPopups == 0) { /* item on menubar */ + if (!(lptps->uiFlags & TP_MENUBAR)) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + mnis.wPosition = wPrevSel; +@@ -1131,7 +1131,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + if (lptps->bSystemMenu) + lFlags |= MF_SYSMENU; + if (lFlags & (MF_GRAYED|MF_DISABLED)) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + mnis.wAction = LCA_GET|LCA_ITEMID; +@@ -1171,8 +1171,8 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + hPopupMenu32 = GETMENUINFO(hPopupMenu); + wSel = (WORD)SendMessage(hPopup,LB_GETCURSEL,0,0L); + if (wSel == (WORD)LB_ERR) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); +- RELEASELBOXINFO((LPLISTBOXINFO)hPopupMenu32); ++ RELEASELBOXINFO(hMenu32); ++ RELEASELBOXINFO(hPopupMenu32); + return 0; + } + mnis.wPosition = wSel; +@@ -1202,7 +1202,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + SetPopupMenuSel(lptps->hWndOwner, + lptps->hPopups[lptps->nPopups-1], + 0,lFlags & MF_SYSMENU); +- RELEASELBOXINFO((LPLISTBOXINFO)hPopupMenu32); ++ RELEASELBOXINFO(hPopupMenu32); + } + else { + if (lptps->uiFlags & TP_MENUBAR) +@@ -1220,13 +1220,13 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + } + } + } +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + case VK_UP: + case VK_DOWN: + if (lptps->nPopups == 0) { + if (!(lptps->uiFlags & TP_MENUBAR)) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + mnis.wPosition = (WORD)-1; +@@ -1234,7 +1234,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + wPrevSel = (WORD)LBoxAPI(hMenu32,LBA_GETDATA, + (LPARAM)&mnis); + if (wPrevSel == (WORD)-1) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + mnis.wPosition = wSel; +@@ -1249,7 +1249,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + wItemID = (WORD)LBoxAPI(hPopupMenu32,LBA_MODIFYITEM, + (LPARAM)&mnis); + if (!(lFlags & MF_POPUP)) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + /* FIX_ME hPopupMenu32 as well?? */ + return 0; + } +@@ -1271,8 +1271,8 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + hPopupMenu32 = GETMENUINFO(hPopupMenu); + wPrevSel = (WORD)SendMessage(hPopup,LB_GETCURSEL,0,0L); + if (wPrevSel == (WORD)LB_ERR) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); +- RELEASELBOXINFO((LPLISTBOXINFO)hPopupMenu32); ++ RELEASELBOXINFO(hMenu32); ++ RELEASELBOXINFO(hPopupMenu32); + return 0; + } + mnis.wAction = LCA_ITEMCOUNT; +@@ -1305,9 +1305,9 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + lFlags |= MF_SYSMENU; + SetPopupMenuSel(lptps->hWndOwner,hPopup,wSel, + lFlags & MF_SYSMENU); +- RELEASELBOXINFO((LPLISTBOXINFO)hPopupMenu32); ++ RELEASELBOXINFO(hPopupMenu32); + } +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + case VK_ESCAPE: + if (lptps->nPopups) { +@@ -1332,7 +1332,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + } + SetWindowWord(hWnd,TP_STATUS,1); + } +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + default: + break; +@@ -1356,7 +1356,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + } + hMenu32 = GETMENUINFO((HMENU)wParam); + DrawPopupMenuItem(hMenu32,lptps->hWndOwner,lpdis); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0L; + + case WM_MEASUREITEM: +@@ -1372,12 +1372,12 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + mnis.lpItemData = (LPSTR)&rcRect; + lFlags = LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mnis); + if (lFlags < 0) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return 0; + } + lpmis->itemHeight = rcRect.bottom - rcRect.top; + lpmis->itemWidth = rcRect.right - rcRect.left; +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + } + return 0L; + +@@ -1407,7 +1407,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + mnis.wPosition = wSel; + lFlags = LBoxAPI(hMenu32,LBA_MODIFYITEM,(LPARAM)&mnis); + if (lFlags < 0) { +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + break; + } + mnis.wAction = LCA_GET|LCA_ITEMID; +@@ -1416,7 +1416,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + if (lptps->bSystemMenu) + lFlags |= MF_SYSMENU; + +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + + return SendMessage(lptps->hWndOwner,WM_MENUSELECT, + GET_WM_MENUSELECT_MPS(wItemID,LOWORD(lFlags),wParam)); +@@ -1446,7 +1446,7 @@ MenuBarProc(HWND hWnd, UINT uiMsg, WPARA + wSel = (WORD)LBoxAPI(hMenu32,LBA_GETDATA,(LPARAM)&mnis); + if (wSel != (WORD)-1) + ChangeMBSelection(hWnd,hMenu32,lptps,wSel,(WORD)-1); +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + } + } + SetWindowWord(hWnd,TP_STATUS,1); +@@ -1527,11 +1527,11 @@ CreatePopup (HWND hWndMenu,LPTRACKPOPUPS + GetWindowInstance(hWndMenu), + (LPVOID)hMenu32))) { + if (hMenu32) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + return FALSE; + } + if (hMenu32) +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + lptps->nPopups++; + SetWindowID(lptps->hPopups[n],hPopup); + if (n > 0) +@@ -1888,7 +1888,7 @@ TranslateMenuChar(HWND hWnd, WPARAM wKey + hWndMenu = GetWindowFrame(hWnd); + InternalMenuProc(hWndMenu,MM_MENUINIT,(WPARAM)i,0L); + } +- RELEASELBOXINFO((LPLISTBOXINFO)hMenu32); ++ RELEASELBOXINFO(hMenu32); + } + + static LRESULT |