rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
text_buf_t Struct Reference

The buffer. Read it through the functions; the fields are open only so the caller can place it. More...

#include <text_buf.h>

Data Fields

uint8_t * mem
size_t cap
uint32_t * ends
size_t ends_cap
size_t n_ends
size_t gap_at
size_t gap_len
size_t len
size_t limit
size_t cursor
size_t kinds [TEXT_EOL_KINDS]
text_eol_t eol
uint32_t revision
bool bom
bool dirty

Detailed Description

The buffer. Read it through the functions; the fields are open only so the caller can place it.

Field Documentation

◆ bom

bool text_buf_t::bom

the file starts with a BOM

◆ cap

size_t text_buf_t::cap

their count

◆ cursor

size_t text_buf_t::cursor

the cursor, a text offset at a unit's start

◆ dirty

bool text_buf_t::dirty

edited since the load or text_buf_saved()

◆ ends

uint32_t* text_buf_t::ends

per line end, the start of the line after it, with its kind in the top 2 bits

◆ ends_cap

size_t text_buf_t::ends_cap

index entries, at most TEXT_BUF_ENDS_MAX

◆ eol

text_eol_t text_buf_t::eol

the file's kind of line end

◆ gap_at

size_t text_buf_t::gap_at

text bytes before the gap

◆ gap_len

size_t text_buf_t::gap_len

bytes of the gap

◆ kinds

size_t text_buf_t::kinds[TEXT_EOL_KINDS]

line ends of each kind

◆ len

size_t text_buf_t::len

text bytes, the BOM not counted

◆ limit

size_t text_buf_t::limit

text bytes at most

◆ mem

uint8_t* text_buf_t::mem

the caller's bytes

◆ n_ends

size_t text_buf_t::n_ends

line ends in the text

◆ revision

uint32_t text_buf_t::revision

moves on with every edit and load


The documentation for this struct was generated from the following file: