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

Function skip_inline_image

internal/cbm/pdf/pdf_text.c:533–550  ·  view source on GitHub ↗

"[ws]EI" followed by whitespace or the end, from p: the position after EI. */

Source from the content-addressed store, hash-verified

531
532/* "[ws]EI" followed by whitespace or the end, from p: the position after EI. */
533static size_t skip_inline_image(const unsigned char *data, size_t len, size_t from) {
534 for (size_t i = from; i + 3 <= len; i++) {
535 unsigned char c = data[i];
536 bool ws = c == 0 || c == '\t' || c == '\n' || c == '\f' || c == '\r' || c == ' ';
537 if (!ws || data[i + 1] != 'E' || data[i + 2] != 'I') {
538 continue;
539 }
540 size_t e = i + 3;
541 if (e == len) {
542 return e;
543 }
544 unsigned char x = data[e];
545 if (x == 0 || x == '\t' || x == '\n' || x == '\f' || x == '\r' || x == ' ') {
546 return e;
547 }
548 }
549 return len;
550}
551
552typedef struct {
553 pdf_val_t **v;

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected