/*
* This is a test program for strcmp().  We've seen some strange
* behavior from this routine on a few systems.
*/
#include <stdio.h>

#define S
struct {
	int v; char* s;
} t[] = {
	{ 0, "",},
	{ 0, "",},
	{-1, "A",},
	{-1, "ABC",},
	{-1, "ABCD",},
	{ 0, "ABCD",},
	{ 1, "ABC",},
	{ 1, "A",},
	{ 1, "",},
	{ 1, 0,},
};

main(ac,av)
	int    ac;
	char** av;
{	int e, i, n;

	for (n=1; t[n].s; n++) {
		i = strcmp(t[n-1].s,t[n].s);
		printf("Got %d for \"%s\" \"%s\"\n",i,t[n-1].s,t[n].s);
		if (i != t[n].v) {
			printf("--- That's should be %d.\n",t[n].v);
			++e;
		}
	}
	exit(e);
}
