blob: 4a45a54e92745f1ec0102a01b05b338b846cd1d4 [file] [log] [blame]
Jeff Hostetlera6db3fb2017-04-14 19:12:28 +00001#include "cache.h"
2
3int cmd_main(int argc, const char **argv)
4{
5 int result;
6 size_t offset;
7
8 if (!argv[1] || !argv[2])
9 die("usage: %s <string1> <string2>", argv[0]);
10
11 result = strcmp_offset(argv[1], argv[2], &offset);
12
13 /*
14 * Because differnt CRTs behave differently, only rely on signs
15 * of the result values.
16 */
17 result = (result < 0 ? -1 :
18 result > 0 ? 1 :
19 0);
20 printf("%d %"PRIuMAX"\n", result, (uintmax_t)offset);
21 return 0;
22}