Handbook
Glossary
buffer-write ( c-ptr n buffer: buffer -- )
Factor handbook
»
The language
»
Collections
»
Locked I/O buffers
Prev:
buffer-write1 ( byte: fixnum buffer: buffer -- )
Next:
buffer+ ( n: fixnum buffer: buffer -- )
Vocabulary
io
.
buffers
Inputs
c-ptr
a
c-ptr
n
a
fixnum
buffer
a
buffer
Outputs
None
Word description
Copies a
c-ptr
to the buffer's fill pointer, and advances it accordingly.
Warning
This word will corrupt memory if writing more than the space available in the buffer.
Definition
USING:
kernel
libc
typed
;
IN:
io.buffers
TYPED:
buffer-write
( c-ptr n buffer: buffer -- )
[
buffer-end
-rot
memcpy
]
[
buffer+
]
2bi
;
inline