|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 49404 (0xc0fc)
Types: TextFile
Names: »B«
└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00
└─⟦0c20f784e⟧ »DATA«
└─⟦1abbe589f⟧
└─⟦059497ac5⟧
└─⟦this⟧
with Text_Io;
with Unchecked_Conversion;
with Xlbt_Arithmetic;
use Xlbt_Arithmetic;
with Xlbt_Basic3;
with Xlbt_Color;
with Xlbt_Error3;
with Xlbt_Event3;
with Xlbt_Exceptions;
use Xlbt_Exceptions;
with Xlbt_Extension4;
with Xlbt_Font3;
with Xlbt_Gc3;
with Xlbt_Geometry;
with Xlbt_Grab;
with Xlbt_Graphics3;
with Xlbt_Hint3;
with Xlbt_Host3;
with Xlbt_Image3;
with Xlbt_Input_Focus;
with Xlbt_Key3;
with Xlbt_Keyboard3;
with Xlbt_Misc;
with Xlbt_Pointer;
with Xlbt_Reply3;
with Xlbt_Request3;
with Xlbt_Rm3;
with Xlbt_Screen_Saver;
with Xlbt_String16;
with Xlbt_Visual;
with Xlbt_Window4;
with Xlbit_Hint3;
with Xlbit_Unused;
with Xlbip_Base_Converters;
use Xlbip_Base_Converters;
with Xlbmt_Numeric_Types;
use Xlbmt_Numeric_Types;
with Xlbmp_Error_Log;
use Xlbmp_Error_Log;
with Xlbmp_Generic_Converters;
use Xlbmp_Generic_Converters;
separate (Xlbmp_Debugger)
procedure Check_Machine_Assumptions is
------------------------------------------------------------------------------
-- Copyright 1989 - 1991 by Rational, Santa Clara, California.
--
-- All Rights Reserved.
--
-- Permission to use, copy, modify, and distribute this software and its
-- documentation for any purpose and without fee is hereby granted,
-- provided that the above copyright notice(s) appear in all copies and that
-- both that copyright notice(s) and this permission notice appear in
-- supporting documentation, and that the name of Rational not be used in
-- advertising or publicity pertaining to distribution of the software
-- without specific, written prior permission.
--
-- Rational disclaims all warranties with regard to this software, including
-- all implied warranties of merchantability and fitness, in no event shall
-- Rational be liable for any special, indirect or consequential damages or
-- any damages whatsoever resulting from loss of use, data or profits, whether
-- in an action of contract, negligence or other tortious action, arising out
-- of or in connection with the use or performance of this software.
------------------------------------------------------------------------------
-- Check sizes of things where the sizes are crucial to the correct operation
-- of the library.
------------------------------------------------------------------------------
begin
--/ if DEBUG and then Length_Clauses then
----Xlbmt_Numeric_Types
if 32 /= Thirty_Two_Bits_Signed'Size then
raise X_Library_Confusion;
end if;
if 16 /= Sixteen_Bits_Signed'Size then
raise X_Library_Confusion;
end if;
if 16 /= Sixteen_Bits_Unsigned'Size then
raise X_Library_Confusion;
end if;
if 8 /= Eight_Bits_Signed'Size then
raise X_Library_Confusion;
end if;
if 8 /= Eight_Bits_Unsigned'Size then
raise X_Library_Confusion;
end if;
----Xlbt_Arithmetic
if 32 /= S_Long'Size then
raise X_Library_Confusion;
end if;
if 16 /= S_Short'Size then
raise X_Library_Confusion;
end if;
if 16 /= U_Short'Size then
raise X_Library_Confusion;
end if;
if 8 /= S_Char'Size then
raise X_Library_Confusion;
end if;
if 8 /= U_Char'Size then
raise X_Library_Confusion;
end if;
declare
subtype S_Char_Array_8 is S_Char_Array (1 .. 8);
subtype U_Char_Array_8 is U_Char_Array (1 .. 8);
subtype S_Short_Array_4 is S_Short_Array (1 .. 4);
subtype U_Short_Array_4 is U_Short_Array (1 .. 4);
subtype S_Long_Array_2 is S_Long_Array (1 .. 2);
Sc : S_Char_Array_8;
Uc : U_Char_Array_8;
Ss : S_Short_Array_4;
Us : U_Short_Array_4;
Sl : S_Long_Array_2;
begin
if 8 * 8 /= S_Char_Array_8'Size then
raise X_Library_Confusion;
end if;
if 8 * 8 /= U_Char_Array_8'Size then
raise X_Library_Confusion;
end if;
if 16 * 4 /= S_Short_Array_4'Size then
raise X_Library_Confusion;
end if;
if 16 * 4 /= U_Short_Array_4'Size then
raise X_Library_Confusion;
end if;
if 32 * 2 /= S_Long_Array_2'Size then
raise X_Library_Confusion;
end if;
if 8 /= Sc (2)'Size then
raise X_Library_Confusion;
end if;
if 8 /= Uc (4)'Size then
raise X_Library_Confusion;
end if;
if 16 /= Ss (1)'Size then
raise X_Library_Confusion;
end if;
if 16 /= Us (2)'Size then
raise X_Library_Confusion;
end if;
if 32 /= Sl (2)'Size then
raise X_Library_Confusion;
end if;
end;
----Xlbmt_Network_Types
declare
subtype Raw_Array_8 is Xlbmt_Network_Types.X_Raw_Data_Array (1 .. 8);
Ra : Raw_Array_8;
begin
if Xlbmt_Network_Types.X_Raw_Data'Size /= 8 then
raise X_Library_Confusion; -- None of the I/O functions/code that
-- is part of the default "portable"
-- implementation of the Xlib will work
-- if this isn't true.
end if;
if Raw_Array_8'Size /= 8 * 8 then
raise X_Library_Confusion;
end if;
if Ra (3)'Size /= 8 then
raise X_Library_Confusion;
end if;
end;
----Xlbit_Hint3
if Xlbit_Hint3.X_Size_Hints_Protocol'Size /= 18 * 32 then
raise X_Library_Confusion;
end if;
----Xlbt_Basic3
if Xlbt_Basic3.X_Atom'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Id'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Drawable'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Event_Mask'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Event_Mask_Short'Size /= 16 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Pixel'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Pixmap'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Plane_Mask'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Screen_Number'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Time'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Colormap'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Cursor'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Font'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_G_Context'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Visual_Id'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Basic3.X_Window'Size /= 32 then
raise X_Library_Confusion;
end if;
----Xlbt_Color
if Xlbt_Color.X_Color_Flags'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Color.X_Color_Mask'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Color.X_Color'Size /= 3 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Color.X_Colormap_Alloc'Size /= 8 then
raise X_Library_Confusion;
end if;
----Xlbt_Error3
if Xlbt_Error3.X_Error_Code'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Error3.X_Error_Code'Pos (Xlbt_Error3.X_Error_Code'Last) /= 255 then
raise X_Library_Confusion;
end if;
if Xlbt_Error3.X_Error_With_Atom'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Error3.X_Error_With_Nothing'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Error3.X_Error_With_Resource'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Error3.X_Error_With_Value'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
----Xlbt_Event3
if Xlbt_Event3.X_Event_Code_8'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Event_Code_8'Pos (Xlbt_Event3.X_Event_Code_8'Last) /=
255 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Button_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Circulate_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Circulate_Request_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Client_Message_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Colormap_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Configure_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Configure_Request_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Create_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Destroy_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Enter_Leave_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Expose_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Focus_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Graphics_Expose_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Gravity_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Keymap_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Key_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Mapping_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Map_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Map_Request_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Motion_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_No_Expose_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Property_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Reparent_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Resize_Request_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Selection_Clear_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Selection_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Selection_Request_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Unmap_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Visibility_Notify_Event'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Colormap_State'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Enter_Leave_Detail'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Enter_Leave_Flags'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Enter_Leave_Mode'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Focus_Detail'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Focus_Mode'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Mapping_Request_Type'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Motion_Notify_Detail'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Event3.X_Visibility_Notify_State'Size /= 8 then
raise X_Library_Confusion;
end if;
----Xlbt_Extension4
if Xlbt_Extension4.X_Extension_Number'Size /= 32 then
raise X_Library_Confusion;
end if;
----Xlbt_Font3
declare
subtype Csa2d_26 is X_Char_Struct_Array_2d (1 .. 2, 1 .. 6);
Csa : Csa2d_26;
begin
if Xlbt_Font3.X_Per_Char_Flags'Size /= 16 then
raise X_Library_Confusion;
end if;
if Xlbt_Font3.X_Char_Struct'Size /= 3 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Font3.X_Font_Direction'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Font3.X_Font_Prop'Size /= 2 * 32 then
raise X_Library_Confusion;
end if;
if Csa2d_26'Size /= 12 * 3 * 32 then
raise X_Library_Confusion;
end if;
if Csa (1, 3)'Size /= 3 * 32 then
raise X_Library_Confusion;
end if;
end;
----Xlbt_Gc3
if Xlbt_Gc3.X_Best_Size_Class'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Gc3.X_Clip_Ordering'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Gc3.X_Gc_Components'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Gc3.X_Graphic_Function'Size /= 32 then
raise X_Library_Confusion;
end if;
----Xlbt_Geometry
if Xlbt_Geometry.X_Parse_Geometry_Flags'Size /= 32 then
raise X_Library_Confusion;
end if;
----Xlbt_Grab
if Xlbt_Grab.X_Allow_Event_Mode'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Grab.X_Grab_Mode'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Grab.X_Grab_Status'Size /= 8 then
raise X_Library_Confusion;
end if;
----Xlbt_Graphics3
if Xlbt_Graphics3.X_Arc'Size /= 3 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Graphics3.X_Coordinate_Mode'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Graphics3.X_Point'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Graphics3.X_Polygon_Shape'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Graphics3.X_Rectangle'Size /= 2 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Graphics3.X_Segment'Size /= 2 * 32 then
raise X_Library_Confusion;
end if;
----Xlbt_Hint3
if Xlbt_Hint3.X_Icon_Size'Size /= 6 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Hint3.X_Initial_Window_State'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Hint3.X_Size_Hints_Flags'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Hint3.X_Standard_Colormap'Size /= 10 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Hint3.X_Wm_Hints_Flags'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Hint3.X_Wm_Hints'Size /= 9 * 32 then
raise X_Library_Confusion;
end if;
----Xlbt_Host3
if Xlbt_Host3.X_Change_Access'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Host3.X_Change_Hosts_Mode'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Host3.X_Change_Save_Set_Mode'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Host3.X_Close_Down_Mode'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Host3.X_Host_Protocol_Family'Size /= 8 then
raise X_Library_Confusion;
end if;
----Xlbt_Image3
if Xlbt_Image3.X_Byte_Bit_Order'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Image3.X_Image_Format'Size /= 8 then
raise X_Library_Confusion;
end if;
----Xlbt_Input_Focus
if Xlbt_Input_Focus.X_Revert_Focus_Mode'Size /= 8 then
raise X_Library_Confusion;
end if;
----Xlbt_Key3
declare
subtype X_Key_Code_Array_4 is X_Key_Code_Array (1 .. 4);
subtype X_Modifier_Key_Code_Array_4 is
X_Modifier_Key_Code_Array (1 .. 4);
Kca : X_Key_Code_Array_4;
Mkc : X_Modifier_Key_Code_Array_4;
begin
if Xlbt_Key3.X_Key_Button_Mask'Size /= 16 then
raise X_Library_Confusion;
end if;
if Xlbt_Key3.X_Key_Code'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Key3.X_Key_Sym'Size /= 32 then
raise X_Library_Confusion;
end if;
if X_Key_Code_Array_4'Size /= 4 * 8 then
raise X_Library_Confusion;
end if;
if Kca (3)'Size /= 8 then
raise X_Library_Confusion;
end if;
if X_Modifier_Key_Code_Sub_Array'Size /= 8 * 8 then
raise X_Library_Confusion;
end if;
if X_Modifier_Key_Code_Array_4'Size /= 4 * 8 * 8 then
raise X_Library_Confusion;
end if;
if Mkc (2)'Size /= 8 * 8 then
raise X_Library_Confusion;
end if;
end;
----Xlbt_Keyboard3
if Xlbt_Keyboard3.X_Auto_Repeat_Mode'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Keyboard3.X_Keyboard_As_Bits'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Keyboard3.X_Keyboard_As_Bits_Short'Size /= 31 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Keyboard3.X_Keyboard_Control_Flags'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Keyboard3.X_Led_Bits'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Keyboard3.X_Led_Mode'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Keyboard3.X_Mapping_Status'Size /= 8 then
raise X_Library_Confusion;
end if;
----Xlbt_Misc
if Xlbt_Misc.X_Boolean_Char'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Misc.X_Boolean_Long'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Misc.X_Text_Elt'Size /= 8 * 2 then
raise X_Library_Confusion;
end if;
----Xlbt_Pointer
if Xlbt_Pointer.X_Button_Name'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Pointer.X_Time_Coord'Size /= 2 * 32 then
raise X_Library_Confusion;
end if;
----Xlbt_Reply3
declare
subtype X_Rgb_Array_4 is Xlbt_Reply3.X_Rgb_Array (1 .. 4);
Ra : X_Rgb_Array_4;
begin
if X_Rgb_Array_4'Size /= 4 * 4 * 16 then
raise X_Library_Confusion;
end if;
if Ra (2)'Size /= 4 * 16 then
raise X_Library_Confusion;
end if;
end;
if Xlbt_Reply3.X_Alloc_Color_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Alloc_Color_Cells_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Alloc_Color_Planes_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Alloc_Named_Color_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Atom_Name_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Font_Path_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Geometry_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Image_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Input_Focus_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Keyboard_Control_Reply'Size /= 8 * 52 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Keyboard_Mapping_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Modifier_Mapping_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Motion_Events_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Pointer_Control_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Pointer_Mapping_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Property_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Screen_Saver_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Selection_Owner_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Get_Window_Attributes_Reply'Size /= 8 * 44 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Grab_Keyboard_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Grab_Pointer_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Intern_Atom_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_List_Extensions_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_List_Fonts_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_List_Fonts_With_Info_Reply'Size /= 15 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_List_Hosts_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Wire_Host_Reply'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_List_Installed_Colormaps_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_List_Properties_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Lookup_Color_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Query_Best_Size_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Query_Colors_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Rgb'Size /= 16 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Query_Extension_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Query_Font_Reply'Size /= 15 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Query_Keymap_Reply'Size /= 10 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Query_Pointer_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Query_Text_Extents_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Query_Tree_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Set_Modifier_Mapping_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Set_Pointer_Mapping_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Reply3.X_Translate_Coords_Reply'Size /= 8 * 32 then
raise X_Library_Confusion;
end if;
----Xlbt_Request3
if Xlbt_Request3.X_Request_Code'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Request_Code'Pos (Xlbt_Request3.X_Request_Code'Last) /=
255 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Alloc_Color_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Alloc_Color_Cells_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Alloc_Color_Planes_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Alloc_Named_Color_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Allow_Events_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Bell_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Change_Active_Pointer_Grab_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Change_Gc_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Change_Hosts_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Change_Keyboard_Control_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Change_Keyboard_Mapping_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Change_Pointer_Control_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Change_Property_Request'Size /= 32 * 6 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Change_Save_Set_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Change_Window_Attributes_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Circulate_Window_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Clear_Area_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Close_Font_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Configure_Window_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Convert_Selection_Request'Size /= 32 * 6 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Copy_Area_Request'Size /= 32 * 7 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Copy_Colormap_And_Free_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Copy_Gc_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Copy_Plane_Request'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Create_Colormap_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Create_Cursor_Request'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Create_Gc_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Create_Glyph_Cursor_Request'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Create_Pixmap_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Create_Window_Request'Size /= 32 * 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Delete_Property_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Destroy_Subwindows_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Destroy_Window_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Fill_Poly_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Force_Screen_Saver_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Free_Colormap_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Free_Colors_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Free_Cursor_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Free_Gc_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Free_Pixmap_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Atom_Name_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Font_Path_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Geometry_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Image_Request'Size /= 32 * 5 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Input_Focus_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Keyboard_Control_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Keyboard_Mapping_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Modifier_Mapping_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Motion_Events_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Pointer_Control_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Pointer_Mapping_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Property_Request'Size /= 32 * 6 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Screen_Saver_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Selection_Owner_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Get_Window_Attributes_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Grab_Button_Request'Size /= 32 * 6 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Grab_Key_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Grab_Keyboard_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Grab_Pointer_Request'Size /= 32 * 6 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Grab_Server_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Image_Text16_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Image_Text8_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Install_Colormap_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Intern_Atom_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Kill_Client_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_List_Extensions_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_List_Fonts_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_List_Fonts_With_Info_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_List_Hosts_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_List_Installed_Colormaps_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_List_Properties_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Lookup_Color_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Map_Subwindows_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Map_Window_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_No_Operation_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Open_Font_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Poly_Arc_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Poly_Fill_Arc_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Poly_Fill_Rectangle_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Poly_Line_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Poly_Point_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Poly_Rectangle_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Poly_Segment_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Poly_Text16_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Poly_Text8_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Put_Image_Request'Size /= 32 * 6 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Query_Best_Size_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Query_Colors_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Query_Extension_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Query_Font_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Query_Keymap_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Query_Pointer_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Query_Text_Extents_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Query_Tree_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Recolor_Cursor_Request'Size /= 32 * 5 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Reparent_Window_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Rotate_Properties_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Send_Event_Request'Size /= 32 * 11 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Set_Access_Control_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Set_Clip_Rectangles_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Set_Close_Down_Mode_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Set_Dashes_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Set_Font_Path_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Set_Input_Focus_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Set_Modifier_Mapping_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Set_Pointer_Mapping_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Set_Screen_Saver_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Set_Selection_Owner_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Store_Colors_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Color_Item'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Store_Named_Color_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Translate_Coords_Request'Size /= 32 * 4 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Ungrab_Button_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Ungrab_Key_Request'Size /= 32 * 3 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Ungrab_Keyboard_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Ungrab_Pointer_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Ungrab_Server_Request'Size /= 32 * 1 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Uninstall_Colormap_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Unmap_Subwindows_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Unmap_Window_Request'Size /= 32 * 2 then
raise X_Library_Confusion;
end if;
if Xlbt_Request3.X_Warp_Pointer_Request'Size /= 32 * 6 then
raise X_Library_Confusion;
end if;
----Xlbt_Rm3
if Xlbt_Rm3.X_Rm_Quark'Size /= 32 then
raise X_Library_Confusion;
end if;
----Xlbt_Screen_Saver
if Xlbt_Screen_Saver.X_Screen_Saver_Blanking'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Screen_Saver.X_Screen_Saver_Exposures'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Screen_Saver.X_Screen_Saver_Mode'Size /= 8 then
raise X_Library_Confusion;
end if;
----Xlbt_String16
declare
subtype S16_8 is Xlbt_String16.X_String16 (1 .. 8);
S8 : S16_8;
begin
if Xlbt_String16.X_Character16'Size /= 16 then
raise X_Library_Confusion;
end if;
if S16_8'Size /= 8 * 16 then
raise X_Library_Confusion;
end if;
if S8 (5)'Size /= 16 then
raise X_Library_Confusion;
end if;
end;
----Xlbt_String
declare
subtype S8_8 is Xlbt_String.X_String (1 .. 8);
S8 : S8_8;
begin
if Xlbt_String.X_Character'Size /= 8 then
raise X_Library_Confusion;
end if;
if S8_8'Size /= 8 * 8 then
raise X_Library_Confusion;
end if;
if S8 (5)'Size /= 8 then
raise X_Library_Confusion;
end if;
end;
----Xlbt_Visual
if Xlbt_Visual.X_Display_Class'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Visual.X_Visual_Info_Flags'Size /= 32 then
raise X_Library_Confusion;
end if;
----Xlbt_Window4
if Xlbt_Window4.X_Backing_Store_Hint'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Window4.X_Bit_Gravity'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Window4.X_Circulate_Place'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Window4.X_Map_State'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Window4.X_New_Window_Attributes'Size /= 32 then
raise X_Library_Confusion;
end if;
if Xlbt_Window4.X_Property_Mode'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Window4.X_Property_State'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Window4.X_Window_Changes_Mask'Size /= 16 then
raise X_Library_Confusion;
end if;
if Xlbt_Window4.X_Window_Class'Size /= 16 then
raise X_Library_Confusion;
end if;
if Xlbt_Window4.X_Window_Gravity'Size /= 8 then
raise X_Library_Confusion;
end if;
if Xlbt_Window4.X_Window_Stacking'Size /= 8 then
raise X_Library_Confusion;
end if;
----Xlbit_Unused
if Xlbit_Unused.X_Unused_4'Size /= 4 * 8 then
raise X_Library_Confusion;
end if;
if Xlbit_Unused.X_Unused_5'Size /= 5 * 8 then
raise X_Library_Confusion;
end if;
if Xlbit_Unused.X_Unused_8'Size /= 8 * 8 then
raise X_Library_Confusion;
end if;
if Xlbit_Unused.X_Unused_9'Size /= 9 * 8 then
raise X_Library_Confusion;
end if;
if Xlbit_Unused.X_Unused_11'Size /= 11 * 8 then
raise X_Library_Confusion;
end if;
if Xlbit_Unused.X_Unused_14'Size /= 14 * 8 then
raise X_Library_Confusion;
end if;
if Xlbit_Unused.X_Unused_15'Size /= 15 * 8 then
raise X_Library_Confusion;
end if;
if Xlbit_Unused.X_Unused_16'Size /= 16 * 8 then
raise X_Library_Confusion;
end if;
if Xlbit_Unused.X_Unused_18'Size /= 18 * 8 then
raise X_Library_Confusion;
end if;
if Xlbit_Unused.X_Unused_19'Size /= 19 * 8 then
raise X_Library_Confusion;
end if;
if Xlbit_Unused.X_Unused_20'Size /= 20 * 8 then
raise X_Library_Confusion;
end if;
if Xlbit_Unused.X_Unused_21'Size /= 21 * 8 then
raise X_Library_Confusion;
end if;
if Xlbit_Unused.X_Unused_23'Size /= 23 * 8 then
raise X_Library_Confusion;
end if;
if Xlbit_Unused.X_Unused_25'Size /= 25 * 8 then
raise X_Library_Confusion;
end if;
------------------------------------------------------------------------------
-- Checks on data layout assumptions - check all of those little assumptions
-- that we make about what bits are where.
------------------------------------------------------------------------------
----Positive_Is_Large
----Make sure that Positive'Size >= S_Long'Size.
--/ if Positive_Is_Large then
if Positive'Size < S_Long'Size - 1 then
raise X_Library_Confusion;
end if;
--/ end if;
----Bit0_Sign_Bit
----Make sure that bit(0) of a bit array is (not) the low order bit or else none
-- of our bit masks in the protocol messages will be correct.
declare
type Bl is array (0 .. 31) of Boolean;
type Bs is array (0 .. 15) of Boolean;
type Bc is array (0 .. 7) of Boolean;
--/ if Length_Clauses then
for Bl'Size use 32;
for Bs'Size use 16;
for Bc'Size use 8;
--/ elsif Pack then
--// pragma Pack (Bl);
--// pragma Pack (Bs);
--// pragma Pack (Bc);
--/ else
--// This test requires some code or it cannot be made. What should we do?
--// If you have some way of guaranteeing that the Bit0 and Byte0 parameters
--// are correct then simply put a big --/if around this entire test and
--// have it comment itself out for your particular target.
--/ end if;
Bli : Bl := Bl'(0 => True, others => False);
Bsi : Bs := Bs'(1 => True, others => False);
Bci : Bc := Bc'(2 => True, others => False);
function To_Raw is new Unchecked_Conversion (Bl, S_Long);
function To_Raw is new Unchecked_Conversion (Bs, S_Short);
function To_Raw is new Unchecked_Conversion (Bc, S_Char);
Blb : constant S_Long := To_Raw (Bli);
Bsb : constant S_Short := To_Raw (Bsi);
Bcb : constant S_Char := To_Raw (Bci);
begin
--/ if Bit0_Sign_Bit then
if Blb /= S_Long'First or else
Bsb /= 2 ** 14 or else
Bcb /= 2 ** 5 then
Text_Io.Put_Line
("X Library: Bit(0) of bit arrays isn't high-order (sign)" &
" bit any more?!?");
raise X_Library_Confusion;
end if;
--/ else
--// if Blb /= 1 or else
--// Bsb /= 2 or else
--// Bcb /= 4 then
--// X_Report_Error
--// ("X Library: Bit(0) of bit arrays isn't low-order (even/odd)" &
--// " bit any more?!?");
--// raise X_Library_Confusion;
--// end if;
--/ end if;
end;
----Byte0_Sign_Byte
----Make sure that element(0) of a Raw Data array is (not) the low order
-- element or else none of our protocol messages will be correct.
declare
A_Long : S_Long := 3 * 2 ** 16 + 2 * 2 ** 8 + 1;
A_Array : X_Raw_Data_Array (1 .. 4);
begin
To_Raw (A_Array, A_Long);
--/ if Byte0_Sign_Byte then
if A_Array (A_Array'First + 0) /= 0 or else
A_Array (A_Array'First + 1) /= 3 or else
A_Array (A_Array'First + 2) /= 2 or else
A_Array (A_Array'First + 3) /= 1 then
Text_Io.Put_Line ("X Library: Element(0) of raw data arrays" &
" isn't high-order (contains sign) element" &
" any more?!?");
raise X_Library_Confusion;
end if;
--/ else
--// if A_Array (A_Array'First + 0) /= 1 or else
--// A_Array (A_Array'First + 1) /= 2 or else
--// A_Array (A_Array'First + 2) /= 3 or else
--// A_Array (A_Array'First + 3) /= 0 then
--// X_Report_Error
--// ("X Library: Element(0) of raw data arrays" &
--// " isn't low-order (contains the even/odd bit)" &
--// " element any more?!?");
--// raise X_Library_Confusion;
--// end if;
--/ end if;
end;
----Row_Major_Order
----Make sure that arrays are Row/Column major as indicated by our flag.
declare
type Arry is array (Integer range 3 .. 6,
Integer range 8 .. 10) of S_Long;
procedure To_Raw is new Convert_Private_To_Raw (Arry);
Blob : Arry := ((1, 2, 3),
(4, 5, 6),
(7, 8, 9),
(10, 11, 12));
Raw : X_Raw_Data_Array (1 .. Arry'Size / X_Raw_Data'Size);
Off : constant X_Raw_Data_Index := S_Long'Size / X_Raw_Data'Size;
begin
To_Raw (Raw, Blob);
--/ if Row_Major_Order then
if Raw (Raw'First + Off * 1 - 1) /= 1 or else
Raw (Raw'First + Off * 2 - 1) /= 2 or else
Raw (Raw'First + Off * 3 - 1) /= 3 or else
Raw (Raw'First + Off * 4 - 1) /= 4 or else
Raw (Raw'First + Off * 9 - 1) /= 9 then
Text_Io.Put_Line ("X Library: We aren't row major any more!?!");
raise X_Library_Confusion;
end if;
--/ else
--// if Raw (Raw'First + Off * 1 - 1) /= 1 or else
--// Raw (Raw'First + Off * 2 - 1) /= 4 or else
--// Raw (Raw'First + Off * 3 - 1) /= 7 or else
--// Raw (Raw'First + Off * 4 - 1) /= 10 or else
--// Raw (Raw'First + Off * 5 - 1) /= 2 or else
--// Raw (Raw'First + Off * 10 - 1) /= 9 then
--// Report_Error ("X Library: We aren't column major any more!?!");
--// raise X_Library_Confusion;
--// end if;
--/ end if;
end;
--/ else -- not (DEBUG and then Length_Clauses)
--//
--// null;
--//
--/ end if; -- DEBUG and then Length_Clauses
end Check_Machine_Assumptions;