1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
5 -- S Y S T E M . S T R I N G S . S T R E A M _ O P S --
9 -- Copyright (C) 2008-2024, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 with Ada
.IO_Exceptions
; use Ada
.IO_Exceptions
;
33 with Ada
.Streams
; use Ada
.Streams
;
34 with Ada
.Unchecked_Conversion
;
36 with System
.Storage_Elements
; use System
.Storage_Elements
;
37 with System
.Stream_Attributes
;
39 package body System
.Strings
.Stream_Ops
is
41 -- The following type describes the low-level IO mechanism used in package
42 -- Stream_Ops_Internal.
44 type IO_Kind
is (Byte_IO
, Block_IO
);
46 -- The following package provides an IO framework for strings. Depending
47 -- on the version of System.Stream_Attributes as well as the size of
48 -- formal parameter Element_Type, the package will either utilize block
49 -- IO or element-by-element IO.
52 type Element_Type
is private;
53 type Index_Type
is range <>;
54 type Array_Type
is array (Index_Type
range <>) of Element_Type
;
56 package Stream_Ops_Internal
is
58 (Strm
: access Root_Stream_Type
'Class;
60 Max_Length
: Long_Integer := Long_Integer'Last) return Array_Type
;
61 -- Raises an exception if you try to read a String that is longer than
62 -- Max_Length. See expansion of Attribute_Input in Exp_Attr for details.
65 (Strm
: access Root_Stream_Type
'Class;
70 (Strm
: access Root_Stream_Type
'Class;
71 Item
: out Array_Type
;
75 (Strm
: access Root_Stream_Type
'Class;
78 end Stream_Ops_Internal
;
80 -------------------------
81 -- Stream_Ops_Internal --
82 -------------------------
84 package body Stream_Ops_Internal
is
86 -- The following value represents the number of BITS allocated for the
87 -- default block used in string IO. The sizes of all other types are
88 -- calculated relative to this value.
90 Default_Block_Size
: constant := 512 * 8;
92 -- Shorthand notation for stream element and element type sizes
94 ET_Size
: constant Integer := Element_Type
'Size;
95 SE_Size
: constant Integer := Stream_Element
'Size;
97 -- The following constants describe the number of array elements or
98 -- stream elements that can fit into a default block.
100 AE_In_Default_Block
: constant Index_Type
:=
101 Index_Type
(Default_Block_Size
/ ET_Size
);
102 -- Number of array elements in a default block
104 SE_In_Default_Block
: constant Integer := Default_Block_Size
/ SE_Size
;
105 -- Number of storage elements in a default block
109 subtype Default_Block
is Stream_Element_Array
110 (1 .. Stream_Element_Offset
(SE_In_Default_Block
));
112 subtype Array_Block
is
113 Array_Type
(Index_Type
range 1 .. AE_In_Default_Block
);
115 -- Conversions to and from Default_Block
117 function To_Default_Block
is
118 new Ada
.Unchecked_Conversion
(Array_Block
, Default_Block
);
120 function To_Array_Block
is
121 new Ada
.Unchecked_Conversion
(Default_Block
, Array_Block
);
128 (Strm
: access Root_Stream_Type
'Class;
130 Max_Length
: Long_Integer := Long_Integer'Last) return Array_Type
132 pragma Unsuppress
(All_Checks
);
133 -- The above makes T'Class'Input robust in the case of bad data. The
134 -- declaration of Item below could raise Storage_Error if the length
139 raise Constraint_Error
;
143 Low
, High
: Index_Type
'Base;
145 -- Read the bounds of the string. Note that they could be out of
146 -- range of Index_Type in the case of empty arrays.
148 Index_Type
'Read (Strm
, Low
);
149 Index_Type
'Read (Strm
, High
);
151 if Long_Integer (High
) - Long_Integer (Low
) > Max_Length
then
152 raise Constraint_Error
;
155 -- Read the character content of the string
158 Item
: Array_Type
(Low
.. High
);
160 Read
(Strm
, Item
, IO
);
171 (Strm
: access Root_Stream_Type
'Class;
177 raise Constraint_Error
;
180 -- Write the bounds of the string
182 Index_Type
'Write (Strm
, Item
'First);
183 Index_Type
'Write (Strm
, Item
'Last);
185 -- Write the character content of the string
187 Write
(Strm
, Item
, IO
);
195 (Strm
: access Root_Stream_Type
'Class;
196 Item
: out Array_Type
;
201 raise Constraint_Error
;
204 -- Nothing to do if the desired string is empty
206 if Item
'Length = 0 then
212 if IO
= Block_IO
and then Stream_Attributes
.Block_IO_OK
then
214 -- Determine the size in BITS of the block necessary to contain
216 -- Since we are dealing with strings indexed by natural, there
217 -- is no risk of overflow when using a Long_Long_Integer.
219 Block_Size
: constant Long_Long_Integer :=
220 Item
'Length * Long_Long_Integer (ET_Size
);
222 -- Item can be larger than what the default block can store,
223 -- determine the number of whole writes necessary to output the
226 Blocks
: constant Natural :=
227 Natural (Block_Size
/ Long_Long_Integer (Default_Block_Size
));
229 -- The size of Item may not be a multiple of the default block
230 -- size, determine the size of the remaining chunk.
232 Rem_Size
: constant Natural :=
234 (Block_Size
mod Long_Long_Integer (Default_Block_Size
));
238 Low
: Index_Type
:= Item
'First;
239 High
: Index_Type
:= Low
+ AE_In_Default_Block
- 1;
241 -- End of stream error detection
243 Last
: Stream_Element_Offset
:= 0;
244 Sum
: Stream_Element_Offset
:= 0;
247 -- Step 1: If the string is too large, read in individual
248 -- chunks the size of the default block.
252 Block
: Default_Block
;
255 for Counter
in 1 .. Blocks
loop
256 Read
(Strm
.all, Block
, Last
);
257 Item
(Low
.. High
) := To_Array_Block
(Block
);
260 High
:= Low
+ AE_In_Default_Block
- 1;
267 -- Step 2: Read in any remaining elements
271 subtype Rem_Block
is Stream_Element_Array
272 (1 .. Stream_Element_Offset
(Rem_Size
/ SE_Size
));
274 subtype Rem_Array_Block
is
275 Array_Type
(Index_Type
range
276 1 .. Index_Type
(Rem_Size
/ ET_Size
));
278 function To_Rem_Array_Block
is new
279 Ada
.Unchecked_Conversion
(Rem_Block
, Rem_Array_Block
);
284 Read
(Strm
.all, Block
, Last
);
285 Item
(Low
.. Item
'Last) := To_Rem_Array_Block
(Block
);
291 -- Step 3: Potential error detection. The sum of all the
292 -- chunks is less than we initially wanted to read. In other
293 -- words, the stream does not contain enough elements to fully
296 if (Integer (Sum
) * SE_Size
) / ET_Size
< Item
'Length then
307 for Index
in Item
'First .. Item
'Last loop
308 Element_Type
'Read (Strm
, E
);
320 (Strm
: access Root_Stream_Type
'Class;
326 raise Constraint_Error
;
329 -- Nothing to do if the input string is empty
331 if Item
'Length = 0 then
337 if IO
= Block_IO
and then Stream_Attributes
.Block_IO_OK
then
339 -- Determine the size in BITS of the block necessary to contain
341 -- Since we are dealing with strings indexed by natural, there
342 -- is no risk of overflow when using a Long_Long_Integer.
344 Block_Size
: constant Long_Long_Integer :=
345 Item
'Length * Long_Long_Integer (ET_Size
);
347 -- Item can be larger than what the default block can store,
348 -- determine the number of whole writes necessary to output the
351 Blocks
: constant Natural :=
352 Natural (Block_Size
/ Long_Long_Integer (Default_Block_Size
));
354 -- The size of Item may not be a multiple of the default block
355 -- size, determine the size of the remaining chunk.
357 Rem_Size
: constant Natural :=
359 (Block_Size
mod Long_Long_Integer (Default_Block_Size
));
363 Low
: Index_Type
:= Item
'First;
364 High
: Index_Type
:= Low
+ AE_In_Default_Block
- 1;
367 -- Step 1: If the string is too large, write out individual
368 -- chunks the size of the default block.
370 for Counter
in 1 .. Blocks
loop
371 Write
(Strm
.all, To_Default_Block
(Item
(Low
.. High
)));
373 High
:= Low
+ AE_In_Default_Block
- 1;
376 -- Step 2: Write out any remaining elements
380 subtype Rem_Block
is Stream_Element_Array
381 (1 .. Stream_Element_Offset
(Rem_Size
/ SE_Size
));
383 subtype Rem_Array_Block
is
384 Array_Type
(Index_Type
range
385 1 .. Index_Type
(Rem_Size
/ ET_Size
));
387 function To_Rem_Block
is new
388 Ada
.Unchecked_Conversion
(Rem_Array_Block
, Rem_Block
);
391 Write
(Strm
.all, To_Rem_Block
(Item
(Low
.. Item
'Last)));
399 for Index
in Item
'First .. Item
'Last loop
400 Element_Type
'Write (Strm
, Item
(Index
));
404 end Stream_Ops_Internal
;
406 -- Specific instantiations for all Ada array types handled
408 package Storage_Array_Ops
is
409 new Stream_Ops_Internal
410 (Element_Type
=> Storage_Element
,
411 Index_Type
=> Storage_Offset
,
412 Array_Type
=> Storage_Array
);
414 package Stream_Element_Array_Ops
is
415 new Stream_Ops_Internal
416 (Element_Type
=> Stream_Element
,
417 Index_Type
=> Stream_Element_Offset
,
418 Array_Type
=> Stream_Element_Array
);
420 package String_Ops
is
421 new Stream_Ops_Internal
422 (Element_Type
=> Character,
423 Index_Type
=> Positive,
424 Array_Type
=> String);
426 package Wide_String_Ops
is
427 new Stream_Ops_Internal
428 (Element_Type
=> Wide_Character,
429 Index_Type
=> Positive,
430 Array_Type
=> Wide_String);
432 package Wide_Wide_String_Ops
is
433 new Stream_Ops_Internal
434 (Element_Type
=> Wide_Wide_Character
,
435 Index_Type
=> Positive,
436 Array_Type
=> Wide_Wide_String
);
438 -------------------------
439 -- Storage_Array_Input --
440 -------------------------
442 function Storage_Array_Input
443 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class) return Storage_Array
446 return Storage_Array_Ops
.Input
(Strm
, Byte_IO
);
447 end Storage_Array_Input
;
449 --------------------------------
450 -- Storage_Array_Input_Blk_IO --
451 --------------------------------
453 function Storage_Array_Input_Blk_IO
454 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class) return Storage_Array
457 return Storage_Array_Ops
.Input
(Strm
, Block_IO
);
458 end Storage_Array_Input_Blk_IO
;
460 --------------------------
461 -- Storage_Array_Output --
462 --------------------------
464 procedure Storage_Array_Output
465 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
466 Item
: Storage_Array
)
469 Storage_Array_Ops
.Output
(Strm
, Item
, Byte_IO
);
470 end Storage_Array_Output
;
472 ---------------------------------
473 -- Storage_Array_Output_Blk_IO --
474 ---------------------------------
476 procedure Storage_Array_Output_Blk_IO
477 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
478 Item
: Storage_Array
)
481 Storage_Array_Ops
.Output
(Strm
, Item
, Block_IO
);
482 end Storage_Array_Output_Blk_IO
;
484 ------------------------
485 -- Storage_Array_Read --
486 ------------------------
488 procedure Storage_Array_Read
489 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
490 Item
: out Storage_Array
)
493 Storage_Array_Ops
.Read
(Strm
, Item
, Byte_IO
);
494 end Storage_Array_Read
;
496 -------------------------------
497 -- Storage_Array_Read_Blk_IO --
498 -------------------------------
500 procedure Storage_Array_Read_Blk_IO
501 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
502 Item
: out Storage_Array
)
505 Storage_Array_Ops
.Read
(Strm
, Item
, Block_IO
);
506 end Storage_Array_Read_Blk_IO
;
508 -------------------------
509 -- Storage_Array_Write --
510 -------------------------
512 procedure Storage_Array_Write
513 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
514 Item
: Storage_Array
)
517 Storage_Array_Ops
.Write
(Strm
, Item
, Byte_IO
);
518 end Storage_Array_Write
;
520 --------------------------------
521 -- Storage_Array_Write_Blk_IO --
522 --------------------------------
524 procedure Storage_Array_Write_Blk_IO
525 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
526 Item
: Storage_Array
)
529 Storage_Array_Ops
.Write
(Strm
, Item
, Block_IO
);
530 end Storage_Array_Write_Blk_IO
;
532 --------------------------------
533 -- Stream_Element_Array_Input --
534 --------------------------------
536 function Stream_Element_Array_Input
537 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class)
538 return Stream_Element_Array
541 return Stream_Element_Array_Ops
.Input
(Strm
, Byte_IO
);
542 end Stream_Element_Array_Input
;
544 ---------------------------------------
545 -- Stream_Element_Array_Input_Blk_IO --
546 ---------------------------------------
548 function Stream_Element_Array_Input_Blk_IO
549 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class)
550 return Stream_Element_Array
553 return Stream_Element_Array_Ops
.Input
(Strm
, Block_IO
);
554 end Stream_Element_Array_Input_Blk_IO
;
556 ---------------------------------
557 -- Stream_Element_Array_Output --
558 ---------------------------------
560 procedure Stream_Element_Array_Output
561 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
562 Item
: Stream_Element_Array
)
565 Stream_Element_Array_Ops
.Output
(Strm
, Item
, Byte_IO
);
566 end Stream_Element_Array_Output
;
568 ----------------------------------------
569 -- Stream_Element_Array_Output_Blk_IO --
570 ----------------------------------------
572 procedure Stream_Element_Array_Output_Blk_IO
573 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
574 Item
: Stream_Element_Array
)
577 Stream_Element_Array_Ops
.Output
(Strm
, Item
, Block_IO
);
578 end Stream_Element_Array_Output_Blk_IO
;
580 -------------------------------
581 -- Stream_Element_Array_Read --
582 -------------------------------
584 procedure Stream_Element_Array_Read
585 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
586 Item
: out Stream_Element_Array
)
589 Stream_Element_Array_Ops
.Read
(Strm
, Item
, Byte_IO
);
590 end Stream_Element_Array_Read
;
592 --------------------------------------
593 -- Stream_Element_Array_Read_Blk_IO --
594 --------------------------------------
596 procedure Stream_Element_Array_Read_Blk_IO
597 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
598 Item
: out Stream_Element_Array
)
601 Stream_Element_Array_Ops
.Read
(Strm
, Item
, Block_IO
);
602 end Stream_Element_Array_Read_Blk_IO
;
604 --------------------------------
605 -- Stream_Element_Array_Write --
606 --------------------------------
608 procedure Stream_Element_Array_Write
609 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
610 Item
: Stream_Element_Array
)
613 Stream_Element_Array_Ops
.Write
(Strm
, Item
, Byte_IO
);
614 end Stream_Element_Array_Write
;
616 ---------------------------------------
617 -- Stream_Element_Array_Write_Blk_IO --
618 ---------------------------------------
620 procedure Stream_Element_Array_Write_Blk_IO
621 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
622 Item
: Stream_Element_Array
)
625 Stream_Element_Array_Ops
.Write
(Strm
, Item
, Block_IO
);
626 end Stream_Element_Array_Write_Blk_IO
;
632 function String_Input
633 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class) return String
636 return String_Ops
.Input
(Strm
, Byte_IO
);
639 -------------------------
640 -- String_Input_Blk_IO --
641 -------------------------
643 function String_Input_Blk_IO
644 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class) return String
647 return String_Ops
.Input
(Strm
, Block_IO
);
648 end String_Input_Blk_IO
;
650 -------------------------
651 -- String_Input_Tag --
652 -------------------------
654 function String_Input_Tag
655 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class) return String
658 return String_Ops
.Input
(Strm
, Block_IO
, Max_Length
=> 10_000
);
659 end String_Input_Tag
;
665 procedure String_Output
666 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
670 String_Ops
.Output
(Strm
, Item
, Byte_IO
);
673 --------------------------
674 -- String_Output_Blk_IO --
675 --------------------------
677 procedure String_Output_Blk_IO
678 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
682 String_Ops
.Output
(Strm
, Item
, Block_IO
);
683 end String_Output_Blk_IO
;
689 procedure String_Read
690 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
694 String_Ops
.Read
(Strm
, Item
, Byte_IO
);
697 ------------------------
698 -- String_Read_Blk_IO --
699 ------------------------
701 procedure String_Read_Blk_IO
702 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
706 String_Ops
.Read
(Strm
, Item
, Block_IO
);
707 end String_Read_Blk_IO
;
713 procedure String_Write
714 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
718 String_Ops
.Write
(Strm
, Item
, Byte_IO
);
721 -------------------------
722 -- String_Write_Blk_IO --
723 -------------------------
725 procedure String_Write_Blk_IO
726 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
730 String_Ops
.Write
(Strm
, Item
, Block_IO
);
731 end String_Write_Blk_IO
;
733 -----------------------
734 -- Wide_String_Input --
735 -----------------------
737 function Wide_String_Input
738 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class) return Wide_String
741 return Wide_String_Ops
.Input
(Strm
, Byte_IO
);
742 end Wide_String_Input
;
744 ------------------------------
745 -- Wide_String_Input_Blk_IO --
746 ------------------------------
748 function Wide_String_Input_Blk_IO
749 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class) return Wide_String
752 return Wide_String_Ops
.Input
(Strm
, Block_IO
);
753 end Wide_String_Input_Blk_IO
;
755 ------------------------
756 -- Wide_String_Output --
757 ------------------------
759 procedure Wide_String_Output
760 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
764 Wide_String_Ops
.Output
(Strm
, Item
, Byte_IO
);
765 end Wide_String_Output
;
767 -------------------------------
768 -- Wide_String_Output_Blk_IO --
769 -------------------------------
771 procedure Wide_String_Output_Blk_IO
772 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
776 Wide_String_Ops
.Output
(Strm
, Item
, Block_IO
);
777 end Wide_String_Output_Blk_IO
;
779 ----------------------
780 -- Wide_String_Read --
781 ----------------------
783 procedure Wide_String_Read
784 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
785 Item
: out Wide_String)
788 Wide_String_Ops
.Read
(Strm
, Item
, Byte_IO
);
789 end Wide_String_Read
;
791 -----------------------------
792 -- Wide_String_Read_Blk_IO --
793 -----------------------------
795 procedure Wide_String_Read_Blk_IO
796 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
797 Item
: out Wide_String)
800 Wide_String_Ops
.Read
(Strm
, Item
, Block_IO
);
801 end Wide_String_Read_Blk_IO
;
803 -----------------------
804 -- Wide_String_Write --
805 -----------------------
807 procedure Wide_String_Write
808 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
812 Wide_String_Ops
.Write
(Strm
, Item
, Byte_IO
);
813 end Wide_String_Write
;
815 ------------------------------
816 -- Wide_String_Write_Blk_IO --
817 ------------------------------
819 procedure Wide_String_Write_Blk_IO
820 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
824 Wide_String_Ops
.Write
(Strm
, Item
, Block_IO
);
825 end Wide_String_Write_Blk_IO
;
827 ----------------------------
828 -- Wide_Wide_String_Input --
829 ----------------------------
831 function Wide_Wide_String_Input
832 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class) return Wide_Wide_String
835 return Wide_Wide_String_Ops
.Input
(Strm
, Byte_IO
);
836 end Wide_Wide_String_Input
;
838 -----------------------------------
839 -- Wide_Wide_String_Input_Blk_IO --
840 -----------------------------------
842 function Wide_Wide_String_Input_Blk_IO
843 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class) return Wide_Wide_String
846 return Wide_Wide_String_Ops
.Input
(Strm
, Block_IO
);
847 end Wide_Wide_String_Input_Blk_IO
;
849 -----------------------------
850 -- Wide_Wide_String_Output --
851 -----------------------------
853 procedure Wide_Wide_String_Output
854 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
855 Item
: Wide_Wide_String
)
858 Wide_Wide_String_Ops
.Output
(Strm
, Item
, Byte_IO
);
859 end Wide_Wide_String_Output
;
861 ------------------------------------
862 -- Wide_Wide_String_Output_Blk_IO --
863 ------------------------------------
865 procedure Wide_Wide_String_Output_Blk_IO
866 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
867 Item
: Wide_Wide_String
)
870 Wide_Wide_String_Ops
.Output
(Strm
, Item
, Block_IO
);
871 end Wide_Wide_String_Output_Blk_IO
;
873 ---------------------------
874 -- Wide_Wide_String_Read --
875 ---------------------------
877 procedure Wide_Wide_String_Read
878 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
879 Item
: out Wide_Wide_String
)
882 Wide_Wide_String_Ops
.Read
(Strm
, Item
, Byte_IO
);
883 end Wide_Wide_String_Read
;
885 ----------------------------------
886 -- Wide_Wide_String_Read_Blk_IO --
887 ----------------------------------
889 procedure Wide_Wide_String_Read_Blk_IO
890 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
891 Item
: out Wide_Wide_String
)
894 Wide_Wide_String_Ops
.Read
(Strm
, Item
, Block_IO
);
895 end Wide_Wide_String_Read_Blk_IO
;
897 ----------------------------
898 -- Wide_Wide_String_Write --
899 ----------------------------
901 procedure Wide_Wide_String_Write
902 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
903 Item
: Wide_Wide_String
)
906 Wide_Wide_String_Ops
.Write
(Strm
, Item
, Byte_IO
);
907 end Wide_Wide_String_Write
;
909 -----------------------------------
910 -- Wide_Wide_String_Write_Blk_IO --
911 -----------------------------------
913 procedure Wide_Wide_String_Write_Blk_IO
914 (Strm
: access Ada
.Streams
.Root_Stream_Type
'Class;
915 Item
: Wide_Wide_String
)
918 Wide_Wide_String_Ops
.Write
(Strm
, Item
, Block_IO
);
919 end Wide_Wide_String_Write_Blk_IO
;
921 end System
.Strings
.Stream_Ops
;