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

Function adr_none_value

internal/cbm/doc_adr.c:1093–1106  ·  view source on GitHub ↗

The field's value is "none" or "n/a" (`Supersedes: none (it extends ADR * 0031)`): the record states no relation, and the records it goes on to name * are extended or refined (a held-out audit's most frequent error). */

Source from the content-addressed store, hash-verified

1091 * 0031)`): the record states no relation, and the records it goes on to name
1092 * are extended or refined (a held-out audit's most frequent error). */
1093static bool adr_none_value(const char *s, size_t n) {
1094 size_t i = 0;
1095 while (i < n && (adr_blank(s[i]) || s[i] == ':' || s[i] == '*' || s[i] == '_')) {
1096 i++;
1097 }
1098 static const char *const none[] = {"none", "n/a", NULL};
1099 for (size_t k = 0; none[k]; k++) {
1100 size_t w = strlen(none[k]);
1101 if (adr_starts_ci(s + i, n - i, none[k]) && (i + w == n || !adr_alpha(s[i + w]))) {
1102 return true;
1103 }
1104 }
1105 return false;
1106}
1107
1108/* Another record is the phrase's subject (`ADR 0239 supersedes ADR 0203`, a
1109 * table cell `0259 (supersedes ADR 0114's ...)`, a link to a record before

Callers 1

adr_relationsFunction · 0.85

Calls 3

adr_blankFunction · 0.85
adr_starts_ciFunction · 0.85
adr_alphaFunction · 0.85

Tested by

no test coverage detected