platform.h
来自「This function takes a 16-, 24-, or 32-by」· C头文件 代码 · 共 43 行
H
43 行
#ifndef PLATFORM_H
#define PLATFORM_H
/*
If we can't use the compiler's intrinsic rotation functions,
we'll use these macros.
*/
#define ROL(x, n) (((x) << ((n) & 0x1F)) | ((x) >> (32 - ((n) & 0x1F))))
#define ROR(x, n) (((x) >> ((n) & 0x1F)) | ((x) << (32 - ((n) & 0x1F))))
/*
If we're using the Borland compiler, set the ROL and ROR macros
to call Borland's intrinsic rotation functions.
*/
#if (0) && defined(__BORLANDC__) && (__BORLANDC__ >= 0x462)
#include <stdlib.h>
#pragma inline __lrotl__
#pragma inline __lrotr__
#undef ROL
#undef ROR
#define ROL(x, n) __lrotl__(x, n)
#define ROR(x, n) __lrotr__(x, n)
#endif
/*
If we're using the Microsoft compiler, set the ROL and ROR macros
to call Microsoft's intrinsic rotation functions.
*/
#ifdef _MSC_VER
#include <stdlib.h>
#undef ROL
#undef ROR
#pragma intrinsic(_lrotl, _lrotr)
#define ROL(x, n) _lrotl(x, n)
#define ROR(x, n) _lrotr(x, n)
#endif
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?