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

Function fixture_pdf

internal/cbm/doc_pdf.c:1298–1323  ·  view source on GitHub ↗

R1: the field test's category(): a PDF under a test or fixture directory. */

Source from the content-addressed store, hash-verified

1296
1297/* R1: the field test's category(): a PDF under a test or fixture directory. */
1298static bool fixture_pdf(const char *rel_path) {
1299 const char *s = rel_path;
1300 for (;;) {
1301 const char *slash = strchr(s, '/');
1302 if (!slash) {
1303 return false;
1304 }
1305 size_t n = (size_t)(slash - s);
1306 char comp[256];
1307 if (n < sizeof(comp)) {
1308 for (size_t i = 0; i < n; i++) {
1309 comp[i] = (char)(s[i] >= 'A' && s[i] <= 'Z' ? s[i] + ('a' - 'A') : s[i]);
1310 }
1311 comp[n] = '\0';
1312 for (int i = 0; FIXTURE_DIRS[i]; i++) {
1313 if (strcmp(comp, FIXTURE_DIRS[i]) == 0) {
1314 return true;
1315 }
1316 }
1317 if (strstr(comp, "test") && strcmp(comp, "testing") != 0) {
1318 return true;
1319 }
1320 }
1321 s = slash + 1;
1322 }
1323}
1324
1325/* A page's docstring (its snippet): the page text, up to PDF_PAGE_DOC_MAX bytes
1326 * cut on a character boundary and then said so. A page holds a few kilobytes;

Callers 1

cbm_pdf_extract_documentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected