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

Function ops_push

internal/cbm/pdf/pdf_text.c:558–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556} ops_t;
557
558static bool ops_push(pdf_doc_t *d, ops_t *o, pdf_val_t *x) {
559 if (o->n == o->cap) {
560 int ncap = o->cap ? o->cap * 2 : PDF_OPS_MIN;
561 pdf_val_t **g = (pdf_val_t **)cbm_realloc(CBM_MEM_CLASS_EXTRACT, (void *)o->v,
562 (size_t)ncap * sizeof(*g));
563 if (!g) {
564 d->nomem = true;
565 return false;
566 }
567 o->v = g;
568 o->cap = ncap;
569 }
570 o->v[o->n++] = x;
571 return true;
572}
573
574static void tlm_next_line(const pdf_gs_t *gs, double *tm, double *tlm) {
575 double e = -gs->tl * tlm[2] + tlm[4];

Callers 1

runFunction · 0.85

Calls 1

cbm_reallocFunction · 0.85

Tested by

no test coverage detected