(number, position) pairs, sorted to find the first of a number. */
| 1237 | |
| 1238 | /* (number, position) pairs, sorted to find the first of a number. */ |
| 1239 | static int numidx_cmp(const void *x, const void *y) { |
| 1240 | const pdf_numidx_t *a = (const pdf_numidx_t *)x; |
| 1241 | const pdf_numidx_t *b = (const pdf_numidx_t *)y; |
| 1242 | if (a->num != b->num) { |
| 1243 | return a->num < b->num ? -1 : 1; |
| 1244 | } |
| 1245 | return a->idx < b->idx ? -1 : a->idx > b->idx ? 1 : 0; |
| 1246 | } |
| 1247 | |
| 1248 | /* The first pair of `num` in a sorted array; n when none. */ |
| 1249 | static int numidx_first(const pdf_numidx_t *v, int n, int64_t num) { |
nothing calls this directly
no outgoing calls
no test coverage detected