Path: utzoo!attcan!utgpu!trigraph!john
From: john@trigraph.uucp (John Chew)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Slot Manager/Active Slots
Message-ID: <1989Aug18.153800.13699@trigraph.uucp>
Date: 18 Aug 89 15:38:00 GMT
References: <18671@princeton.Princeton.EDU> <3610@internal.Apple.COM> <1376@intercon.UUCP>
Sender: john@trigraph.UUCP (John Chew)
Reply-To: poslfit@gpu.UTCS.UToronto.CA (John Chew)
Organization: Trigraph Inc., Toronto, Canada
Lines: 79

In article <1376@intercon.UUCP> Amanda Walker  writes:
>Here's some slightly more interesting code: it will not only tell you what
>slots have cards in them, but what those cards are.  This will compile into
>an MPW tool under MPW C 3.0:
[code deleted]

Here's what you need to add to Amanda's code to get it to compile under
THINK C 3.0:
-----
/* defines from MPW  */
#define sRsrcName 2
#define venderInfo 36
#define vendorID 1
#define serialNum 2
#define revLevel 3
#define partNum 4
#define date 5

/* glue for SGetCString() not found in MacTraps */
pascal OSErr SGetCString(spBlkPtr) 
	SpBlockPtr spBlkPtr;
	{
#define	sGetCString 3
	asm
		{
		move.l	spBlkPtr, A0
		move.l	#sGetCString, D0
		_SlotManager
		return
		}
	}
-----
John

Newsgroups: comp.sys.mac.programmer
Subject: Re: Slot Manager/Active Slots
References: <18671@princeton.Princeton.EDU> <3610@internal.Apple.COM> <1376@intercon.UUCP>
Sender: john@trigraph.UUCP (John Chew)
Reply-To: poslfit@gpu.UTCS.UToronto.CA (John Chew)
Organization: Trigraph Inc., Toronto, Canada

In article <1376@intercon.UUCP> Amanda Walker  writes:
>Here's some slightly more interesting code: it will not only tell you what
>slots have cards in them, but what those cards are.  This will compile into
>an MPW tool under MPW C 3.0:
[code deleted]

Here's what you need to add to Amanda's code to get it to compile under
THINK C 3.0:
-----
/* defines from MPW  */
#define sRsrcName 2
#define venderInfo 36
#define vendorID 1
#define serialNum 2
#define revLevel 3
#define partNum 4
#define date 5

/* glue for SGetCString() not found in MacTraps */
pascal OSErr SGetCString(spBlkPtr) 
	SpBlockPtr spBlkPtr;
	{
#define	sGetCString 3
	asm
		{
		move.l	spBlkPtr, A0
		move.l	#sGetCString, D0
		_SlotManager
		return
		}
	}
-----
John

-- 
john j. chew, iii   		  phone: +1 416 425 3818     AppleLink: CDA0329
trigraph, inc., toronto, canada   {uunet!utai!utcsri,utgpu,utzoo}!trigraph!john
dept. of math., u. of toronto     poslfit@{utorgpu.bitnet,gpu.utcs.utoronto.ca}