package alba
Alba compiler
Install
Dune Dependency
Authors
Maintainers
Sources
0.4.2.tar.gz
sha256=203ee151ce793a977b2d3e66f8b3a0cd7a82cc7f15550c63d88cb30c71eb5f95
md5=64367c393f80ca784f88d07155da4fb0
doc/alba.fmlib_node/Fmlib_node/Io_buffer/index.html
Module Fmlib_node.Io_buffer
Source
An IO buffer is an array of bytes
b0 b1 b2 ... br ... bw ... bn-1 ^ ^ ^ rp wp n rp: read pointer wp: write pointer n: size of the buffer Invariant: 0 <= rp <= wp <= n rp = wp: no more to read wp = n: buffer is full
The type of the buffer.
alloc size
allocates an io buffer of size
and set its read pointer and write pointer to 0.
getc b
reads the character at the read pointer of the buffer b
, advances the read pointer and returns the character. If the read pointer is at the position of the write pointer, then None
is retured.
putc b ch
appends the character c
at the position of the write pointer and advances the write pointer. If the write pointer is already at the end None
is returned.
The javascript buffer object.
copy src s0 s1 dst d0
copies the data from the buffer src
between position s0
and s1
(excluding s1
to the buffer dst
starting at position d0
. Overlapping is handled properly.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>