|
|
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: 11097 (0x2b59)
Types: TextFile
Names: »B«
└─⟦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_Error;
use Xlbt_Error;
with Xlbt_Event;
use Xlbt_Event;
with Xlbt_Exceptions;
use Xlbt_Exceptions;
with Xlbt_Request;
use Xlbt_Request;
with Xlbt_Rm;
use Xlbt_Rm;
with Xlbt_String;
use Xlbt_String;
with Xlbp_Error;
use Xlbp_Error;
with Xlbp_Proc_Var;
use Xlbp_Proc_Var;
with Xlbp_Rm_Name;
use Xlbp_Rm_Name;
with Xlbmp_Error_Log;
use Xlbmp_Error_Log;
with Xlbit_Library4;
use Xlbit_Library4;
with Xlbip_Wire_Converters;
use Xlbip_Wire_Converters;
with Xlbmt_Network_Types;
use Xlbmt_Network_Types;
with Xlbmp_Error_Log;
use Xlbmp_Error_Log;
package body Xlbip_Default_Proc_Vars is
------------------------------------------------------------------------------
-- X Library Internal Default Procedure Variable Values
--
-- Xlbip_Default_Proc_Vars - Default routines for various X_Display functions
------------------------------------------------------------------------------
-- 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.
------------------------------------------------------------------------------
--\f
------------------------------------------------------------------------------
-- Default_X_Io_Error_Function - Default fatal system error reporting routine.
-- Called when an X internal system error is encountered.
------------------------------------------------------------------------------
procedure Default_X_Io_Error_Function (Display : X_Display) is
begin
X_Report_Error
("XlibErr", "IOError",
"Xlib; Problem with connection to server %1." & Lf &
"(Error: %2)" & Lf &
"after %3 requests (%4 known processed)." & Lf &
"%5 event(s) remain in the queue." & Lf &
"'Receive' errors are usually caused by a server shutdown or" &
Lf &
"by a Kill_Client operation from a window manager.",
Display.Display_Name.all,
Err (Display.Last_Error),
To_X_String (S_Long'Image (Display.Request - 1)),
To_X_String (S_Long'Image (Display.Last_Request_Read)),
To_X_String (S_Long'Image (Display.Q_Len)));
raise X_Network_Io_Error;
end Default_X_Io_Error_Function;
--\f
------------------------------------------------------------------------------
-- Default_X_Error_Function - Default non-fatal error reporting routine. Called
-- when an X_Error packet is encountered in the input stream.
------------------------------------------------------------------------------
procedure Default_X_Error_Function (Display : X_Display;
Error : X_Error_Contents) is
Tmp1 : String (1 .. 8 + 4); -- "16##" + the actual value
Tmp2 : String (1 .. 8 + 4); -- "16##" + the actual value
Tmp3 : String (1 .. 8 + 4); -- "16##" + the actual value
Tmp4 : String (1 .. 8 + 4); -- "16##" + the actual value
Tmp5 : String (1 .. 8 + 4); -- "16##" + the actual value
Major : X_Request_Code;
Minor : U_Short;
Sequence : U_Short;
Id : S_Long;
begin
X_Report_Error ("XlibError", "XError",
"X protocol error: %1",
X_Get_Error_Text (Display, Error.Kind));
case Error.Kind is
when Bad_Atom =>
Major := Error.Atom.Major_Opcode;
Minor := Error.Atom.Minor_Opcode;
Sequence := Error.Atom.Sequence_Number;
Id := Error.Atom.Atom_Id.Number;
when Bad_Request | Bad_Match | Bad_Access | Bad_Alloc |
Bad_Name | Bad_Length | Bad_Implementation =>
Major := Error.Nothing.Major_Opcode;
Minor := Error.Nothing.Minor_Opcode;
Sequence := Error.Nothing.Sequence_Number;
Id := 0;
when Bad_Window | Bad_Pixmap | Bad_Cursor | Bad_Font |
Bad_Drawable | Bad_Color | Bad_Gc | Bad_Id_Choice =>
Major := Error.Resource.Major_Opcode;
Minor := Error.Resource.Minor_Opcode;
Sequence := Error.Resource.Sequence_Number;
Id := Error.Resource.Resource_Id.Number;
when Bad_Value =>
Major := Error.Value.Major_Opcode;
Minor := Error.Value.Minor_Opcode;
Sequence := Error.Value.Sequence_Number;
Id := Error.Value.Value;
when others =>
null;
end case;
S_Long_Io.Put (Tmp1, X_Request_Code'Pos (Major), Base => 10);
S_Long_Io.Put (Tmp2, S_Long (Minor), Base => 16);
S_Long_Io.Put (Tmp3, Id, Base => 16);
S_Long_Io.Put (Tmp4, S_Long (Sequence), Base => 16);
S_Long_Io.Put (Tmp5, Display.Request, Base => 16);
X_Report_Error ("XlibError", "XRequest",
"Major opcode of failed request: %1 (%2)" & Lf &
"Minor opcode of failed request: %3" & Lf &
"Resource id in failed request: %4" & Lf &
"Serial number of failed request: %5" & Lf &
"Current serial number in output stream: %6",
To_X_String (Tmp1),
To_X_String (X_Request_Code'Image (Major)),
To_X_String (Tmp2),
To_X_String (Tmp3),
To_X_String (Tmp4),
To_X_String (Tmp5));
if Error.Kind = Bad_Implementation then
return;
end if;
raise X_Unhandled_Error;
end Default_X_Error_Function;
--\f
procedure Default_X_Rm_Converter_Error (From_Type : X_Rm_Representation;
To_Type : X_Rm_Representation) is
begin
X_Report_Error
("XrmError", "BadConversion",
"Xrm; Conversion error; from {%1} to {%2}.",
X_Rm_Representation_To_String (From_Type),
X_Rm_Representation_To_String (To_Type));
end Default_X_Rm_Converter_Error;
procedure Default_X_Rm_No_Converter_Error (From_Type : X_Rm_Representation;
To_Type : X_Rm_Representation) is
begin
X_Report_Error
("XrmError", "NoConverter",
"Xrm; Conversion error; No converter for %1 to %2.",
X_Rm_Representation_To_String (From_Type),
X_Rm_Representation_To_String (To_Type));
end Default_X_Rm_No_Converter_Error;
--\f
------------------------------------------------------------------------------
-- Some general "what am I doing here?" reporting routines.
------------------------------------------------------------------------------
procedure Default_X_Unknown_Wire_Event
(Display : X_Display;
Raw : X_Raw_Data_Array;
Send_Event : Boolean;
Event : out X_Event;
Queue_It : out X_Status) is
begin
X_Report_Error ("XlibError", "NoWireEvent",
"Xlib; Unhandled wire event! .Kind=%1 .Display=%2.",
To_X_String (X_Raw_Data'Image (Raw (Raw'First))),
Display.Display_Name.all);
raise X_Library_Confusion;
end Default_X_Unknown_Wire_Event;
------------------------------------------------------------------------------
procedure Default_X_Unknown_Native_Event
(Display : X_Display;
Event : X_Event;
Raw : out X_Raw_Data_Array;
Status : out X_Status) is
begin
X_Report_Error ("XlibError", "NoNativeEvent",
"Xlib; Unhandled wire event! .Kind=%1 .Display=%2.",
To_X_String (X_Event_Code'Image (Event.Kind)),
Display.Display_Name.all);
raise X_Library_Confusion;
end Default_X_Unknown_Native_Event;
--\f
function Default_X_Report_Error_Pv is
new Proc_Var_X_Report_Error.Value (Default_X_Report_Error);
function Default_X_Io_Error_Function_Pv is
new Proc_Var_X_Io_Error_Function.Value (Default_X_Io_Error_Function);
function Default_X_Error_Function_Pv is
new Proc_Var_X_Error_Function.Value (Default_X_Error_Function);
function Default_X_Event_To_Wire_Pv is
new Proc_Var_X_Event_Wire.Value (Internal_Event_To_Wire);
function Default_X_Wire_To_Event_Pv is
new Proc_Var_X_Wire_Event.Value (Internal_Wire_To_Event);
function Default_X_Unknown_Wire_Event_Pv is
new Proc_Var_X_Wire_Event.Value (Default_X_Unknown_Wire_Event);
function Default_X_Unknown_Native_Event_Pv is
new Proc_Var_X_Event_Wire.Value (Default_X_Unknown_Native_Event);
--\f
begin
X_Lib_Default_X_Report_Error :=
Proc_Var_X_Report_Error.From_Pv (Default_X_Report_Error_Pv);
X_Lib_Default_X_Io_Error_Function :=
Proc_Var_X_Io_Error_Function.From_Pv (Default_X_Io_Error_Function_Pv);
X_Lib_Default_X_Error_Function :=
Proc_Var_X_Error_Function.From_Pv (Default_X_Error_Function_Pv);
X_Lib_Default_X_Event_To_Wire :=
Proc_Var_X_Event_Wire.From_Pv (Default_X_Event_To_Wire_Pv);
X_Lib_Default_X_Wire_To_Event :=
Proc_Var_X_Wire_Event.From_Pv (Default_X_Wire_To_Event_Pv);
X_Lib_Default_X_Unknown_Wire_Event :=
Proc_Var_X_Wire_Event.From_Pv (Default_X_Unknown_Wire_Event_Pv);
X_Lib_Default_X_Unknown_Native_Event :=
Proc_Var_X_Event_Wire.From_Pv (Default_X_Unknown_Native_Event_Pv);
end Xlbip_Default_Proc_Vars;