package alba
Alba compiler
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.4.3.tar.gz
sha256=062f33c55ef39706c4290dff67d5a00bf009051fd757f9352be527f629ae21fc
md5=eb4edc4d6b7e15b83d6397bd34994153
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)"
>