Changeset 2898
- Timestamp:
- 11/19/07 23:04:55 (1 year ago)
- Files:
-
- trunk/tango/io/MappedBuffer.d (modified) (2 diffs)
- trunk/tango/io/model/IConduit.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tango/io/MappedBuffer.d
r2891 r2898 217 217 ***********************************************************************/ 218 218 219 uint seek (uint offset, IConduit.Seek.Anchor anchor)219 long seek (long offset, Anchor anchor = Anchor.Begin) 220 220 { 221 221 uint pos = dimension; 222 222 223 if (anchor is IConduit.Seek.Anchor.Begin)224 pos = offset;223 if (anchor is Anchor.Begin) 224 pos = cast(uint) offset; 225 225 else 226 if (anchor is IConduit.Seek.Anchor.End)227 pos -= offset;226 if (anchor is Anchor.End) 227 pos -= cast(uint) offset; 228 228 else 229 pos = index + offset;229 pos = index + cast(uint) offset; 230 230 231 231 return index = pos; … … 321 321 } 322 322 } 323 324 325 debug (MappedBuffer) 326 { 327 void main() 328 { 329 auto x = new MappedBuffer(null); 330 } 331 } trunk/tango/io/model/IConduit.d
r2888 r2898 110 110 111 111 /*************************************************************** 112 113 Return current conduit position (e.g. file position)114 115 ***************************************************************/116 117 long position ();118 119 /***************************************************************120 112 121 113 Move the file position to the given offset from the












