home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / progrmng / mlpmodul.sit / MacLogimoPlus Documentation / DEF3 Files / ToolboxMisc.DEF < prev    next >
Encoding:
Modula Definition  |  1990-06-14  |  2.8 KB  |  54 lines  |  [TEXT/PMED]

  1. DEFINITION MODULE ToolboxMisc;   (* Christoph Fleischer 07.02.85 *)
  2.                                  (* MacIntosh Toolbox General Utilities *)
  3.                                  (* last modification   06.08.85 fxk *)
  4.  
  5. FROM SYSTEM IMPORT ADDRESS;
  6. FROM MacBase IMPORT LongInt,Handle,OsErr,StrPtr;
  7.  
  8. EXPORT QUALIFIED
  9.   StringHandle,Fixed,Int64Bit,
  10.   BitAnd,BitOr,BitXor,BitNot,BitShift,BitTst,BitSet,BitClr,LongMul,FixMul,FixRatio,HiWord,LoWord,FixRound,
  11.   PackBits,UnPackBits,HandToHand,PtrToXHand,PtrToHand,HandAndHand,PtrAndHand,NewString,SetString,
  12.   GetString,Munger;
  13.  
  14. TYPE
  15.   StringHandle = POINTER TO StrPtr;
  16.   Fixed        = LongInt;
  17.   Int64Bit     = RECORD
  18.                    hiLong: LongInt;
  19.                    loLong: LongInt;
  20.                  END;
  21.  
  22. PROCEDURE BitAnd   (long1,long2: LongInt): LongInt;               (*INLINE $A858*)
  23. PROCEDURE BitOr    (long1,long2: LongInt): LongInt;               (*INLINE $A85B*)
  24. PROCEDURE BitXor   (long1,long2: LongInt): LongInt;               (*INLINE $A859*)
  25. PROCEDURE BitNot   (long: LongInt): LongInt;                      (*INLINE $A85A*)
  26. PROCEDURE BitShift (long: LongInt; count: INTEGER): LongInt;      (*INLINE $A85C*)
  27. PROCEDURE BitTst   (bytePtr: ADDRESS; bitNum: LongInt): BOOLEAN;      (*INLINE $A85D*)
  28. PROCEDURE BitSet   (bytePtr: ADDRESS; bitNum: LongInt);               (*INLINE $A85E*)
  29. PROCEDURE BitClr   (bytePtr: ADDRESS; bitNum: LongInt);               (*INLINE $A85F*)
  30. PROCEDURE LongMul  (a,b: LongInt; VAR dst: Int64Bit);             (*INLINE $A867*)
  31. PROCEDURE FixMul   (a,b: Fixed): Fixed;                           (*INLINE $A868*)
  32. PROCEDURE FixRatio (numer,denom: INTEGER): Fixed;                 (*INLINE $A869*)
  33. PROCEDURE HiWord   (x: Fixed): INTEGER;                           (*INLINE $A86A*)
  34. PROCEDURE LoWord   (x: Fixed): INTEGER;                           (*INLINE $A86B*)
  35. PROCEDURE FixRound (x: Fixed): INTEGER;                           (*INLINE $A86C*)
  36. PROCEDURE PackBits (VAR srcPtr,dstPtr: ADDRESS; srcBytes: INTEGER);   (*INLINE $A8CF*)
  37. PROCEDURE UnPackBits(VAR srcPtr,dstPtr: ADDRESS; dstBytes: INTEGER);  (*INLINE $A8D0*)
  38.  
  39. PROCEDURE HandToHand(VAR theHndl: Handle): OsErr;
  40. PROCEDURE PtrToXHand(srcPtr: ADDRESS; dstHndl: Handle; size: LongInt): OsErr;
  41. PROCEDURE PtrToHand(srcPtr: ADDRESS; VAR dstHndl: Handle; size: LongInt): OsErr;
  42. PROCEDURE HandAndHand(hand1,hand2: Handle): OsErr;
  43. PROCEDURE PtrAndHand(ptr1: ADDRESS; hand2: Handle; size: LongInt): OsErr;
  44.  
  45. PROCEDURE NewString(theString:StrPtr): StringHandle;          (*INLINE $A906*)
  46. PROCEDURE SetString(theString:StringHandle;strNew: StrPtr);   (*INLINE $A907*)
  47. PROCEDURE GetString(stringID:  INTEGER): StringHandle;            (*INLINE $A9BA*)
  48.  
  49. PROCEDURE Munger(h: Handle; offset: LongInt;
  50.                  ptr1: ADDRESS; len1: LongInt;
  51.                  ptr2: ADDRESS; len2: LongInt): LongInt;              (*INLINE $A9E0*)
  52.  
  53. END ToolboxMisc.
  54.