A unit of the table and the class of a number in it.
Definition text_hl.h:130
The verdict words, one list per class. Any list may be empty.
Definition text_hl.h:120
text_hl_class_t
The class of a span, in the order of TEXT_HL_CLASS_ROWS.
Definition text_hl.h:106
const char * text_hl_word_core(const char *s, size_t *len)
The word a writer's string gives: spaces taken off both ends, a "Label:" and the spaces after it take...
Definition text_hl.c:184
#define TEXT_HL_UNIT_COUNT
Rows of text_hl_units.
Definition text_hl.h:136
text_hl_kind_t
How a file's lines are classed. The numbers are stable.
Definition text_hl.h:112
#define TEXT_HL_CLASS_ROWS(X)
Every class of a span, one row each: X(name, css, role).
Definition text_hl.h:82
const char * text_hl_class_css(text_hl_class_t cls)
The style sheet's name of a class (TEXT_HL_CLASS_ROWS).
Definition text_hl.c:276
text_hl_kind_t text_hl_kind_of(const char *name)
How a file is classed, by its name: ".json" JSON, ".csv" CSV, ".txt" TEXT, in any case,...
Definition text_hl.c:769
size_t text_hl_line(const char *line, size_t len, size_t line_no, text_hl_kind_t kind, const text_hl_words_t *words, text_hl_span_t *out, size_t cap)
The spans of one line.
Definition text_hl.c:700
#define TEXT_HL_CLASS_ENUM(name, css, role)
Expands a row of TEXT_HL_CLASS_ROWS to its enum entry.
Definition text_hl.h:103
const text_hl_unit_t text_hl_units[TEXT_HL_UNIT_COUNT]
The units a number may carry, case as written: V mV A mA W rpm Hz us ms s /s deg Grad % mOhm B kB MB ...
Definition text_hl.c:27
text_hl_class_t text_hl_unit_class(const char *unit, size_t len)
The class of a unit of the table.
Definition text_hl.c:262