Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!blkcat!f421.n109.z1.fidonet.org!Steve.Ihde From: Steve.Ihde@f421.n109.z1.fidonet.org (Steve Ihde) Newsgroups: comp.sys.mac.programmer Subject: Re: TrapAvailable Message-ID: <3657.27C748D5@blkcat.fidonet.org> Date: 24 Feb 91 01:47:27 GMT Sender: ufgate@blkcat.fidonet.org (newsout1.26) Organization: FidoNet node 1:109/421 - The Twilight Clone, Paul Heller Lines: 36 In article <29004@cs.yale.edu> tarr-michael@CS.YALE.EDU (michael tarr) writes: mt> When I try to use the call TrapAvailable as per the latest issue of mt> MacUser to find out if Gestalt is around, Think C 4.0.2 complains that mt> "TrapAvailable" is undefined. mt> What am I missing? Well, TrapAvailable() doesn't exist. Here, however, is the souce code for it: Boolean TrapAvailable(short tNumber,TrapType tType) { /* define trap number for old MPW or non-MPW C */ #ifndef _Unimplemented #define _Unimplemented 0xA89F #endif /* Check and see if the trap exists. */ /* On 64K ROM machines, tType will be ignored. */ return( NGetTrapAddress(tNumber, tType) != GetTrapAddress(_Unimplemented) ); } I think that I got the code either from a Tech note or from the Q&A stack. TrapType is an enumerated type of OSTrap and ToolTrap, I believe. -- Steve Ihde, Steve.Ihde@f421.n109.z1.fidonet.org via The Black Cat's Shack's FidoNet<->Usenet Gateway blkcat.fidonet.org and Fidonet 1:109/401