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

Function cs_skip_space

internal/cbm/doclink_cs.c:1828–1850  ·  view source on GitHub ↗

Past whitespace and comments. */

Source from the content-addressed store, hash-verified

1826
1827/* Past whitespace and comments. */
1828static uint32_t cs_skip_space(const char *src, uint32_t i, uint32_t n) {
1829 for (;;) {
1830 while (i < n && isspace((unsigned char)src[i])) {
1831 i++;
1832 }
1833 if (i + SKIP_ONE >= n || src[i] != '/') {
1834 return i;
1835 }
1836 if (src[i + SKIP_ONE] == '/') {
1837 while (i < n && src[i] != '\n') {
1838 i++;
1839 }
1840 } else if (src[i + SKIP_ONE] == '*') {
1841 i += PAIR_LEN;
1842 while (i + SKIP_ONE < n && !(src[i] == '*' && src[i + SKIP_ONE] == '/')) {
1843 i++;
1844 }
1845 i = i + PAIR_LEN <= n ? i + PAIR_LEN : n;
1846 } else {
1847 return i;
1848 }
1849 }
1850}
1851
1852static bool cs_word_char(unsigned char c) {
1853 return isalnum(c) || c == '_' || c >= 0x80;

Callers 7

cs_namespace_name_startFunction · 0.85
cs_namespace_name_dupFunction · 0.85
cs_namespace_header_endFunction · 0.85
cs_text_tparamsFunction · 0.85
cs_text_bodyFunction · 0.85
cs_text_itemFunction · 0.85
cs_namespace_braceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected