| 556 | } ops_t; |
| 557 | |
| 558 | static 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 | |
| 574 | static void tlm_next_line(const pdf_gs_t *gs, double *tm, double *tlm) { |
| 575 | double e = -gs->tl * tlm[2] + tlm[4]; |