Created
June 10, 2024 16:37
-
-
Save andr1972/ada859954b6dd49ee5a5b575bf385337 to your computer and use it in GitHub Desktop.
Diff_example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int my_other_func(diffdata_t *dd1, long off1, long lim1) | |
{ | |
if (my_test_cmp(dd1,off1,lim1)>0) return 1; | |
if (my_test_cmp(dd1,off1,lim1)<0.5) return -1; | |
return 0; | |
} | |
int my_test_cmp(diffdata_t *dd1, long lim1, diffdata_t *dd2) | |
{ | |
if (off1 > lim1) return -1; | |
return test_cmp(dd1,dd2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int my_test_cmp(diffdata_t *dd1, long lim1, diffdata_t *dd2) | |
{ | |
if (off1 > lim1) return -1; | |
return test_cmp(dd1,dd2); | |
} | |
int my_other_func(diffdata_t *dd1, long off1, long lim1) | |
{ | |
if (my_test_cmp(dd1,off1,lim1)>0) return 1; | |
if (my_test_cmp(dd1,off1,lim1)<0.5) return -1; | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1c1 | |
< int my_other_func(diffdata_t *dd1, long off1, long lim1) | |
--- | |
> int my_test_cmp(diffdata_t *dd1, long lim1, diffdata_t *dd2) | |
3,5c3,4 | |
< if (my_test_cmp(dd1,off1,lim1)>0) return 1; | |
< if (my_test_cmp(dd1,off1,lim1)<0.5) return -1; | |
< return 0; | |
--- | |
> if (off1 > lim1) return -1; | |
> return test_cmp(dd1,dd2); | |
9c8 | |
< int my_test_cmp(diffdata_t *dd1, long lim1, diffdata_t *dd2) | |
--- | |
> int my_other_func(diffdata_t *dd1, long off1, long lim1) | |
11,12c10,12 | |
< if (off1 > lim1) return -1; | |
< return test_cmp(dd1,dd2); | |
--- | |
> if (my_test_cmp(dd1,off1,lim1)>0) return 1; | |
> if (my_test_cmp(dd1,off1,lim1)<0.5) return -1; | |
> return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff a.txt b.txt > result_diff.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment