comparison tango/tango/io/Buffer.d @ 136:0e28624814e8 trunk

[svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though
author lindquist
date Thu, 17 Jan 2008 03:15:12 +0100
parents 1700239cab2e
children ce7b81fb957f
comparison
equal deleted inserted replaced
135:176bd52b3cf5 136:0e28624814e8
23 ******************************************************************************/ 23 ******************************************************************************/
24 24
25 extern (C) 25 extern (C)
26 { 26 {
27 protected void * memcpy (void *dst, void *src, uint); 27 protected void * memcpy (void *dst, void *src, uint);
28 private int printf(char*, ...);
28 } 29 }
29 30
30 /******************************************************************************* 31 /*******************************************************************************
31 32
32 Buffer is central concept in Tango I/O. Each buffer acts 33 Buffer is central concept in Tango I/O. Each buffer acts
161 162
162 ***********************************************************************/ 163 ***********************************************************************/
163 164
164 this (IConduit conduit) 165 this (IConduit conduit)
165 { 166 {
167 printf("Buffer.this(%p)\n", conduit);
168 assert (conduit !is null);
166 assert (conduit); 169 assert (conduit);
167 170
168 this (conduit.bufferSize); 171 this (conduit.bufferSize);
169 setConduit (conduit); 172 setConduit (conduit);
173
174 assert(this !is null);
170 } 175 }
171 176
172 /*********************************************************************** 177 /***********************************************************************
173 178
174 Construct a buffer 179 Construct a buffer
219 224
220 ***********************************************************************/ 225 ***********************************************************************/
221 226
222 this (uint capacity = 0) 227 this (uint capacity = 0)
223 { 228 {
224 setContent (new ubyte[capacity], 0); 229 setContent (new ubyte[capacity], 0);
230 assert(this !is null);
225 } 231 }
226 232
227 /*********************************************************************** 233 /***********************************************************************
228 234
229 Construct a buffer 235 Construct a buffer