strmac.h
来自「自已写的一个嵌入式实时多任务抢占式操作系统。花了几个礼拜」· C头文件 代码 · 共 85 行
H
85 行
/* Definition module : strmac.h
Copyright 1986-1994 Diab Data AB, Sweden
Description :
Contains useful string macros
History :
When Who What
940702 teve initial
*/
#ifndef D_strmac
#define D_strmac
/************** Exported data, types and macros *****************/
#define FILLMEM(c) (((((((c) << 8) | (c)) << 8) | (c)) << 8) | (c))
#if defined(__rce)
#define ZERO_BYTE(l) (!__tstnbz(l))
#else
#define ZERO_BYTE(l) (((~l & (l-0x01010101)) & 0x80808080) != 0)
#endif
typedef unsigned long UL;
/*
* The following types should be "int" if cpu doesn't have byte operations
* otherwise "char"
*/
#if defined(__ace)
typedef int CHAR;
typedef unsigned int UCHAR;
#define STRALIGN 4
#define OPTALIGN 4
#define BIGEND
#define SLOW_ZERO
#elif defined(__m68k)
typedef char CHAR;
typedef unsigned char UCHAR;
#define STRALIGN 2
#define OPTALIGN 4
#define BIGEND
#define SLOW_ZERO
#elif defined(__m88k) || defined(__rce) || defined(__mips) || defined(__sparc) || defined(__v850)
typedef int CHAR;
typedef unsigned int UCHAR;
#define STRALIGN 4
#define OPTALIGN 4
#define BIGEND
#define LOADSTALL
#elif defined(__ppc) || defined(__m32r) || defined(__sh)
typedef int CHAR;
typedef unsigned int UCHAR;
#define STRALIGN 4
#define OPTALIGN 4
#define BIGEND
#define PREINC
#define LOADSTALL
#else
#error "unknown processor type"
#endif
#ifdef PREINC
#define INC(p) (++(p))
#define INCINI (-1)
#define INCEND 0
#else
#define INC(p) ((p)++)
#define INCINI 0
#define INCEND (-1)
#endif
/************** Exported functions ******************************/
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?