From: Ben Harris Date: Wed, 7 Apr 1999 22:50:11 +0000 (+0000) Subject: various tweaks to make it work with current MPW X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=346137d280e445a2c60e35f3ead76cd36d7024bf;p=PuTTY.git various tweaks to make it work with current MPW [originally from svn r160] --- diff --git a/dnr.c b/dnr.c index 7b334b1f..9cdb44bd 100644 --- a/dnr.c +++ b/dnr.c @@ -48,8 +48,8 @@ #include #endif -#ifndef __GESTALTEQU__ -#include +#ifndef __GESTALT__ +#include #endif #ifndef __FOLDERS__ @@ -99,7 +99,7 @@ static ProcPtr gDNRCodePtr = nil; ** of the trap table by asking if the address of trap $A86E is the same as ** $AA6E. */ -#pragma segment UtilMain +/* #pragma segment UtilMain */ short NumToolboxTraps(void) { if (NGetTrapAddress(_InitGraf, ToolTrap) == NGetTrapAddress(0xAA6E, ToolTrap)) @@ -108,7 +108,7 @@ short NumToolboxTraps(void) return(0x400); } -#pragma segment UtilMain +/* #pragma segment UtilMain */ TrapType GetTrapType(short theTrap) { /* OS traps start with A0, Tool with A8 or AA. */ @@ -263,7 +263,8 @@ OSErr OpenResolver(char *fileName) /* call open resolver */ // RRK modification 1/95 use CallOpenResolverProc define to call UPP - rc = CallOpenResolverProc(gDNRCodePtr, OPENRESOLVER, fileName); + rc = CallOpenResolverProc((OpenResolverUPP)gDNRCodePtr, OPENRESOLVER, + fileName); if (rc != noErr) { /* problem with open resolver, flush it */ @@ -286,7 +287,7 @@ OSErr CloseResolver(void) // RRK modification 1/95 use CallCloseResolverProc define to call UPP // (void) (*dnr)(CLOSERESOLVER); - CallCloseResolverProc(gDNRCodePtr, CLOSERESOLVER); + CallCloseResolverProc((CloseResolverUPP)gDNRCodePtr, CLOSERESOLVER); /* release the DNR resource package */ HUnlock(gDNRCodeHndl); @@ -308,7 +309,7 @@ OSErr StrToAddr(char *hostName, struct hostInfo *rtnStruct, // RRK modification 1/95 use CallStrToAddrProc define to call UPP // return((*dnr)(STRTOADDR, hostName, rtnStruct, resultproc, userDataPtr)); - return (CallStrToAddrProc(gDNRCodePtr, STRTOADDR, hostName, rtnStruct, resultproc, userDataPtr)); + return (CallStrToAddrProc((StrToAddrUPP)gDNRCodePtr, STRTOADDR, hostName, rtnStruct, resultproc, userDataPtr)); } OSErr AddrToStr(unsigned long addr, char *addrStr) @@ -321,7 +322,7 @@ OSErr AddrToStr(unsigned long addr, char *addrStr) // RRK modification 1/95 use CallAddrToStrProc define to call UPP // (*dnr)(ADDRTOSTR, addr, addrStr); - err = CallAddrToStrProc(gDNRCodePtr, ADDRTOSTR, addr, addrStr); + err = CallAddrToStrProc((AddrToStrUPP)gDNRCodePtr, ADDRTOSTR, addr, addrStr); return(noErr); } @@ -335,7 +336,7 @@ OSErr EnumCache(EnumResultUPP resultproc, Ptr userDataPtr) // RRK modification 1/95 use CallEnumCacheProc define to call UPP // return((*dnr)(ENUMCACHE, resultproc, userDataPtr)); - return (CallEnumCacheProc(gDNRCodePtr, ENUMCACHE, resultproc, userDataPtr)); + return (CallEnumCacheProc((EnumCacheUPP)gDNRCodePtr, ENUMCACHE, resultproc, userDataPtr)); } @@ -349,7 +350,7 @@ OSErr AddrToName(unsigned long addr, struct hostInfo *rtnStruct, // RRK modification 1/95 use CallAddrToNameProc define to call UPP // return((*dnr)(ADDRTONAME, addr, rtnStruct, resultproc, userDataPtr)); - return(CallAddrToNameProc(gDNRCodePtr, ADDRTONAME, addr, rtnStruct, resultproc, userDataPtr)); + return(CallAddrToNameProc((AddrToNameUPP)gDNRCodePtr, ADDRTONAME, addr, rtnStruct, resultproc, userDataPtr)); } @@ -363,7 +364,7 @@ extern OSErr HInfo(char *hostName, struct returnRec *returnRecPtr, // RRK modification 1/95 use CallHInfoProc define to call UPP // return((*dnr)(HINFO, hostName, returnRecPtr, resultProc, userDataPtr)); - return(CallHInfoProc(gDNRCodePtr, HXINFO, hostName, returnRecPtr, resultProc, userDataPtr)); + return(CallHInfoProc((HInfoUPP)gDNRCodePtr, HXINFO, hostName, returnRecPtr, resultProc, userDataPtr)); } @@ -377,7 +378,7 @@ extern OSErr MXInfo(char *hostName, struct returnRec *returnRecPtr, // RRK modification 1/95 use CallHInfoProc define to call UPP // return((*dnr)(MXINFO, hostName, returnRecPtr, resultProc, userDataPtr)); - return(CallMXInfoProc(gDNRCodePtr, MXINFO, hostName, returnRecPtr, resultProc, userDataPtr)); + return(CallMXInfoProc((MXInfoUPP)gDNRCodePtr, MXINFO, hostName, returnRecPtr, resultProc, userDataPtr)); } /* removed ; (causes syntax err in Think C 5.0 */ - \ No newline at end of file +