summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/lib/strcmp.c
blob: 9a7fa8186452d108842633279a99c0674228f246 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/*
 * Compare strings:  s1>s2: >0  s1==s2: 0  s1<s2: <0
 */

strcmp(s1, s2)
	register char *s1, *s2;
{
	while (*s1 == *s2++)
		if (*s1++=='\0')
			return(0);
	return(*s1 - *--s2);
}