| 331 | } |
| 332 | |
| 333 | static int collect_diff(mmfile_t *parent, mmfile_t *target, struct diff_ranges *out) |
| 334 | { |
| 335 | struct collect_diff_cbdata cbdata = {NULL}; |
| 336 | xpparam_t xpp; |
| 337 | xdemitconf_t xecfg; |
| 338 | xdemitcb_t ecb; |
| 339 | |
| 340 | memset(&xpp, 0, sizeof(xpp)); |
| 341 | memset(&xecfg, 0, sizeof(xecfg)); |
| 342 | xecfg.ctxlen = xecfg.interhunkctxlen = 0; |
| 343 | |
| 344 | cbdata.diff = out; |
| 345 | xecfg.hunk_func = collect_diff_cb; |
| 346 | memset(&ecb, 0, sizeof(ecb)); |
| 347 | ecb.priv = &cbdata; |
| 348 | return xdi_diff(parent, target, &xpp, &xecfg, &ecb); |
| 349 | } |
| 350 | |
| 351 | /* |
| 352 | * These are handy for debugging. Removing them with #if 0 silences |
no test coverage detected