|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 9216 (0x2400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Xlbp_Atom, seg_004f4b
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Xlbt_Arithmetic; use Xlbt_Arithmetic; with Xlbt_Basic; use Xlbt_Basic; with Xlbt_Misc; use Xlbt_Misc; with Xlbt_Reply; use Xlbt_Reply; with Xlbt_Request; use Xlbt_Request; with Xlbt_String; use Xlbt_String; with Xlbip_Get_Reply; use Xlbip_Get_Reply; with Xlbip_Internal; use Xlbip_Internal; with Xlbip_Put_Request; use Xlbip_Put_Request; package body Xlbp_Atom is ------------------------------------------------------------------------------ -- X Library Atoms -- -- Xlbp_Atom - Create and lookup "atoms" (X server string shorthand) ------------------------------------------------------------------------------ -- Copyright 1989 - 1991 by Rational, Santa Clara, California. -- Copyright 1985 - 1989 by the Massachusetts Institute of Technology -- -- 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 names of MIT or Rational not be -- used in advertising or publicity pertaining to distribution of the software -- without specific, written prior permission. -- -- MIT and Rational disclaim all warranties with regard to this software, -- including all implied warranties of merchantability and fitness, in no -- event shall MIT or 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. ------------------------------------------------------------------------------ --\x0c function X_Get_Atom_Name (Display : X_Display; Atom : X_Atom) return X_String is Rep : X_Reply_Contents; Succ : X_Status; begin ----Lock the display. Lock_Display (Display); begin ----Send the request. Put_X_Get_Atom_Name_Request (Display, (Kind => Get_Atom_Name, Length => X_Get_Atom_Name_Request'Size / 32, Pad => 0, Id => Atom)); ----Get the reply. Get_Reply (Display => Display, Code => Get_Atom_Name, Reply => Rep, Extra => 0, Discard => False, Status => Succ); ----If reply failed then equate that with atom being undefined. if Succ = Failed then Unlock_Display (Display); Sync_Handle (Display); return ""; end if; ----Get the string that follows the reply and return that. declare Storage : X_String (1 .. S_Natural (Rep.Get_Atom_Name.Name_Length)); begin Get_X_String (Display, Storage); Unlock_Display (Display); Sync_Handle (Display); return Storage; end; ----Catch unexpected exceptions and prevent display lockup. exception when others => Unlock_Display (Display); raise; end; end X_Get_Atom_Name; --\x0c function X_Intern_Atom (Display : X_Display; Name : X_String; Only_If_Exists : Boolean) return X_Atom is N_Bytes : U_Short; Rep : X_Reply_Contents; Succ : X_Status; begin Lock_Display (Display); begin N_Bytes := Name'Length; Put_X_Intern_Atom_Request (Display, (Kind => Intern_Atom, Length => X_Intern_Atom_Request'Size / 32 + (N_Bytes + 3) / 4, Pad => 0, N_Bytes => N_Bytes, Only_If_Exists => From_Boolean (Only_If_Exists)), S_Natural (N_Bytes)); Put_X_String (Display, Name); Get_Reply (Display => Display, Code => Intern_Atom, Reply => Rep, Extra => 0, Discard => True, Status => Succ); if Succ = Failed then Rep.Intern_Atom.Atom := None_X_Atom; end if; exception when others => Unlock_Display (Display); raise; end; Unlock_Display (Display); Sync_Handle (Display); return Rep.Intern_Atom.Atom; end X_Intern_Atom; --\x0c end Xlbp_Atom;
nblk1=8 nid=0 hdr6=10 [0x00] rec0=22 rec1=00 rec2=01 rec3=05a [0x01] rec0=11 rec1=00 rec2=02 rec3=068 [0x02] rec0=20 rec1=00 rec2=03 rec3=04c [0x03] rec0=00 rec1=00 rec2=08 rec3=002 [0x04] rec0=20 rec1=00 rec2=04 rec3=01e [0x05] rec0=00 rec1=00 rec2=07 rec3=00e [0x06] rec0=1f rec1=00 rec2=05 rec3=02c [0x07] rec0=0c rec1=00 rec2=06 rec3=001 tail 0x217006a4c819781c866d5 0x42a00088462063203