diff options
Diffstat (limited to 'contrib/ada/zlib-streams.adb')
-rw-r--r-- | contrib/ada/zlib-streams.adb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/contrib/ada/zlib-streams.adb b/contrib/ada/zlib-streams.adb index d213b5c..398664a 100644 --- a/contrib/ada/zlib-streams.adb +++ b/contrib/ada/zlib-streams.adb | |||
@@ -6,7 +6,7 @@ | |||
6 | -- Open source license information is in the zlib.ads file. -- | 6 | -- Open source license information is in the zlib.ads file. -- |
7 | ---------------------------------------------------------------- | 7 | ---------------------------------------------------------------- |
8 | 8 | ||
9 | -- $Id: zlib-streams.adb,v 1.9 2003/08/12 13:15:31 vagul Exp $ | 9 | -- $Id: zlib-streams.adb,v 1.10 2004/05/31 10:53:40 vagul Exp $ |
10 | 10 | ||
11 | with Ada.Unchecked_Deallocation; | 11 | with Ada.Unchecked_Deallocation; |
12 | 12 | ||
@@ -90,6 +90,7 @@ package body ZLib.Streams is | |||
90 | 90 | ||
91 | Stream.Buffer := new Buffer_Subtype; | 91 | Stream.Buffer := new Buffer_Subtype; |
92 | Stream.Rest_First := Stream.Buffer'Last + 1; | 92 | Stream.Rest_First := Stream.Buffer'Last + 1; |
93 | Stream.Rest_Last := Stream.Buffer'Last; | ||
93 | end if; | 94 | end if; |
94 | end Create; | 95 | end Create; |
95 | 96 | ||
@@ -113,6 +114,15 @@ package body ZLib.Streams is | |||
113 | end loop; | 114 | end loop; |
114 | end Flush; | 115 | end Flush; |
115 | 116 | ||
117 | ------------- | ||
118 | -- Is_Open -- | ||
119 | ------------- | ||
120 | |||
121 | function Is_Open (Stream : Stream_Type) return Boolean is | ||
122 | begin | ||
123 | return Is_Open (Stream.Reader) or else Is_Open (Stream.Writer); | ||
124 | end Is_Open; | ||
125 | |||
116 | ---------- | 126 | ---------- |
117 | -- Read -- | 127 | -- Read -- |
118 | ---------- | 128 | ---------- |
@@ -212,4 +222,4 @@ package body ZLib.Streams is | |||
212 | return Total_Out (Stream.Writer); | 222 | return Total_Out (Stream.Writer); |
213 | end Write_Total_Out; | 223 | end Write_Total_Out; |
214 | 224 | ||
215 | end ZLib.Streams; | 225 | end ZLib.Streams; \ No newline at end of file |