📄 memmove.c
字号:
/*************************************************************************
*
* Copyright Mentor Graphics Corporation 2002
* All Rights Reserved.
*
* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS
* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS
* SUBJECT TO LICENSE TERMS.
*
*************************************************************************/
/*************************************************************************
* FILE NAME VERSION
*
* memmove.c Nucleus Common Library 1.1
*
* DESCRIPTION
*
* This file contains the implementation of NCL_memmove.
*
* DATA STRUCTURES
*
* None.
*
* FUNCTIONS
*
* NCL_memmove
*
* DEPENDENCIES
*
* ncl.h
* string.h
* nucleus.h
*
************************************************************************/
#define NU_NCL_SOURCE_FILE
#include "ncl\inc\ncl.h"
#include "ncl\inc\string.h"
#include "plus\nucleus.h" /* MMU Support */
/*************************************************************************
*
* FUNCTION
*
* NCL_memmove
*
* DESCRIPTION
*
* Moves values in memory.
*
* INPUTS
*
* s1 Destination.
* s2 Source.
* n Number of bytes to move.
*
* OUTPUTS
*
* void* Pointer to s1.
*
*************************************************************************/
void *NCL_memmove (void *s1, const void *s2, size_t n)
{
register unsigned char *dst = (unsigned char*) s1;
register unsigned char *src = (unsigned char*) s2;
register unsigned char *end;
if (dst < src)
for (end=src+n ;src<end ;)
*dst++ = *src++;
else
for (end=src, src+=n, dst+=n; src>end;)
*--dst = *--src;
return (s1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -