memcmp.c
Upload User: wstnjxml
Upload Date: 2014-04-03
Package Size: 7248k
Code Size: 0k
Category:

Windows CE

Development Platform:

C/C++

  1. #ifdef HAVE_CONFIG_H
  2. #include "config.h"
  3. #endif
  4. #include <stdlib.h>
  5. int memcmp(const void *__s1, const void *__s2, size_t __n)
  6. {
  7. const char *scan1, *scan2;
  8. size_t n;
  9. scan1 = __s1;
  10. scan2 = __s2;
  11. for (n = __n; n > 0; n--)
  12. if (*scan1 == *scan2) {
  13. scan1++;
  14. scan2++;
  15. } else
  16. return *scan1 - *scan2;
  17. return 0;
  18. }