stores@unix.SRI.COM (Matt Mora) (09/14/89)
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 -- ___________________________________________________________ Matthew Mora SRI International stores@unix.sri.com ___________________________________________________________
siegel@endor.harvard.edu (Rich Siegel) (09/15/89)
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." ~~~~~~~~~~~~~~~