c0
C0DATA — structured data using ASCII C0 control codes (C)
Loading...
Searching...
No Matches
c0_stream Struct Reference

A scan of an append-only log. More...

#include <c0.h>

Data Fields

const uint8_t * buf
size_t len
size_t committed_end
 just past the last ETB and its payload
int torn
size_t block_count
size_t damaged_count
int has_damaged
 whether any block is damaged
size_t first_damaged
 index of the first damaged block
size_t resume_offset
 the offset after that block's ETB and payload, where reading can go on

Detailed Description

A scan of an append-only log.

An unescaped ETB is always a commit, inside text or a level too. A committed block that is not well-formed, cut by its ETB or holding any other error, is damaged: it delivers nothing and adds nothing to the parse state. The tail after the last commit is torn unless it holds only layout, notes, EOT or EM.

Field Documentation

◆ block_count

size_t c0_stream::block_count

◆ buf

const uint8_t* c0_stream::buf

◆ committed_end

size_t c0_stream::committed_end

just past the last ETB and its payload

◆ damaged_count

size_t c0_stream::damaged_count

◆ first_damaged

size_t c0_stream::first_damaged

index of the first damaged block

◆ has_damaged

int c0_stream::has_damaged

whether any block is damaged

◆ len

size_t c0_stream::len

◆ resume_offset

size_t c0_stream::resume_offset

the offset after that block's ETB and payload, where reading can go on

◆ torn

int c0_stream::torn

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