Ignore:
Timestamp:
Jun 23, 2014, 9:45:51 PM (11 years ago)
Author:
dmik
Message:

git: Merge version 2.0.0 from vendor to dmik branch.

Location:
git/branches/dmik
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • git/branches/dmik

  • TabularUnified git/branches/dmik/xdiff/xprepare.c

    r626 r782  
    182182                goto abort;
    183183
    184         if (xpp->flags & XDF_HISTOGRAM_DIFF)
     184        if (XDF_DIFF_ALG(xpp->flags) == XDF_HISTOGRAM_DIFF)
    185185                hbits = hsize = 0;
    186186        else {
     
    210210                        recs[nrec++] = crec;
    211211
    212                         if (!(xpp->flags & XDF_HISTOGRAM_DIFF) &&
    213                                 xdl_classify_record(pass, cf, rhash, hbits, crec) < 0)
     212                        if ((XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF) &&
     213                            xdl_classify_record(pass, cf, rhash, hbits, crec) < 0)
    214214                                goto abort;
    215215                }
     
    274274         * xdl_prepare_ctx().
    275275         */
    276         sample = xpp->flags & XDF_HISTOGRAM_DIFF ? XDL_GUESS_NLINES2 : XDL_GUESS_NLINES1;
     276        sample = (XDF_DIFF_ALG(xpp->flags) == XDF_HISTOGRAM_DIFF
     277                  ? XDL_GUESS_NLINES2 : XDL_GUESS_NLINES1);
    277278
    278279        enl1 = xdl_guess_lines(mf1, sample) + 1;
    279280        enl2 = xdl_guess_lines(mf2, sample) + 1;
    280281
    281         if (!(xpp->flags & XDF_HISTOGRAM_DIFF) &&
    282                 xdl_init_classifier(&cf, enl1 + enl2 + 1, xpp->flags) < 0) {
    283 
    284                 return -1;
    285         }
     282        if (XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF &&
     283            xdl_init_classifier(&cf, enl1 + enl2 + 1, xpp->flags) < 0)
     284                return -1;
    286285
    287286        if (xdl_prepare_ctx(1, mf1, enl1, xpp, &cf, &xe->xdf1) < 0) {
     
    297296        }
    298297
    299         if (!(xpp->flags & XDF_PATIENCE_DIFF) &&
    300                         !(xpp->flags & XDF_HISTOGRAM_DIFF) &&
    301                         xdl_optimize_ctxs(&cf, &xe->xdf1, &xe->xdf2) < 0) {
     298        if ((XDF_DIFF_ALG(xpp->flags) != XDF_PATIENCE_DIFF) &&
     299            (XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF) &&
     300            xdl_optimize_ctxs(&cf, &xe->xdf1, &xe->xdf2) < 0) {
    302301
    303302                xdl_free_ctx(&xe->xdf2);
Note: See TracChangeset for help on using the changeset viewer.