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

📄 types.h

📁 当前支持 16-bit, 32-bit and 64-bit 的二进制文件
💻 H
字号:
// types.h
// Copyright (C) 2008 Willow Schlanger

// FIXME -- move this someplace else.
// Change 'l_x86s__types_h__included' to 'l_types_h__included' so we can reuse it elsewhere.

#ifndef l_x86s__types_h__included
#define l_x86s__types_h__included

#define PACKED(x) __attribute__((packed)) x

// The following needs to be edited for your platform.
// If LITTLE_ENDIAN, assume unaligned memory accesses are OK.
// --- Note: this program REQUIRES a little endian architecture that can access unaligned memory.
//#define LITTLE_ENDIAN 1

typedef unsigned char U1;
typedef signed char S1;
typedef unsigned short U2;
typedef signed short S2;
typedef unsigned U4;
typedef signed S4;

// The following needs to be edited for your platform.
#ifdef _MSC_VER
typedef unsigned _int64 U8;
typedef signed _int64 S8;
#else
typedef unsigned long long U8;
typedef signed long long S8;
#endif

// These must have the same size as void *.
typedef unsigned UINT;
typedef signed SINT;

//#if LITTLE_ENDIAN
#define GET_U2(x) (*(const U2 *)(x))
#define GET_U4(x) (*(const U4 *)(x))
#define GET_U8(x) (*(const U8 *)(x))
/*#else
#define GET_U2(x) (((U2)(((const U1 *)(x))[0])) | (((U2)(((const U1 *)(x))[1])) << 8))
#define GET_U4(x) (GET_U2((x)) | GET_U2((const U1 *)((x)) + 2))
#define GET_U9(x) (GET_U4((x)) | GET_U4((const U1 *)((x)) + 4))
#endif*/

#endif	// l_x86s__types_h__included

⌨️ 快捷键说明

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