@@ -181,7 +181,7 @@ static int xdl_prepare_ctx(unsigned int pass, mmfile_t *mf, long narec, xpparam_
181181 if (!(recs = (xrecord_t * * ) xdl_malloc (narec * sizeof (xrecord_t * ))))
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 {
187187 hbits = xdl_hashbits ((unsigned int ) narec );
@@ -209,8 +209,8 @@ static int xdl_prepare_ctx(unsigned int pass, mmfile_t *mf, long narec, xpparam_
209209 crec -> ha = hav ;
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 }
216216 }
@@ -273,16 +273,15 @@ int xdl_prepare_env(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
273273 * (nrecs) will be updated correctly anyway by
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-
282+ if (XDF_DIFF_ALG (xpp -> flags ) != XDF_HISTOGRAM_DIFF &&
283+ xdl_init_classifier (& cf , enl1 + enl2 + 1 , xpp -> flags ) < 0 )
284284 return -1 ;
285- }
286285
287286 if (xdl_prepare_ctx (1 , mf1 , enl1 , xpp , & cf , & xe -> xdf1 ) < 0 ) {
288287
@@ -296,9 +295,9 @@ int xdl_prepare_env(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
296295 return -1 ;
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 );
304303 xdl_free_ctx (& xe -> xdf1 );
0 commit comments