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

Diff for /src/usr.bin/cmp/special.c between version 1.2 and 1.3

version 1.2, 1996/06/26 05:32:07 version 1.3, 1999/08/03 16:02:44
Line 67 
Line 67 
         if ((fp2 = fdopen(fd2, "r")) == NULL)          if ((fp2 = fdopen(fd2, "r")) == NULL)
                 err(ERR_EXIT, "%s", file2);                  err(ERR_EXIT, "%s", file2);
   
           dfound = 0;
         while (skip1--)          while (skip1--)
                 if (getc(fp1) == EOF)                  if (getc(fp1) == EOF)
                         goto eof;                          goto eof;
Line 74 
Line 75 
                 if (getc(fp2) == EOF)                  if (getc(fp2) == EOF)
                         goto eof;                          goto eof;
   
         dfound = 0;  
         for (byte = line = 1;; ++byte) {          for (byte = line = 1;; ++byte) {
                 ch1 = getc(fp1);                  ch1 = getc(fp1);
                 ch2 = getc(fp2);                  ch2 = getc(fp2);
                 if (ch1 == EOF || ch2 == EOF)                  if (ch1 == EOF || ch2 == EOF)
                         break;                          break;
                 if (ch1 != ch2)                  if (ch1 != ch2) {
                         if (lflag) {                          if (lflag) {
                                 dfound = 1;                                  dfound = 1;
                                 (void)printf("%6qd %3o %3o\n", byte, ch1, ch2);                                  (void)printf("%6qd %3o %3o\n", byte, ch1, ch2);
                         } else                          } else
                                 diffmsg(file1, file2, byte, line);                                  diffmsg(file1, file2, byte, line);
                                 /* NOTREACHED */                                  /* NOTREACHED */
                   }
                 if (ch1 == '\n')                  if (ch1 == '\n')
                         ++line;                          ++line;
         }          }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3