Handbook
Glossary
buffer-consume ( n: fixnum buffer: buffer -- )
Vocabulary
io
.
buffers
Inputs
n
a non-negative integer
buffer
a
buffer
Outputs
None
Word description
Moves the position forward by
n
bytes. If it exceeds the fill pointer, both are reset to 0.
Definition
USING:
accessors
kernel
math
math.private
typed
;
IN:
io.buffers
TYPED:
buffer-consume
( n: fixnum buffer: buffer -- )
[
fixnum+fast
]
change-pos
dup
[
pos>>
]
[
fill>>
]
bi
<
[
0
>>pos
0
>>fill
]
unless
drop
;
inline