| 
									
										
										
										
											2014-03-26 14:28:41 +00:00
										 |  |  | with H2.Slim; | 
					
						
							|  |  |  | with Ada.Text_IO; | 
					
						
							| 
									
										
										
										
											2013-12-28 16:52:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-03-26 14:28:41 +00:00
										 |  |  | package Slim_Stream is | 
					
						
							| 
									
										
										
										
											2013-12-28 16:52:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-03-26 14:28:41 +00:00
										 |  |  | 	package S renames H2.Slim.Scheme; | 
					
						
							| 
									
										
										
										
											2013-12-28 16:52:31 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	------------------------------------------------------------
 | 
					
						
							| 
									
										
										
										
											2014-01-16 16:52:18 +00:00
										 |  |  | 	--type Object_Character_Array_Pointer is access all S.Object_Character_Array;
 | 
					
						
							|  |  |  | 	type Object_Character_Array_Pointer is access constant S.Object_Character_Array; | 
					
						
							|  |  |  | 	type String_Input_Stream_Record(Str: Object_Character_Array_Pointer) is new S.Stream_Record with record | 
					
						
							|  |  |  | 		Pos: S.Object_Size := 0;	 | 
					
						
							| 
									
										
										
										
											2013-12-28 16:52:31 +00:00
										 |  |  | 	end record; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	procedure Open (Stream: in out String_Input_Stream_Record); | 
					
						
							|  |  |  | 	procedure Close (Stream: in out String_Input_Stream_Record); | 
					
						
							|  |  |  | 	procedure Read (Stream: in out String_Input_Stream_Record; | 
					
						
							| 
									
										
										
										
											2014-01-16 16:52:18 +00:00
										 |  |  | 	                Data:   out    S.Object_Character_Array; | 
					
						
							|  |  |  | 	                Last:   out    S.Object_Size); | 
					
						
							| 
									
										
										
										
											2013-12-28 16:52:31 +00:00
										 |  |  | 	procedure Write (Stream: in out String_Input_Stream_Record; | 
					
						
							| 
									
										
										
										
											2014-01-16 16:52:18 +00:00
										 |  |  | 	                 Data:   out    S.Object_Character_Array; | 
					
						
							|  |  |  | 	                 Last:   out    S.Object_Size); | 
					
						
							| 
									
										
										
										
											2013-12-28 16:52:31 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	------------------------------------------------------------
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	type File_Stream_Record is new S.Stream_Record with record | 
					
						
							| 
									
										
										
										
											2014-01-16 16:52:18 +00:00
										 |  |  | 		Name:   S.Constant_Object_Character_Array_Pointer; | 
					
						
							| 
									
										
										
										
											2014-03-26 14:28:41 +00:00
										 |  |  | 		Handle: Ada.Text_IO.File_Type; | 
					
						
							| 
									
										
										
										
											2013-12-28 16:52:31 +00:00
										 |  |  | 	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; | 
					
						
							| 
									
										
										
										
											2014-01-16 16:52:18 +00:00
										 |  |  | 	                Data:   out    S.Object_Character_Array; | 
					
						
							|  |  |  | 	                Last:   out    S.Object_Size); | 
					
						
							| 
									
										
										
										
											2013-12-28 16:52:31 +00:00
										 |  |  | 	procedure Write (Stream: in out File_Stream_Record; | 
					
						
							| 
									
										
										
										
											2014-01-16 16:52:18 +00:00
										 |  |  | 	                 Data:   out    S.Object_Character_Array; | 
					
						
							|  |  |  | 	                 Last:   out    S.Object_Size); | 
					
						
							| 
									
										
										
										
											2013-12-28 16:52:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-01-01 14:07:03 +00:00
										 |  |  | 	------------------------------------------------------------
 | 
					
						
							|  |  |  | 	procedure Allocate_Stream (Interp: in out S.Interpreter_Record; | 
					
						
							| 
									
										
										
										
											2014-01-16 16:52:18 +00:00
										 |  |  | 	                           Name:   access S.Object_Character_Array; | 
					
						
							| 
									
										
										
										
											2014-01-01 14:07:03 +00:00
										 |  |  | 	                           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
 | 
					
						
							| 
									
										
										
										
											2014-01-16 16:52:18 +00:00
										 |  |  | --		Name:   S.Constant_Object_Character_Array_Pointer;
 | 
					
						
							| 
									
										
										
										
											2014-03-26 14:28:41 +00:00
										 |  |  | --		Handle: Ada.Text_IO.File_Type;
 | 
					
						
							| 
									
										
										
										
											2014-01-01 14:07:03 +00:00
										 |  |  | --	end record;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-03-26 14:28:41 +00:00
										 |  |  | end Slim_Stream; | 
					
						
							| 
									
										
										
										
											2013-12-28 16:52:31 +00:00
										 |  |  | 
 |