Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucsd!ogccse!husc6!endor!siegel From: siegel@endor.harvard.edu (Rich Siegel) Newsgroups: comp.sys.mac.programmer Subject: Re: NewPtrclear,NewhandleClear Message-ID: <2622@husc6.harvard.edu> Date: 15 Sep 89 04:03:53 GMT References: <3444@unix.SRI.COM> Sender: news@husc6.harvard.edu Reply-To: siegel@endor.UUCP (Rich Siegel) Distribution: na Organization: Symantec Language Products Group Lines: 65 In article <3444@unix.SRI.COM> stores@sri-unix.sri.com (Matt Mora) writes: >I'm trying to get Offscreen sample source code from Apple to compile >in LSP and its asking for Newptrclear and NewHandle clear. I think these are >defined in MPW 3.0 but I can't afford to upgrade. Does someone have these >definitions that they can send to me? > >Thanks I wrote these inlines in 1987. (!!) Just change the names of the inlines, and you're in business. FUNTION NewClearPtr (logicalSize : LongInt) : Ptr; INLINE $201F, {move.l (a7)+, d0} $A31E, {_NewPtr, CLEAR} $2E88; {move.l a0, (a7)} {Allocates a zeroed block of memory using _NewPtr, CLEAR} FUNCTION NewSysPtr (logicalSize : LongInt) : Ptr; INLINE $201F, {move.l (a7)+, d0} $A51E, {_NewPtr, SYS} $2E88; {move.l a0, (a7)} {Allocates a block of memory in the system heap} FUNCTION NewSysClearPtr (logicalSize : LongInt) : Ptr; INLINE $201F, {move.l (a7)+, d0} $A71E, {_NewPtr, CLEAR+SYS} $2E88; {move.l a0, (a7)} {Allocates a zeroed block in the system heap} FUNCTION NewClearHandle (logicalSize : LongInt) : Handle; INLINE $201F, {move.l (a7)+, d0} $A322, {_NewHandle, CLEAR} $2E88; {move.l a0, (a7)} {Allocates a zeroed relocatable block} FUNCTION NewSysHandle (logicalSize : LongInt) : Handle; INLINE $201F, {move.l (a7)+, d0} $A522, {_NewHandle, SYS} $2E88; {move.l a0, (a7)} {Allocates a relocatable block in the system heap} FUNCTION NewSysClearHandle (logicalSize : LongInt) : Handle; INLINE $201F, {move.l (a7)+, d0} $A722, {_NewHandle, SYS+CLEAR} $2E88; {move.l a0, (a7)} {Allocates a zeroed relocatable block in the system heap} ~~~~~~~~~~~~~~~ Rich Siegel Staff Software Developer Symantec Corporation, Language Products Group Internet: siegel@endor.harvard.edu UUCP: ..harvard!endor!siegel "There is no personal problem which cannot be solved by sufficient application of high explosives." ~~~~~~~~~~~~~~~