MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / toml_next_line

Function toml_next_line

src/cli/config_toml_edit.c:724–740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722#endif
723
724static int toml_next_line(const char *data, size_t len, size_t *cursor, toml_line_t *line) {
725 if (!data || !cursor || !line || *cursor >= len) {
726 return 0;
727 }
728 size_t pos = *cursor;
729 line->start = pos;
730 while (pos < len && data[pos] != '\n') {
731 ++pos;
732 }
733 line->content_end = pos;
734 if (line->content_end > line->start && data[line->content_end - 1] == '\r') {
735 --line->content_end;
736 }
737 line->full_end = pos < len ? pos + 1 : pos;
738 *cursor = line->full_end;
739 return 1;
740}
741
742static int toml_line_equals(const char *data, const toml_line_t *line, const char *value) {
743 size_t start = line->start;

Callers 13

toml_find_markersFunction · 0.85
toml_scan_named_tablesFunction · 0.85
toml_validate_table_bodyFunction · 0.85
toml_merge_named_tableFunction · 0.85
toml_codex_owned_spanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected