[BACK]Return to diff.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rcs

Diff for /src/usr.bin/rcs/diff.c between version 1.36 and 1.37

version 1.36, 2014/12/01 21:58:46 version 1.37, 2015/01/16 06:40:11
Line 64 
Line 64 
  *      @(#)diffreg.c   8.1 (Berkeley) 6/6/93   *      @(#)diffreg.c   8.1 (Berkeley) 6/6/93
  */   */
   
 #include <sys/param.h>  
 #include <sys/stat.h>  #include <sys/stat.h>
   
 #include <ctype.h>  #include <ctype.h>
 #include <err.h>  #include <err.h>
 #include <stdarg.h>  #include <stdarg.h>
   #include <stdint.h>
 #include <stddef.h>  #include <stddef.h>
 #include <stdio.h>  #include <stdio.h>
 #include <string.h>  #include <string.h>
 #include <unistd.h>  #include <unistd.h>
   #include <limits.h>
   
 #include "buf.h"  #include "buf.h"
 #include "diff.h"  #include "diff.h"
 #include "xmalloc.h"  #include "xmalloc.h"
   
   #define MINIMUM(a, b)   (((a) < (b)) ? (a) : (b))
   #define MAXIMUM(a, b)   (((a) > (b)) ? (a) : (b))
   
 /*  /*
  * diff - compare two files.   * diff - compare two files.
  */   */
Line 527 
Line 531 
                 bound = UINT_MAX;                  bound = UINT_MAX;
         else {          else {
                 sq = isqrt(n);                  sq = isqrt(n);
                 bound = MAX(256, sq);                  bound = MAXIMUM(256, sq);
         }          }
   
         k = 0;          k = 0;
Line 1200 
Line 1204 
                 return;                  return;
   
         b = d = 0;              /* gcc */          b = d = 0;              /* gcc */
         lowa = MAX(1, cvp->a - diff_context);          lowa = MAXIMUM(1, cvp->a - diff_context);
         upb = MIN(len[0], context_vec_ptr->b + diff_context);          upb = MINIMUM(len[0], context_vec_ptr->b + diff_context);
         lowc = MAX(1, cvp->c - diff_context);          lowc = MAXIMUM(1, cvp->c - diff_context);
         upd = MIN(len[1], context_vec_ptr->d + diff_context);          upd = MINIMUM(len[1], context_vec_ptr->d + diff_context);
   
         diff_output("***************");          diff_output("***************");
         if ((flags & D_PROTOTYPE)) {          if ((flags & D_PROTOTYPE)) {
Line 1303 
Line 1307 
                 return;                  return;
   
         d = 0; /* gcc */          d = 0; /* gcc */
         lowa = MAX(1, cvp->a - diff_context);          lowa = MAXIMUM(1, cvp->a - diff_context);
         upb = MIN(len[0], context_vec_ptr->b + diff_context);          upb = MINIMUM(len[0], context_vec_ptr->b + diff_context);
         lowc = MAX(1, cvp->c - diff_context);          lowc = MAXIMUM(1, cvp->c - diff_context);
         upd = MIN(len[1], context_vec_ptr->d + diff_context);          upd = MINIMUM(len[1], context_vec_ptr->d + diff_context);
   
         diff_output("@@ -");          diff_output("@@ -");
         uni_range(lowa, upb);          uni_range(lowa, upb);

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37