| 303 | } |
| 304 | |
| 305 | static int diffsize(const char *a, const char *b) |
| 306 | { |
| 307 | xpparam_t pp = { 0 }; |
| 308 | xdemitconf_t cfg = { 0 }; |
| 309 | mmfile_t mf1, mf2; |
| 310 | int count = 0; |
| 311 | |
| 312 | mf1.ptr = (char *)a; |
| 313 | mf1.size = strlen(a); |
| 314 | mf2.ptr = (char *)b; |
| 315 | mf2.size = strlen(b); |
| 316 | |
| 317 | cfg.ctxlen = 3; |
| 318 | if (!xdi_diff_outf(&mf1, &mf2, |
| 319 | diffsize_hunk, diffsize_consume, &count, |
| 320 | &pp, &cfg)) |
| 321 | return count; |
| 322 | |
| 323 | error(_("failed to generate diff")); |
| 324 | return COST_MAX; |
| 325 | } |
| 326 | |
| 327 | static void get_correspondences(struct string_list *a, struct string_list *b, |
| 328 | int creation_factor, size_t max_memory) |
no test coverage detected