#include <stdio.h>
#include <string.h>

static int abs(int n)
{
  if (n < 0) return -1;
  if (n > 0) return  1;
  return 0;
}

int main()
{
  printf("%d\n", abs(bcmp("abc", "abc", 3)));
  printf("%d\n", abs(bcmp("abc", "ABC", 3)));
  printf("%d\n", abs(bcmp("ABC", "abc", 3)));
  printf("%d\n", abs(bcmp("a", "aaa", 1)));
  printf("%d\n", abs(bcmp("aaa", "a", 1)));
  printf("%d\n", abs(bcmp("aaaa", "abcd", 3)));
  printf("%d\n", abs(bcmp("abcd", "aaaa", 3)));
  printf("%d\n", abs(bcmp("aaaa", "abcd", 1)));
  printf("%d\n", abs(bcmp("abcd", "aaaa", 1)));
  printf("%d\n", abs(bcmp("012", "0123", 4)));
  printf("%d\n", abs(bcmp("0123", "012", 4)));
  printf("%d\n", abs(bcmp("012", "0123", 3)));
  printf("%d\n", abs(bcmp("0123", "012", 3)));

  return 0;
}
