=========================================================================== * Check that the match at match_start is indeed a match. */
| 1342 | * Check that the match at match_start is indeed a match. |
| 1343 | */ |
| 1344 | local void check_match(deflate_state *s, IPos start, IPos match, int length) |
| 1345 | { |
| 1346 | /* check that the match is indeed a match */ |
| 1347 | if (zmemcmp(s->window + match, |
| 1348 | s->window + start, length) != EQUAL) { |
| 1349 | fprintf(stderr, " start %u, match %u, length %d\n", |
| 1350 | start, match, length); |
| 1351 | do { |
| 1352 | fprintf(stderr, "%c%c", s->window[match++], s->window[start++]); |
| 1353 | } while (--length != 0); |
| 1354 | z_error("invalid match"); |
| 1355 | } |
| 1356 | if (z_verbose > 1) { |
| 1357 | fprintf(stderr,"\\[%d,%d]", start-match, length); |
| 1358 | do { putc(s->window[start++], stderr); } while (--length != 0); |
| 1359 | } |
| 1360 | } |
| 1361 | #else |
| 1362 | # define check_match(s, start, match, length) |
| 1363 | #endif /* DEBUG */ |
no test coverage detected