PERFORCE change 179668 for review
Benjamin Fiedler
bfiedler at FreeBSD.org
Wed Jun 16 00:29:32 UTC 2010
http://p4web.freebsd.org/@@179668?ac=10
Change 179668 by bfiedler at freebsd-7803 on 2010/06/16 00:28:45
Change implementation of 'B' flag again. It is still not 100% working
Affected files ...
.. //depot/projects/soc2010/bsdtextproc/diff/diffreg.c#5 edit
Differences ...
==== //depot/projects/soc2010/bsdtextproc/diff/diffreg.c#5 (text+ko) ====
@@ -801,22 +801,29 @@
d = getc(f2);
ctnew++;
}
+
} else if (Bflag) {
- while( c == '\n' && d != '\n' ) {
- c = getc(f1);
- ixold[i] = ctold;
- ixnew[j] = ctnew;
- j++; i++;
- if( i == len[0] || j == len[1] ) { break; }
+ if( c == '\n' && d != '\n') {
+
+ do {
+ if (c == '\n') {
+ ixold[i] = ctold;
+ i++;
+ }
+
+ } while ((c = getc(f1)) == '\n' && i <= len[0]);
}
+
+ if( d == '\n' && c != '\n') {
+ do {
+ if (d == '\n') {
+ ixnew[j] = ctnew;
+ j++;
+ }
+ } while ((d = getc(f2)) == '\n' && j <= len[1]);
- while( d == '\n' && c != '\n') {
- d = getc(f2);
- ixold[i] = ctold;
- ixnew[j] = ctnew;
- j++; i++;
- if( i == len[0] || j == len[1] ) { break; }
}
+
break;
}
if (chrtran[c] != chrtran[d]) {
More information about the p4-projects
mailing list