|
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 - downloadIndex: ┃ T V ┃
Length: 10990 (0x2aee) Types: TextFile Names: »V«
└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00 └─ ⟦0c20f784e⟧ »DATA« └─⟦1abbe589f⟧ └─⟦059497ac5⟧ └─⟦this⟧
with Xlbt_Arithmetic; use Xlbt_Arithmetic; with Xlbt_Basic; use Xlbt_Basic; with Xlbt_Request; use Xlbt_Request; with Xlbmt_Network_Types; use Xlbmt_Network_Types; package Xlbmp_Get is ------------------------------------------------------------------------------ -- X Library X Server Get Routines -- -- Xlbmp_Get - Receive info from the X Server ------------------------------------------------------------------------------ -- 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. ------------------------------------------------------------------------------ subtype Only_Zero is Integer range 0 .. 0; subtype Only_Non_Zero is X_Raw_Data_Index range 8 .. 16; --\f generic type Reply_Record is private; with procedure Wire_To_Reply (Code : X_Request_Code; Raw : X_Raw_Data_Array; Send_Event : Boolean; Reply : out Reply_Record; Length : out S_Natural); procedure Get_Reply_Generic (Display : X_Display; Code : X_Request_Code; Reply : out Reply_Record; Extra : S_Natural; Discard : Boolean; Status : out X_Status); ------------------------------------------------------------------------------ -- Display - the display to read from -- Code - the code for the request indicates the format of the reply -- Reply - where to put the reply; if one is received -- Extra - many replies receive extra data; we require at least this -- much extra to be present or we regard it as an I/O error -- Discard - True to discard any extra extra data that may appear with the -- reply -- Status - Failed if we got an Error instead of a Reply -- -- Read a reply to a request out of the network connection. You should only -- request multiples of 4 bytes. -- -- The Wire_To_Reply procedure has these arguments. -- -- Code - Specifies the X_Request_Code of the reply -- Raw - Specifies the raw 32-bytes of data representing the reply -- Send_Event - Specifies True if this reply was not sent by the server -- Reply - Receives the converted reply record -- Length - Specifies the number of additions words (groups of 4 bytes) -- that make up the rest of the reply; including all variable -- length data. ------------------------------------------------------------------------------ generic type Original is private; with procedure From_Raw (D : out Original; Raw : X_Raw_Data_Array); Original_Size : in X_Raw_Data_Index := Original'Size / 8; Multiple_Of_32 : Only_Zero := Original'Size rem 32; procedure Get_Data_Private (Display : X_Display; D : out Original); ------------------------------------------------------------------------------ -- For Discrete and ordinary Private types whose size is N*32. -- -- If you get a Constraint_Error when elaborating this generic then you have -- tried to instantiate it with a type whose 'Size is not N*32. -- -- Read some data from the network connection. Typically only called when -- you've previously called Get_Reply or some such and you now want to read -- data that you know is there. -- Original - this is the type of data that needs to be sent -- Original_Size - all X protocol requests are 32 bytes long, this value -- corresponds to the number of X_Raw_Data items -- From_Raw - converts the data to X_Raw_Data -- Display - display to receive the request -- D - the data to send ------------------------------------------------------------------------------ generic type Original is private; type Index is range <>; type Original_Array is array (Index range <>) of Original; with procedure From_Raw (D : out Original_Array; Raw : X_Raw_Data_Array); Original_Size : in X_Raw_Data_Index := Original'Size / 8; Multiple_Of_32 : in Only_Zero := Original'Size rem 32; procedure Get_Large_Data_1d (Display : X_Display; D : out Original_Array); ------------------------------------------------------------------------------ -- For one-dimensional array types where the element type is "large". A -- "large" type is any type whose 'Size is a multiple of 32 bits. -- -- If you get a Constraint_Error when elaborating this generic then you have -- tried to instantiate it with a type whose 'Size is not N*32. -- -- Read some data from the network connection. Typically only called when -- you've previously called Get_Reply or some such and you now want to read -- data that you know is there. -- Original - this is the type of data that needs to be sent -- Original_Size - all X protocol requests are 32 bytes long, this value -- corresponds to the number of X_Raw_Data items -- Index - this is the index type for the array type -- Original_Array - this is the array type -- From_Raw - converts the data to X_Raw_Data -- Display - display to receive the request -- D - the data to send ------------------------------------------------------------------------------ generic type Original is private; type Index is range <>; type Original_Array is array (Index range <>) of Original; with procedure From_Raw (D : out Original_Array; Raw : X_Raw_Data_Array); Original_Size : in X_Raw_Data_Index := Original'Size / 8; Less_Than_32 : in Only_Non_Zero := Original'Size; procedure Get_Small_Data_1d (Display : X_Display; D : out Original_Array); ------------------------------------------------------------------------------ -- For one-dimensional array types where the element type is "small". A -- "small" type is any type whose 'Size is less than 32 bits. This is -- expected to be used for 8 and 16 bit data types. Other sizes of -- data will not probably work properly. -- -- If you get a Constraint_Error when elaborating this generic then you have -- tried to instantiate it with a type whose 'Size is greater than 32. -- -- Read some data from the network connection. Typically only called when -- you've previously called Get_Reply or some such and you now want to read -- data that you know is there. -- Original - this is the type of data that needs to be sent -- Original_Size - all X protocol requests are 32 bytes long, this value -- corresponds to the number of X_Raw_Data items -- Index - this is the index type for the array type -- Original_Array - this is the array type -- From_Raw - converts the data to X_Raw_Data -- Display - display to receive the request -- D - the data to send ------------------------------------------------------------------------------ generic type Original is private; type Index1 is range <>; type Index2 is range <>; type Original_Array is array (Index1 range <>, Index2 range <>) of Original; with procedure From_Raw (D : out Original; Raw : X_Raw_Data_Array); with procedure From_Raw (D : out Original_Array; Raw : X_Raw_Data_Array); Original_Size : in X_Raw_Data_Index := Original'Size / 8; Multiple_Of_8 : Only_Zero := Original'Size rem 8; procedure Get_Data_2d (Display : X_Display; D : out Original_Array); ------------------------------------------------------------------------------ -- For two-dimensional array types where the element type is 8, 16, or N*32 -- bits in length. -- -- If you get a Constraint_Error when elaborating this generic then you have -- tried to instantiate it with a type whose 'Size is not N*8. -- -- Read some data from the network connection. Typically only called when -- you've previously called Get_Reply or some such and you now want to read -- data that you know is there. -- Original - this is the type of data that needs to be sent -- Original_Size - all X protocol requests are 32 bytes long, this value -- corresponds to the number of X_Raw_Data items -- Index1 - this is the first index type for the array type -- Index2 - this is the second index type for the array type -- Original_Array - this is the array type -- From_Raw - converts the data to X_Raw_Data -- Display - display to receive the request -- D - the data to send ------------------------------------------------------------------------------ procedure Eat_Data_Raw (Display : X_Display; Amount : S_Natural); ------------------------------------------------------------------------------ -- Read and discard some data from the network connection. Typically only -- called when we are trying to recover from some error, e.g. a Storage_Error -- exception, and we need to get rid of junque in the protocol stream that -- we requested but which we cannot allocate heap space to hold. -- We read and discard Amount X_Raw_Data items. ------------------------------------------------------------------------------ end Xlbmp_Get;