added some input procedures
This commit is contained in:
@ -1,12 +1,13 @@
|
||||
with H2.Scheme;
|
||||
with Ada.Text_IO;
|
||||
with Ada.Wide_Text_IO;
|
||||
|
||||
package Stream is
|
||||
|
||||
package S renames H2.Scheme;
|
||||
|
||||
------------------------------------------------------------
|
||||
type Object_String_Pointer is access all S.Object_String;
|
||||
--type Object_String_Pointer is access all S.Object_String;
|
||||
type Object_String_Pointer is access constant S.Object_String;
|
||||
type String_Input_Stream_Record(Str: Object_String_Pointer) is new S.Stream_Record with record
|
||||
Pos: Standard.Natural := 0;
|
||||
end record;
|
||||
@ -27,14 +28,15 @@ package Stream is
|
||||
|
||||
------------------------------------------------------------
|
||||
--type File_Stream_Record(Name: Object_String_Pointer) is new S.Stream_Record with record
|
||||
-- Handle: Ada.Text_IO.File_Type;
|
||||
-- Handle: H2.Text_IO.File_Type;
|
||||
--end record;
|
||||
|
||||
type File_Stream_Record is new S.Stream_Record with record
|
||||
Name: Object_String_Pointer;
|
||||
Handle: Ada.Text_IO.File_Type;
|
||||
Name: S.Constant_Object_String_Pointer;
|
||||
Handle: Ada.Wide_Text_IO.File_Type;
|
||||
end record;
|
||||
|
||||
|
||||
procedure Open (Stream: in out File_Stream_Record);
|
||||
procedure Close (Stream: in out File_Stream_Record);
|
||||
procedure Read (Stream: in out File_Stream_Record;
|
||||
@ -44,5 +46,19 @@ package Stream is
|
||||
Data: out S.Object_String;
|
||||
Last: out Standard.Natural);
|
||||
|
||||
------------------------------------------------------------
|
||||
procedure Allocate_Stream (Interp: in out S.Interpreter_Record;
|
||||
Name: in S.Constant_Object_String_Pointer;
|
||||
Result: out S.Stream_Pointer);
|
||||
|
||||
procedure Deallocate_Stream (Interp: in out S.Interpreter_Record;
|
||||
Source: in out S.Stream_Pointer);
|
||||
|
||||
--private
|
||||
-- type File_Stream_Record is new S.Stream_Record with record
|
||||
-- Name: S.Constant_Object_String_Pointer;
|
||||
-- Handle: Ada.Wide_Text_IO.File_Type;
|
||||
-- end record;
|
||||
|
||||
end Stream;
|
||||
|
||||
|
Reference in New Issue
Block a user