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

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

Point of no return.

  • Property mode set to 100644
File size: 513 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 memcmp(char *s1, char *s2, int n)
11{
12 register int diff;
13
14 if (s1 != s2)
15 while (--n >= 0)
16 if (diff = *s1++ - *s2++)
17 return(diff);
18 return(0);
19}
Note: See TracBrowser for help on using the repository browser.