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

Function yaml_count_lines

src/cli/config_yaml_edit.c:1072–1083  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1070}
1071
1072static size_t yaml_count_lines(const yaml_doc_t *doc) {
1073 if (doc->len == 0U) {
1074 return 0U;
1075 }
1076 size_t count = YAML_UNIT;
1077 for (size_t i = 0; i + YAML_UNIT < doc->len; i++) {
1078 if (doc->data[i] == '\n') {
1079 count++;
1080 }
1081 }
1082 return count;
1083}
1084
1085static size_t yaml_parse_line(const yaml_doc_t *doc, size_t start, yaml_line_t *line) {
1086 size_t end = start;

Callers 1

yaml_build_linesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected