⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memcmp.c

📁 wm PNE 3.3 source code, running at more than vxworks6.x version.
💻 C
字号:
/* $Header: /usr/cvsroot/target/src/wrn/wm/common/lib/memcmp.c,v 1.3 2003/01/16 18:18:56 josh Exp $ *//* * Copyright (C) 1999-2005 Wind River Systems, Inc. * All rights reserved.  Provided under license only. * Distribution or other use of this software is only * permitted pursuant to the terms of a license agreement * from Wind River Systems (and is otherwise prohibited). * Refer to that license agreement for terms of use. *//**************************************************************************** *  Copyright 1998 Integrated Systems, Inc. *  All rights reserved. ****************************************************************************//* * $Log: memcmp.c,v $ * Revision 1.3  2003/01/16 18:18:56  josh * directory structure shifting * * Revision 1.2  2001/11/06 22:15:52  tneale * Fixed for newest file layout * * Revision 1.1.1.1  2001/11/05 17:48:39  tneale * Tornado shuffle * * Revision 1.5  2001/01/19 22:21:31  paul * Update copyright. * * Revision 1.4  2000/03/17 00:16:54  meister * Update copyright message * * Revision 1.3  1999/04/09 20:33:47  wes * re-constify.  let's see what, if anything, blows up * * Revision 1.2  1998/07/04 00:29:23  sra * Remove "const" tags, more trouble than they are worth. * * Revision 1.1  1998/07/03 20:19:16  sra * Add etc_memcmp(). * *//* [clearcase]modification history-------------------01b,20apr05,job  update copyright notices01a,11dec03,job  fix copyright statements*/#include <wrn/wm/common/config.h>#include <wrn/wm/common/stdf.h>#include <wrn/wm/common/glue.h>/* * Portable implementation of ISO C memcmp() function for platforms * that don't have it or have a broken version. * * ISO C clearly states that memcmp() compares unsigned characters * (each byte to be considered in the range 0..255), but a number * of implementations seem to get this wrong, probably for historical * reasons. */int  etc_memcmp(const void *v1, const void *v2, size_t len){  unsigned const char *b1 = v1, *b2 = v2;  int result = 0;  while (len-- > 0)    if ((result = (*b1++) - (*b2++)) != 0)      break;  return result;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -