home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 April / macformat-049.iso / mac / Shareware Plus / Developers / Mercutio MDEF v1.3.3 / Sample Codeƒ / MercutioAPI.p < prev    next >
Encoding:
Text File  |  1996-09-25  |  14.9 KB  |  464 lines  |  [TEXT/CWIE]

  1. UNIT MercutioAPI;
  2.  
  3.     {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  4.     {x                                                                         x}
  5.     {x         Developer's Programming Interface for the Mercutio MDEF         x}
  6.     {x            ©1992-1996 Ramon M. Felciano, All Rights Reserved            x}
  7.     {x                                                                         x}
  8.     {x        some original inline assembly courtesy of John Cavallino                            x}
  9.     {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  10.  
  11. INTERFACE
  12. {$ALIGN MAC68K}
  13.     USES
  14.         Types, Memory, QuickDraw, Resources, Events, Menus, ToolUtils, MixedMode;
  15.     CONST
  16.  
  17.         customDefProcSig = 'CUST';
  18.         areYouCustomMsg = ord('*') * 256 + ord('*');
  19.         getVersionMsg = ord('*') * 256 + ord('v');
  20.         getCopyrightMsg = ord('C') * 256 + ord('C');
  21.         setCallbackMsg = ord('*') * 256 + ord('c');
  22.         stripCustomDataMsg = ord('*') * 256 + ord('d');
  23.         setPrefsMsg = ord('*') * 256 + ord('p');
  24.         setKeyGraphicsMsg  = ord('*') * 256 + ord('g');
  25.         setSmallIconIDMsg = ord('*') * 256 + ord('i');
  26.         
  27.         mMenuKeyMsg = ord('S') * 256 + ord('K');        {see if key press is key-equiv for this menu}
  28.         mDrawItemStateMsg = ord('S') * 256 + ord('D');        { draw the specified item in the specifed box }
  29.         mCountItemsMsg = ord('S') * 256 + ord('C');    { return count of items in menu }
  30.  
  31.         cbBasicDataOnlyMsg = 1;
  32.         cbIconOnlyMsg = 2;
  33.         cbGetLongestItemMsg = 3;
  34.  
  35.     TYPE
  36.         flexStyle = PACKED RECORD CASE Boolean OF
  37.             false : ( s : Style );
  38.             true : ( val : SignedByte );
  39.         END;
  40.         
  41.         MenuPrefsHandle = ^MenuPrefsPtr;
  42.         MenuPrefsPtr = ^MenuPrefsRec;
  43.         MenuPrefsRec = PACKED RECORD
  44.                 isDynamicFlag, forceNewGroupFlag, useCallbackFlag, controlKeyFlag, optionKeyFlag, shiftKeyFlag, cmdKeyFlag, unused: flexStyle;
  45.                 requiredModifiers: integer;
  46.                 unused2 : UInt32; { reserved for future use }
  47.                 unused3 : UInt32; { reserved for future use }
  48.             END;
  49.  
  50.     {ItemFlagsRec: additional fields supported by Mercutio MDEFs}
  51.         ItemFlagsPtr = ^ItemFlagsRec;
  52.         ItemFlagsRec = PACKED RECORD
  53.             { high byte }
  54.                 forceNewGroup: boolean;
  55.                 isDynamic: boolean;
  56.                 useCallback: boolean;
  57.                 controlKey: boolean;
  58.                 optionKey: boolean;
  59.                 unused10: boolean;
  60.                 shiftKey: boolean;
  61.                 cmdKey: boolean;
  62.  
  63.             { low byte }
  64.                 isHier: boolean;
  65.                 changedByCallback: boolean;
  66.                 Enabled: boolean;
  67.                 hilited: boolean;
  68.                 iconIsSmall: boolean;
  69.                 hasIcon: boolean;
  70.                 sameAlternateAsLastTime:boolean;
  71.                 dontDisposeIcon: boolean;
  72.             END;
  73.  
  74.     {StdItemData: record structure from the standard menu item structure}
  75.         RichItemData = PACKED RECORD
  76.                 iconID: Byte;        { resource ID of the icon to display (0 if none) }
  77.                 keyEq: char;        { keyboard equivalent (or special control value) }
  78.                 mark: char;        { mark character, (chr(0) if none) }
  79.                 textStyle: flexStyle; { text style of the item }
  80.                 itemID: integer;    { index position within the menu }
  81.                 itemRect: Rect;        { where the item will be drawn }
  82.                 flags: ItemFlagsRec;    { special Mercutio flags }
  83.                 iconType: ResType;    { resource type of the icon (used for disposing of icon data)}
  84.                 hIcon: Handle;        { Handle to the icon data }
  85.                 pString: StringPtr;    { points to itemStr, or to string in MenuHandle }
  86.                 itemStr: Str255;    { used for callback string passing }
  87.                 cbMsg: integer;        { callback message }
  88.             END;
  89.         RichItemPtr = ^RichItemData;
  90.  
  91.     CONST
  92.         uppMercutioCallbackProcInfo = $00000E80; { UPP for Mercutio callback procedure }
  93.  
  94.     TYPE
  95.     {$IFC PROCTYPE }
  96.         MercutioCallbackProcPtr = PROCEDURE (menuID: integer; previousModifiers: integer; VAR itemData: RichItemData);
  97.     {$ELSEC}
  98.         MercutioCallbackProcPtr = ProcPtr;  { PROCEDURE MyGetItemInfo (menuID: integer; previousModifiers: integer; VAR itemData: RichItemData); }
  99.     {$ENDC}
  100.         MercutioCallbackUPP = UniversalProcPtr;
  101.  
  102.  
  103. {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  104. {x}
  105. {x    MDEF_MenuKey is a replacement for the standard toolbox call MenuKey for use with the}
  106. {x    Mercutio MDEF. Given the keypress message and modifiers parameters from a standard event, it }
  107. {x    checks to see if the keypress is a key-equivalent for a particular menuitem. If you are currently}
  108. {x    using custom menus (i.e. menus using a Mercutio MDEF), pass the Handle to one of these menus in}
  109. {x    hMenu. If you are not using custom menus, pass in NIL or another menu, and MDEF_MenuKey will use the}
  110. {x    standard MenuKey function to interpret the keypress.}
  111. {x}
  112. {x    As with MenuKey, MDEF_MenuKey returns the menu ID in high word of the result, and the menu}
  113. {x    item in the low word.}
  114. {x}
  115. {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  116.  
  117.     FUNCTION MDEF_MenuKey (theMessage: longint; theModifiers: integer; hMenu: MenuHandle): longint;
  118.  
  119.  
  120. {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  121. {x}
  122. {x    These routines allow you to retrieve the Copyright and Version information}
  123. {x    embedded within the MDEF. The Version information is returned as a longint,}
  124. {x    which can be typecast to a normal version resource.}
  125. {x}
  126. {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  127.  
  128.     FUNCTION MDEF_GetCopyright (menu: MenuHandle): Str255;
  129.     FUNCTION MDEF_GetVersion (menu: MenuHandle): longint;
  130.  
  131.  
  132. {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  133. {x}
  134. {x    MDEF_CalcItemSize will calculate the height and width for a given menu item. It assumes the top and}
  135. {x    left fields of theRect are filled in; the MDEF will fill in the bottom and right.}
  136. {x}
  137. {x    MDEF_DrawItem will draw a given item in the rectangle you specify. You can indicate whether the}
  138. {x    the item should be hilited or enabled.}
  139. {x}
  140. {x    MDEF_DrawItemState is similar but allows you to draw the item disabled or hilited.}
  141. {x}
  142. {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  143.  
  144.     PROCEDURE MDEF_CalcItemSize (menu: MenuHandle; item: integer; VAR theRect: Rect);
  145.     PROCEDURE MDEF_DrawItem (menu: MenuHandle; item: integer; destRect: Rect);
  146.     PROCEDURE MDEF_DrawItemState (menu: MenuHandle; item: integer; destRect: Rect; hilited, enabled: boolean);
  147.  
  148. {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  149. {x}
  150. {x    MDEF_StripCustomMenuData will remove any custom data allocated by the Mercutio MDEFs. Use this}
  151. {x    before writing a MENU resource to disk (esp. if you are using callbacks)}
  152. {x}
  153. {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  154.     PROCEDURE MDEF_StripCustomMenuData (menu: MenuHandle);
  155.  
  156.  
  157.  
  158. {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  159. {x}
  160. {x    MDEF_SetCallbackProc sets the procedure that will be called for each item before it is drawn. The}
  161. {x    procedure is also called during the SizeMenu message call.}
  162. {x}
  163. {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  164.     PROCEDURE MDEF_SetCallbackProc (menu: MenuHandle; theProc: MercutioCallbackUPP);
  165.  
  166.  
  167. {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  168. {x}
  169. {x    MDEF_SetMenuPrefs lets you determine which style bits for the menuItems will be interepreted}
  170. {x    as feature flags for the MDEF.}
  171. {x}
  172. {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  173.     PROCEDURE MDEF_SetMenuPrefs (menu: MenuHandle; pPrefs: MenuPrefsPtr);
  174.  
  175.     PROCEDURE MDEF_SetKeyGraphicsPreference (menu: MenuHandle; preferGraphics: boolean);
  176.     PROCEDURE MDEF_SetSmallIconIDPreference (menu: MenuHandle; iconsSmallAboveID: integer);
  177.  
  178.     FUNCTION NewMercutioCallback(userRoutine: MercutioCallbackProcPtr) : MercutioCallbackUPP;
  179.     {$IFC NOT GENERATINGCFM }
  180.     INLINE $2E9F;
  181.     {$ENDC}
  182.  
  183.     PROCEDURE CallGetItemInfo (menuID: integer; previousModifiers: integer; VAR itemData: RichItemData; defProc: ProcPtr);
  184.     {$IFC NOT GENERATINGCFM }
  185.     INLINE $205F, $4E90;    { move.l (SP)+,A0; jsr (A0) }
  186.     {$ENDC}
  187.     
  188.     PROCEDURE CallMDEF (message: integer; theMenu: MenuHandle; VAR menuRect: Rect; hitPt: Point; VAR whichItem: integer; defProc: ProcPtr);
  189.     {$IFC NOT GENERATINGCFM }
  190.     INLINE $205F, $4E90;    { move.l (SP)+,A0; jsr (A0) }
  191.     {$ENDC}
  192.  
  193. IMPLEMENTATION
  194.         
  195. {$IFC GENERATINGCFM }
  196.     FUNCTION NewMercutioCallback(userRoutine: MercutioCallbackProcPtr) : MercutioCallbackUPP;
  197.     BEGIN
  198.         NewMercutioCallback := NewRoutineDescriptor(ProcPtr(@userRoutine), uppMercutioCallbackProcInfo, GetCurrentArchitecture);
  199.     END;
  200.  
  201.     PROCEDURE CallGetItemInfo (menuID: integer; previousModifiers: integer; VAR itemData: RichItemData; defProc: MercutioCallbackUPP);
  202.     VAR
  203.         callbackUPP : MercutioCallbackUPP;
  204.         result : longint;
  205.     BEGIN
  206.         callbackUPP := NewMercutioCallback(NewRoutineDescriptor(defProc, uppMercutioCallbackProcInfo, kM68kISA));
  207.         result := CallUniversalProc(UniversalProcPtr(defProc), uppMercutioCallbackProcInfo, menuID, previousModifiers, itemData );    
  208.         DisposeRoutineDescriptor(callbackUPP);
  209.     END;
  210.     
  211.     PROCEDURE CallMDEF (message: integer; theMenu: MenuHandle; VAR menuRect: Rect; hitPt: Point; VAR whichItem: integer; defProc: MercutioCallbackUPP);
  212.     VAR
  213.         menuProcUPP : MenuDefUPP;
  214.     BEGIN
  215.         menuProcUPP := MenuDefUPP(NewRoutineDescriptor(defProc, uppMenuDefProcInfo, kM68kISA));
  216.         CallMenuDefProc(message, theMenu, menuRect, hitPt, whichItem, menuProcUPP);    
  217.         DisposeRoutineDescriptor(menuProcUPP);
  218.     END;
  219. {$ENDC}
  220.  
  221.  
  222.  
  223.     PROCEDURE MDEF_SetMenuPrefs (menu: MenuHandle; pPrefs: MenuPrefsPtr);
  224.         VAR
  225.             state: SignedByte;
  226.             proc: Handle;
  227.             dummyRect: Rect;
  228.             dummyInt: integer;
  229.     BEGIN
  230.         proc := menu^^.menuProc;
  231.         state := HGetState(proc);
  232.         HLock(proc);
  233.         dummyInt := 0;
  234.         dummyRect.topLeft := Point(longint(0));
  235.         dummyRect.botRight := Point(longint(0));
  236.         CallMDEF(setPrefsMsg, menu, dummyRect, Point(pPrefs), dummyInt, proc^);
  237.         HSetState(proc, state);
  238.         CalcMenuSize(menu);    { size may have changed based on new Prefs }
  239.     END;
  240.  
  241.  
  242.     PROCEDURE MDEF_SetKeyGraphicsPreference (menu: MenuHandle; preferGraphics: boolean);
  243.         VAR
  244.             state: SignedByte;
  245.             proc: Handle;
  246.             dummyRect: Rect;
  247.             dummyPt: Point;
  248.             dummyInt: integer;
  249.     BEGIN
  250.         proc := menu^^.menuProc;
  251.         state := HGetState(proc);
  252.         HLock(proc);
  253.         dummyPt.h := Byte(preferGraphics);
  254.         dummyPt.v := 0;
  255.         CallMDEF(setKeyGraphicsMsg, menu, dummyRect, dummyPt, dummyInt, proc^);
  256.         HSetState(proc, state);
  257.     END;
  258.  
  259.  
  260.     PROCEDURE MDEF_SetSmallIconIDPreference (menu: MenuHandle; iconsSmallAboveID: integer);
  261.         VAR
  262.             state: SignedByte;
  263.             proc: Handle;
  264.             dummyRect: Rect;
  265.             dummyPt: Point;
  266.     BEGIN
  267.         proc := menu^^.menuProc;
  268.         state := HGetState(proc);
  269.         HLock(proc);
  270.         dummyPt := Point(longint(0));
  271.         dummyRect.topLeft := Point(longint(0));
  272.         dummyRect.botRight := Point(longint(0));
  273.         CallMDEF(setSmallIconIDMsg, menu, dummyRect, dummyPt, iconsSmallAboveID, proc^);
  274.         HSetState(proc, state);
  275.     END;
  276.  
  277.  
  278. {    PROCEDURE MDEF_SetCallbackProc (menu: MenuHandle; theProc: ProcPtr);}
  279.     PROCEDURE MDEF_SetCallbackProc (menu: MenuHandle; theProc: MercutioCallbackUPP);
  280.         VAR
  281.             state: SignedByte;
  282.             proc: Handle;
  283.             dummyRect: Rect;
  284.             dummyInt: integer;
  285.     BEGIN
  286.         proc := menu^^.menuProc;
  287.         state := HGetState(proc);
  288.         HLock(proc);
  289.         dummyInt := 0;
  290.         dummyRect.topLeft := Point(longint(0));
  291.         dummyRect.botRight := Point(longint(0));
  292.         CallMDEF(setCallbackMsg, menu, dummyRect, Point(theProc), dummyInt, proc^);
  293.         
  294.         HSetState(proc, state);
  295.     END;
  296.  
  297.  
  298.  
  299.     PROCEDURE MDEF_StripCustomMenuData (menu: MenuHandle);
  300.         VAR
  301.             state: SignedByte;
  302.             proc: Handle;
  303.             dummyPt: Point;
  304.             dummyItem: integer;
  305.             dummyRect: Rect;
  306.     BEGIN
  307.         dummyPt.h := 0;
  308.         dummyPt.v := 0;
  309.         proc := menu^^.menuProc;
  310.         state := HGetState(proc);
  311.         HLock(proc);
  312.         CallMDEF(stripCustomDataMsg, menu, dummyRect, dummyPt, dummyItem, proc^);
  313.         HSetState(proc, state);
  314.     END;
  315.  
  316.  
  317.  
  318.     PROCEDURE MDEF_DrawItem (menu: MenuHandle; item: integer; destRect: Rect);
  319.         VAR
  320.             state: SignedByte;
  321.             proc: Handle;
  322.             dummyPt: Point;
  323.     BEGIN
  324.         dummyPt.h := 0;
  325.         dummyPt.v := 0;
  326.         proc := menu^^.menuProc;
  327.         state := HGetState(proc);
  328.         HLock(proc);
  329.         CallMDEF(mDrawItemMsg, menu, destRect, dummyPt, item, proc^);
  330.         HSetState(proc, state);
  331.     END;
  332.  
  333.  
  334.  
  335.     PROCEDURE MDEF_DrawItemState (menu: MenuHandle; item: integer; destRect: Rect; hilited, enabled: boolean);
  336.         VAR
  337.             state: SignedByte;
  338.             proc: Handle;
  339.             dummyPt: Point;
  340.     BEGIN
  341.         proc := menu^^.menuProc;
  342.         state := HGetState(proc);
  343.         HLock(proc);
  344.         dummyPt.h := Byte(hilited);
  345.         dummyPt.v := Byte(enabled);
  346.         CallMDEF(mDrawItemStateMsg, menu, destRect, dummyPt, item, proc^);
  347.         HSetState(proc, state);
  348.     END;
  349.  
  350.  
  351.  
  352.     PROCEDURE MDEF_CalcItemSize (menu: MenuHandle; item: integer; VAR theRect: Rect);
  353.         VAR
  354.             state: SignedByte;
  355.             proc: Handle;
  356.             dummyPt: Point;
  357.     BEGIN
  358.         dummyPt.h := 0;
  359.         dummyPt.v := 0;
  360.         proc := menu^^.menuProc;
  361.         state := HGetState(proc);
  362.         HLock(proc);
  363.         CallMDEF(mCalcItemMsg, menu, theRect, dummyPt, item, proc^);
  364.         HSetState(proc, state);
  365.     END;
  366.  
  367.  
  368.  
  369.     FUNCTION MDEF_IsCustom (menu: MenuHandle): boolean;
  370.     {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  371.     {x}
  372.     {x    MDEF_IsCustom returns true if hMenu is controlled by a custom MDEF. This relies on my}
  373.     {x    convention of returning the customDefProcSig constant in the Rect parameter: this obtuse}
  374.     {x    convention should be unique enough that only my custom MDEFs behave this way.}
  375.     {x}
  376.     {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
  377.         VAR
  378.             state: SignedByte;
  379.             proc: Handle;
  380.             dummy: Rect;
  381.             dummyInt: integer;
  382.             hRes: Handle;
  383.     BEGIN
  384.         proc := menu^^.menuProc;
  385.         hRes := GetResource('MDEF', 0);
  386.         IF hRes^ = proc^ THEN
  387.             MDEF_IsCustom := false
  388.         ELSE
  389.             BEGIN
  390.                 state := HGetState(proc);
  391.                 HLock(proc);
  392.                 dummy.topLeft := Point(longint(0));
  393.                 CallMDEF(areYouCustomMsg, menu, dummy, Point(longint(0)), dummyInt, proc^);
  394.                 HSetState(proc, state);
  395.                 MDEF_IsCustom := longint(dummy.topLeft) = longint(customDefProcSig);
  396.             END;
  397.     END;
  398.  
  399.  
  400.     FUNCTION MDEF_GetVersion (menu: MenuHandle): longint;
  401.         VAR
  402.             state: SignedByte;
  403.             proc: Handle;
  404.             dummy: Rect;
  405.             dummyInt: integer;
  406.     BEGIN
  407.         proc := menu^^.menuProc;
  408.         state := HGetState(proc);
  409.         HLock(proc);
  410.         dummy.topLeft := Point(longint(0));
  411.         CallMDEF(getVersionMsg, menu, dummy, Point(longint(0)), dummyInt, proc^);
  412.         HSetState(proc, state);
  413.         MDEF_GetVersion := longint(dummy.topLeft);
  414.     END;
  415.  
  416.     FUNCTION MDEF_GetCopyright (menu: MenuHandle): Str255;
  417.         VAR
  418.             state: SignedByte;
  419.             proc: Handle;
  420.             dummy: Rect;
  421.             dummyInt: integer;
  422.             hCopyright: StringHandle;
  423.             s : Str255;
  424.     BEGIN
  425.         s := '';
  426.         proc := menu^^.menuProc;
  427.         state := HGetState(proc);
  428.         HLock(proc);
  429.         dummy.topLeft := Point(longint(0));
  430.         CallMDEF(getCopyrightMsg, menu, dummy, Point(longint(0)), dummyInt, proc^);
  431.         HSetState(proc, state);
  432.         hCopyright := StringHandle(dummy.topLeft);
  433.         IF hCopyright <> NIL THEN
  434.             s := hCopyright^^;
  435.         DisposeHandle(Handle(hCopyright));
  436.         MDEF_GetCopyright := s;
  437.     END;
  438.  
  439.  
  440.  
  441.     FUNCTION MDEF_MenuKey (theMessage: longint; theModifiers: integer; hMenu: MenuHandle) : longint;
  442.         VAR
  443.             state: SignedByte;
  444.             proc: Handle;
  445.             dummyRect: Rect;
  446.     BEGIN
  447.         IF ((hMenu = NIL) | (NOT MDEF_IsCustom(hMenu))) THEN
  448.             MDEF_MenuKey := MenuKey(char(BitAnd(theMessage, charCodeMask)))
  449.         ELSE
  450.             BEGIN
  451.                 proc := hMenu^^.menuProc;
  452.                 state := HGetState(proc);
  453.                 HLock(proc);
  454.                 dummyRect.topLeft := Point(longint(0));
  455.                 CallMDEF(mMenuKeyMsg, hMenu, dummyRect, Point(theMessage), theModifiers, proc^);
  456.                 HSetState(proc, state);
  457.                 MDEF_MenuKey := longint(dummyRect.topLeft);
  458.             END;
  459.     END;
  460.  
  461.  
  462. {$ALIGN RESET}
  463. END.
  464.