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

Function mk_words

src/pipeline/pass_shell.c:2951–2967  ·  view source on GitHub ↗

`cmd` is exactly the words `words` (NULL-terminated), however spaced. */

Source from the content-addressed store, hash-verified

2949
2950/* `cmd` is exactly the words `words` (NULL-terminated), however spaced. */
2951static bool mk_words(const char *cmd, const char *const *words) {
2952 const char *p = cmd;
2953 for (int i = 0; words[i]; i++) {
2954 while (*p == ' ' || *p == '\t') {
2955 p++;
2956 }
2957 size_t wl = strlen(words[i]);
2958 if (strncmp(p, words[i], wl) != 0 || (p[wl] && p[wl] != ' ' && p[wl] != '\t')) {
2959 return false;
2960 }
2961 p += wl;
2962 }
2963 while (*p == ' ' || *p == '\t') {
2964 p++;
2965 }
2966 return *p == '\0';
2967}
2968
2969/* $(NAME) / ${NAME} / $(shell pwd) / $(abspath X): its expansion. */
2970static const char *mk_reference(mk_t *m, const char *ref) {

Callers 1

mk_referenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected