|
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 - metrics - download
Length: 10240 (0x2800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Xlbp_Cut_Buffer, seg_004f55
└─⟦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_Atom_Defs; use Xlbt_Atom_Defs; with Xlbt_Basic; use Xlbt_Basic; with Xlbt_Cut_Buffer; use Xlbt_Cut_Buffer; with Xlbt_Window; use Xlbt_Window; with Xlbp_Display; use Xlbp_Display; with Xlbp_Window_Property; use Xlbp_Window_Property; package body Xlbp_Cut_Buffer is ------------------------------------------------------------------------------ -- X Library Cut and Paste Buffers -- -- Xlbp_Cut_Buffer - Used to handle cut-and-paste buffers. ------------------------------------------------------------------------------ -- 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 ----Insulate predefined atom numbers from cut routines N_To_Atom : constant X_Atom_Array (0 .. 7) := (Xa_Cut_Buffer0, Xa_Cut_Buffer1, Xa_Cut_Buffer2, Xa_Cut_Buffer3, Xa_Cut_Buffer4, Xa_Cut_Buffer5, Xa_Cut_Buffer6, Xa_Cut_Buffer7); --\x0c function X_Fetch_Buffer (Display : X_Display; Buffer : X_Cut_Buffer_Number) return U_Char_List is ------------------------------------------------------------------------------ -- X_Fetch_Buffer ------------------------------------------------------------------------------ Actual_Type : X_Atom; Actual_Format : U_Char; N_Items : S_Natural; Leftover : S_Natural; Data : U_Char_List; Succ : X_Status; begin ----Get the first chunk of the buffer. We may not get it all this time. X_Get_Window_Property (Display => Display, Window => X_Root_Window (Display, 0), Property => N_To_Atom (S_Natural (Buffer)), Offset => 0, Maximum_Length => S_Natural'Last / 4 * 4, Delete => False, Representation => Xa_String, Actual_Type => Actual_Type, Actual_Format => Actual_Format, N_Items => N_Items, Bytes_After => Leftover, Data => Data, Status => Succ); ----See if we were successful. if Succ = Failed then return None_U_Char_List; end if; ----Check to see if we are happy with the format. if Actual_Type /= Xa_String or else Actual_Format = 32 then -- I just duplicate the C code; I don't -- pretend to know why =32 and not /=8. Free_U_Char_List (Data); return None_U_Char_List; end if; ----Return the data. return Data; end X_Fetch_Buffer; --\x0c function X_Fetch_Bytes (Display : X_Display) return U_Char_List is ------------------------------------------------------------------------------ -- X_Fetch_Bytes ------------------------------------------------------------------------------ begin return X_Fetch_Buffer (Display, 0); end X_Fetch_Bytes; --\x0c procedure X_Rotate_Buffers (Display : X_Display; Rotate : S_Short) is ------------------------------------------------------------------------------ -- X_Rotate_Buffers ------------------------------------------------------------------------------ begin X_Rotate_Window_Properties (Display => Display, Window => X_Root_Window (Display, 0), Properties => N_To_Atom, N_Positions => Rotate); end X_Rotate_Buffers; --\x0c procedure X_Store_Buffer (Display : X_Display; Bytes : U_Char_Array; Buffer : X_Cut_Buffer_Number) is ------------------------------------------------------------------------------ -- X_Store_Buffer ------------------------------------------------------------------------------ begin X_Change_Property (Display => Display, Window => X_Root_Window (Display, 0), Property => N_To_Atom (S_Natural (Buffer)), Representation => Xa_String, Format => 8, Mode => Prop_Mode_Replace, Data => Bytes); end X_Store_Buffer; --\x0c procedure X_Store_Bytes (Display : X_Display; Bytes : U_Char_Array) is ------------------------------------------------------------------------------ -- X_Store_Bytes ------------------------------------------------------------------------------ begin X_Store_Buffer (Display, Bytes, 0); end X_Store_Bytes; --\x0c end Xlbp_Cut_Buffer;
nblk1=9 nid=0 hdr6=12 [0x00] rec0=1f rec1=00 rec2=01 rec3=04a [0x01] rec0=12 rec1=00 rec2=02 rec3=068 [0x02] rec0=14 rec1=00 rec2=03 rec3=02a [0x03] rec0=01 rec1=00 rec2=09 rec3=004 [0x04] rec0=13 rec1=00 rec2=04 rec3=030 [0x05] rec0=01 rec1=00 rec2=08 rec3=000 [0x06] rec0=21 rec1=00 rec2=05 rec3=028 [0x07] rec0=17 rec1=00 rec2=06 rec3=018 [0x08] rec0=13 rec1=00 rec2=07 rec3=000 tail 0x217006b1e819781efdce8 0x42a00088462063203