OLD | NEW |
1 /* | 1 /* |
2 ** A utility for printing the differences between two SQLite database files. | 2 ** A utility for printing the differences between two SQLite database files. |
3 */ | 3 */ |
4 #include <stdio.h> | 4 #include <stdio.h> |
5 #include <ctype.h> | 5 #include <ctype.h> |
6 #include <sys/types.h> | 6 #include <sys/types.h> |
7 #include <sys/stat.h> | 7 #include <sys/stat.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 #include <stdlib.h> | 10 #include <stdlib.h> |
(...skipping 24 matching lines...) Expand all Loading... |
35 while( read(db1, a1, PAGESIZE)==PAGESIZE && read(db2,a2,PAGESIZE)==PAGESIZE ){ | 35 while( read(db1, a1, PAGESIZE)==PAGESIZE && read(db2,a2,PAGESIZE)==PAGESIZE ){ |
36 if( memcmp(a1,a2,PAGESIZE) ){ | 36 if( memcmp(a1,a2,PAGESIZE) ){ |
37 printf("Page %d\n", iPg); | 37 printf("Page %d\n", iPg); |
38 } | 38 } |
39 iPg++; | 39 iPg++; |
40 } | 40 } |
41 printf("%d pages checked\n", iPg-1); | 41 printf("%d pages checked\n", iPg-1); |
42 close(db1); | 42 close(db1); |
43 close(db2); | 43 close(db2); |
44 } | 44 } |
OLD | NEW |