Word Unperfect
public
Read
Owner: themaster
Branch: main
Commits: 0
Git CLI clone URL
git clone https://www.xt-emporium.com/git/word-unperfect.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
word-unperfect
/
rev
/
wp_record_parser.h
File editor
#ifndef WP_RECORD_PARSER_H #define WP_RECORD_PARSER_H #include "wp_layout_shared.h" #include <stdbool.h> typedef struct WpDisplayBuffer WpDisplayBuffer; /* WP 5.1 Code types */ typedef enum { WP_CODE_CHAR, /* Normal ASCII character */ WP_CODE_SINGLE_BYTE, /* Single-byte formatting code (0x80-0xBF) */ WP_CODE_FIXED_LENGTH, /* Reserved for translated fixed-size code tables */ WP_CODE_VARIABLE_LENGTH /* Variable-length multi-byte code ([Code]...[Code]) */ } WpCodeType; typedef struct WpRecord { WpCodeType type; uint8_t code; uint8_t sub_code; /* Variable-length sub-code, zero otherwise. */ uint16_t length; /* Bytes actually consumed from the stream. */ uint16_t declared_length; /* Payload length declared in the WP record header. */ uint16_t data_length; /* Payload bytes copied into data. */ bool is_complete; /* False when the input ended inside the record. */ bool trailer_present; /* True when a full trailing mirror was available. */ bool trailer_matches; /* True when trailing len/sub/code mirrors the header. */ uint8_t *data; /* Payload bytes for variable-length records. */ } WpRecord; /* Function to peek at the next record in the stream */ WpCodeType wp_parser_peek_record_type(WpLayoutGlobals *wl, uint8_t code); /* Function to parse the next record from the primary buffer */ void wp_parser_consume_record(WpLayoutGlobals *wl, WpRecord *record); /* Release any heap data attached to a parsed record and reset it. */ void wp_record_free(WpRecord *record); /* Reveal Codes UI (implementation in wp_display_buffer.c). */ void wp_reveal_codes_sync_view(WpLayoutGlobals *wl, WpDisplayBuffer *db); #endif
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
main
Visibility
public
Your access
Read
Remote
None
File activity
View file history