# 2.11BSD#431 - /usr/src/lib/libc/compat-sys5/memcmp.c

##### Functions

    memcmp            X

       1: /*
       2:  * Copyright (c) 1985 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  */
       6:
       7: /*
       8:  * Sys5 compat routine
       9:  */
      10:
      11: #if defined(LIBC_SCCS) && !defined(lint)
      12: static char sccsid[] = "@(#)memcmp.c	5.2 (Berkeley) 86/03/09";
      13: #endif
      14:
      15: memcmp(s1, s2, n)
      16:     register char *s1, *s2;
      17:     register n;
      18: {
      19:     while (--n >= 0)
      20:         if (*s1++ != *s2++)
      21:             return (*--s1 - *--s2);
      22:     return (0);
      23: }

#### Defined functions

memcmp defined in line 15; used 6 times

- in /usr/include/memory.h line 15
- in /usr/include/string.h line 18
- in /usr/src/bin/ls/stat_flags.c line 86
- in /usr/src/include/memory.h line 15
- in /usr/src/include/strings.h line 27
- in /usr/src/libexec/tcpd/socket.c line 201

#### Defined variables

sccsid defined in line 12; never used

Last modified: 1986-03-10 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: ?E00 |