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: ┃ B T ┃
Length: 6550 (0x1996) 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_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. ------------------------------------------------------------------------------ --\f ----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); --\f 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; --\f 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; --\f 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; --\f 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; --\f 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; --\f end Xlbp_Cut_Buffer;