]>
Commit | Line | Data |
---|---|---|
1a5f3d70 | 1 | #include "test-tool.h" |
08c46a49 | 2 | #include "read-cache-ll.h" |
a6db3fbb | 3 | |
126e3b3d | 4 | int cmd__strcmp_offset(int argc UNUSED, const char **argv) |
a6db3fbb JH |
5 | { |
6 | int result; | |
7 | size_t offset; | |
8 | ||
9 | if (!argv[1] || !argv[2]) | |
10 | die("usage: %s <string1> <string2>", argv[0]); | |
11 | ||
12 | result = strcmp_offset(argv[1], argv[2], &offset); | |
13 | ||
14 | /* | |
64127575 | 15 | * Because different CRTs behave differently, only rely on signs |
a6db3fbb JH |
16 | * of the result values. |
17 | */ | |
18 | result = (result < 0 ? -1 : | |
19 | result > 0 ? 1 : | |
20 | 0); | |
21 | printf("%d %"PRIuMAX"\n", result, (uintmax_t)offset); | |
22 | return 0; | |
23 | } |