Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!harvard!topaz!uwvax!uwmacc!dubois From: dubois@uwmacc.UUCP (Paul DuBois) Newsgroups: net.micro.mac Subject: Rascal Library fixes Message-ID: <2252@uwmacc.UUCP> Date: Tue, 10-Jun-86 14:33:44 EDT Article-I.D.: uwmacc.2252 Posted: Tue Jun 10 14:33:44 1986 Date-Received: Sat, 14-Jun-86 04:00:58 EDT Distribution: net Organization: UW-Madison Primate Center Lines: 41 Here's some things Rascal programmers might like to fix in their libraries. in uToolIntf: The KeyMap type is defined as Byte[8]. Should be Byte[16]. Guaranteed to crash otherwise. in __DeskLib: The GetResIDBase function has a line that says if !IsDARun then ... Since IsDARun is a function, one wants to test its value, not its address. Replace with if !IsDARun () then ... in __ToolLink: TEFromScrap has a line that says L := GetScrap (TEScrapHandle(), ptrl (" TEXT"+2)^, 0L); That "0L" parameter is supposed to be the address of a long variable, into which an offset is placed. 0L will work, coincidentally, but isn't really correct. It will also mess up techniques such as early detection of nil pointers by placing -1L at address zero (this is used, e.g., in some of the Skels posted to the net a while back). Fix: declare a LongInt variable offset, change above line to: L := GetScrap (TEScrapHandle(), ptrl (" TEXT"+2)^, @offset); -- Paul DuBois UUCP: {allegra,ihnp4,seismo}!uwvax!uwmacc!dubois | ARPA: dubois@easter --+-- | Doth the hawk fly by thy wisdom, and stretch her wings | toward the south? Job 39:26