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

Diff for /src/usr.bin/cvs/diff.c between version 1.82 and 1.83

version 1.82, 2006/03/24 13:34:27 version 1.83, 2006/03/25 21:29:59
Line 172 
Line 172 
 static int      cvs_diff_cleanup(void);  static int      cvs_diff_cleanup(void);
 #endif  #endif
   
 static void      output(const char *, FILE *, const char *, FILE *);  static void      output(FILE *, FILE *);
 static void      check(FILE *, FILE *);  static void      check(FILE *, FILE *);
 static void      range(int, int, char *);  static void      range(int, int, char *);
 static void      uni_range(int, int);  static void      uni_range(int, int);
Line 183 
Line 183 
 static void      equiv(struct line *, int, struct line *, int, int *);  static void      equiv(struct line *, int, struct line *, int, int *);
 static void      unravel(int);  static void      unravel(int);
 static void      unsort(struct line *, int, int *);  static void      unsort(struct line *, int, int *);
 static void      change(const char *, FILE *, const char *, FILE *, int,  static void      change(FILE *, FILE *, int, int, int, int);
                     int, int, int);  
 static void      sort(struct line *, int);  static void      sort(struct line *, int);
 static int       ignoreline(char *);  static int       ignoreline(char *);
 static int       asciifile(FILE *);  static int       asciifile(FILE *);
Line 745 
Line 744 
         tmp = xrealloc(ixnew, (diff_len[1] + 2) * sizeof(long));          tmp = xrealloc(ixnew, (diff_len[1] + 2) * sizeof(long));
         ixnew = (long *)tmp;          ixnew = (long *)tmp;
         check(f1, f2);          check(f1, f2);
         output(file1, f1, file2, f2);          output(f1, f2);
   
 closem:  closem:
         if (anychange == 1) {          if (anychange == 1) {
Line 966 
Line 965 
                 return (k + 1);                  return (k + 1);
         i = 0;          i = 0;
         j = k + 1;          j = k + 1;
         while (1) {          for (;;) {
                 l = i + j;                  l = (i + j) / 2;
                 if ((l >>= 1) <= i)                  if (l <= i)
                         break;                          break;
                 t = clist[c[l]].y;                  t = clist[c[l]].y;
                 if (t > y)                  if (t > y)
Line 1155 
Line 1154 
 }  }
   
 static void  static void
 output(const char *file1, FILE *f1, const char *file2, FILE *f2)  output(FILE *f1, FILE *f2)
 {  {
         int m, i0, i1, j0, j1;          int m, i0, i1, j0, j1;
   
Line 1173 
Line 1172 
                         i1++;                          i1++;
                 j1 = J[i1 + 1] - 1;                  j1 = J[i1 + 1] - 1;
                 J[i1] = j1;                  J[i1] = j1;
                 change(file1, f1, file2, f2, i0, i1, j0, j1);                  change(f1, f2, i0, i1, j0, j1);
         }          }
         if (m == 0)          if (m == 0)
                 change(file1, f1, file2, f2, 1, 0, 1, diff_len[1]);                  change(f1, f2, 1, 0, 1, diff_len[1]);
         if (diff_format == D_IFDEF) {          if (diff_format == D_IFDEF) {
                 for (;;) {                  for (;;) {
 #define c i0  #define c i0
Line 1246 
Line 1245 
  * lines missing from the to file.   * lines missing from the to file.
  */   */
 static void  static void
 change(const char *file1, FILE *f1, const char *file2, FILE *f2,  change(FILE *f1, FILE *f2, int a, int b, int c, int d)
         int a, int b, int c, int d)  
 {  {
         static size_t max_context = 64;          static size_t max_context = 64;
         int i;          int i;

Legend:
Removed from v.1.82  
changed lines
  Added in v.1.83