2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
8 #include <exec/types.h>
10 /*****************************************************************************
23 Calculate s1 - s2 for the n bytes after s1 and s2 and stop when
24 the difference is not 0.
27 s1, s2 - Begin of the memory areas to compare
28 n - The number of bytes to compare
31 The difference of the memory areas. The difference is 0, if both
32 are equal, < 0 if s1 < s2 and > 0 if s1 > s2. Note that it may be
33 greater then 1 or less than -1.
36 This function is not part of a library and may thus be called
44 strcmp(), strncmp(), strcasecmp(), strncasecmp()
48 ******************************************************************************/
52 int diff
= 0; /* In case we are comparing n == 0 */
58 while (n
&& !(diff
= *str1
- *str2
))
65 /* Now return the difference. */