|
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: 7168 (0x1c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package File_Support, seg_04cdb0
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with A_Strings; with Os_Files; use Os_Files; with System; with V_I_Mutex; package File_Support is Stdin_Fd : File_Descriptor renames Os_Files.Stdin_Fd; Stdout_Fd : File_Descriptor renames Os_Files.Stdout_Fd; Stderr_Fd : File_Descriptor renames Os_Files.Stderr_Fd; function Sequential return Os_Files.File_Styles renames Os_Files.Sequential; function Direct return Os_Files.File_Styles renames Os_Files.Direct; function Text return Os_Files.File_Styles renames Os_Files.Text; function "=" (A, B : File_Id_Ptr) return Boolean renames Os_Files."="; function Same_Id (A, B : File_Id_Ptr) return Boolean renames Os_Files.Same_Id; function File_Size (Fd : File_Descriptor; Elem_Size : Integer) return Integer renames Os_Files.File_Size; function Is_Interactive (Fd : File_Descriptor) return Boolean renames Os_Files.Is_Interactive; procedure Position_File (Fd : File_Descriptor; To, Size : Integer) renames Os_Files.Position_File; procedure Skip_In_File (Fd : File_Descriptor; To : Integer) renames Os_Files.Skip_In_File; function Read (Fd : File_Descriptor; Addr : System.Address; Cnt : Integer) return Integer renames Os_Files.Read; procedure Write (Fd : File_Descriptor; Addr : System.Address; Cnt : Integer) renames Os_Files.Write; function Get_File_Id (Fd : File_Descriptor) return Os_Files.File_Id_Ptr renames Os_Files.Get_File_Id; type Byte_Array is array (Natural range <>) of Character; type Buffer_Rec (Size : Natural) is record -- elem(0) is used for pushing in ascii.lf -- after read-ahead. buffer really starts at elem(1). Elem : Byte_Array (0 .. Size); end record; type Access_Bytes is access Buffer_Rec; type Access_Char is access Character; type File_Mode is (Input, Output, In_Out); type File_Pos is (Unknown, At_Char, At_Eol, At_Delayed_Eol, At_Eop, At_Eof); type File_Record; type File_Ptr is access File_Record; type File_Record is record Fd : File_Descriptor; Name : A_Strings.A_String; Mode : File_Mode; Form : A_Strings.A_String; Style : File_Styles; Resetable : Boolean; Index : Natural; Linelength : Natural; Pagelength : Natural; Line : Natural; Page : Natural; Pos : File_Pos; Delete : Boolean; File_Id : File_Id_Ptr; Eof_Char : Character; Test_Eof : Boolean := False; -- for buffering in the file. Buffer : Access_Bytes; Last : Integer := -1; Last_Lf : Integer := -1; In_Ptr : Integer := -1; Out_Ptr : Integer := -1; Always_Flush : Boolean; -- for get_line returning form feeds in the returned string Want_Ff : Boolean := False; -- for linked list of file descriptors: all open files Next : File_Ptr; -- for task and abort safe file I/O Mutex : V_I_Mutex.Safe_Mutex_T; end record; -- Access to file_list must be protected via -- safe_support.file_support_lock(). File_List : File_Ptr := null; -- The following are updated in text_io Cur_Input_Id : File_Id_Ptr; Cur_Output_Id : File_Id_Ptr; -- The file routines need to be safe_support.file_lock()'ed as follows: -- file_open(), setup_buffer()\x09\x09=> -- \x09upon entry/exit: unlocked -- file_close_upon_exit()\x09\x09\x09=> -- \x09upon entry/exit: unlocked -- file_close(), file_delete()\x09\x09=> -- \x09upon entry: locked, upon exit unlocked -- all other file routines\x09\x09\x09=> -- \x09upon entry/exit: locked procedure File_Open (Name : String := ""; File : in out File_Ptr; Mode : File_Mode := In_Out; Create : Boolean := False; Form : String := ""; Style : File_Styles := Text; Record_Size : Integer := 0); procedure File_Close (File : in out File_Ptr); procedure File_Delete (File : in out File_Ptr); procedure File_Reset (File : in out File_Ptr; Mode : File_Mode); -- Called at program exit from close_all(). Doesn't do any -- locks/unlocks or frees procedure File_Close_Upon_Exit (File : File_Ptr); function File_Eof (File : in File_Ptr) return Boolean; procedure Putchar (File : File_Ptr; Char : Character); function Getchar (File : File_Ptr) return Character; procedure Skip_Past_Eol (File : File_Ptr); function Tstfile (File : File_Ptr) return File_Pos; function Tstfile_Beyond_Eol (File : File_Ptr) return File_Pos; procedure Setup_Buffer (File : File_Ptr; Size : Natural); procedure Refill_Buffer (File : File_Ptr); procedure Always_Flush (File : File_Ptr); procedure Want_Ff (File : File_Ptr); procedure Flush (File : File_Ptr); procedure Set_Buffer_Size (File : File_Ptr; Size : Natural); procedure Set_Eof_Char (File : File_Ptr; Eof_Char : Character := Ascii.Eot); procedure Write_To_Stderr (Message : String); end File_Support;
nblk1=6 nid=0 hdr6=c [0x00] rec0=18 rec1=00 rec2=01 rec3=07c [0x01] rec0=18 rec1=00 rec2=02 rec3=020 [0x02] rec0=1f rec1=00 rec2=03 rec3=044 [0x03] rec0=1f rec1=00 rec2=04 rec3=018 [0x04] rec0=16 rec1=00 rec2=05 rec3=03c [0x05] rec0=0d rec1=00 rec2=06 rec3=000 tail 0x217541aba874f7b399045 0x42a00088462060003