source: buchla-68k/libsm/memcmp.c@ c65a0e2

Last change on this file since c65a0e2 was 109c83b, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Compiled full ROM in Hatari.

  • Property mode set to 100644
File size: 559 bytes
Line 
1/*
2 =============================================================================
3 memcmp.c -- compare memory areas
4 Version 2 -- 1987-06-15
5
6 Compare n bytes: s1>s2: >0 s1==s2: 0 s1<s2: <0
7 =============================================================================
8*/
9
10int
11memcmp(s1, s2, n)
12register char *s1, *s2;
13register int n;
14{
15 register int diff;
16
17 if (s1 != s2)
18 while (--n >= 0)
19 if (diff = *s1++ - *s2++)
20 return(diff);
21 return(0);
22}
Note: See TracBrowser for help on using the repository browser.