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

Function yaml_count_lines

src/cli/config_yaml_edit.c:1021–1032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1019}
1020
1021static size_t yaml_count_lines(const yaml_doc_t *doc) {
1022 if (doc->len == 0U) {
1023 return 0U;
1024 }
1025 size_t count = YAML_UNIT;
1026 for (size_t i = 0; i + YAML_UNIT < doc->len; i++) {
1027 if (doc->data[i] == '\n') {
1028 count++;
1029 }
1030 }
1031 return count;
1032}
1033
1034static size_t yaml_parse_line(const yaml_doc_t *doc, size_t start, yaml_line_t *line) {
1035 size_t end = start;

Callers 1

yaml_build_linesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected