📄 strcmp.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** strcmp.c Nucleus Common Library 1.1** DESCRIPTION** This file contains the implementation of NCL_memcmp.** DATA STRUCTURES** None.** FUNCTIONS** NCL_memcmp** 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_strcmp** DESCRIPTION** Lexigraphically compare the incoming 2 arguments and return an* integer greater than, equal to, or less than 0 according to* whether s1 is greater than, equal to, or less than s2.** INPUTS** s1 String to compare* s2 String to compare** OUTPUTS** int 0 means s1 == s2;* -1 means s1 < s2;* 1 means s1 > s2**************************************************************************/int NCL_strcmp(register const char *s1, register const char *s2){ while ((*s1 == *s2) && (*s1)) ++s1, ++s2; return ((int)(unsigned char)*s1) - ((int)(unsigned char)*s2);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -