source: buchla-68k/orig/CLIBRARY/MEMCMP.C@ ee49131

Last change on this file since ee49131 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago

Imported original source code.

  • Property mode set to 100755
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.