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

📄 ntfstypes.h

📁 NTFS 磁盘系统 加载源代码
💻 H
字号:
/* *  ntfstypes.h * *  Copyright (C) 1996 Martin von L鰓is *//* This file defines four things:   - generic platform independent fixed-size types (e.g. ntfs_u32)   - specific fixed-size types (e.g. ntfs_offset_t)   - macros that read and write those types from and to byte arrays   - types derived from OS specific ones*/#if defined(i386) || defined(__i386__)/* unsigned integral types */typedef unsigned char      ntfs_u8;typedef unsigned short     ntfs_u16;typedef unsigned int       ntfs_u32;typedef unsigned long long ntfs_u64;/* unicode character type */typedef unsigned short     ntfs_wchar_t;/* file offset */typedef unsigned long long ntfs_offset_t;/* UTC */typedef unsigned long long ntfs_time64_t;/* Macros reading unsigned integers from a byte pointer *//* these should work for all little endian machines */#define NTFS_GETU8(p)      (*(ntfs_u8*)(p))#define NTFS_GETU16(p)     (*(ntfs_u16*)(p))#define NTFS_GETU24(p)     (NTFS_GETU32(p) & 0xFFFFFF)#define NTFS_GETU32(p)     (*(ntfs_u32*)(p))#define NTFS_GETU64(p)     (*(ntfs_u64*)(p))/* Macros writing unsigned integers */#define NTFS_PUTU8(p,v)      (*(ntfs_u8*)(p))=(v)#define NTFS_PUTU16(p,v)     (*(ntfs_u16*)(p))=(v)#define NTFS_PUTU24(p,v)     NTFS_PUTU16(p,(v) & 0xFFFF);\                             NTFS_PUTU8(((char*)p)+2,(v)>>16)#define NTFS_PUTU32(p,v)     (*(ntfs_u32*)(p))=(v)#define NTFS_PUTU64(p,v)     (*(ntfs_u64*)(p))=(v)/* Macros reading signed integers, returning int */#define NTFS_GETS8(p)        ((int)(*(char*)(p)))#define NTFS_GETS16(p)       ((int)(*(short*)(p)))#define NTFS_GETS24(p)       (NTFS_GETU24(p) < 0x800000 ? (int)NTFS_GETU24(p) : (int)(NTFS_GETU24(p) | 0xFF000000))#define NTFS_PUTS8(p,v)      NTFS_PUTU8(p,v)#define NTFS_PUTS16(p,v)     NTFS_PUTU16(p,v)#define NTFS_PUTS24(p,v)     NTFS_PUTU24(p,v)#define NTFS_PUTS32(p,v)     NTFS_PUTU32(p,v)#else#error Put your machine description here#endif/* system dependend types */#ifdef __linux__/* We always need the kernel types, because libc 6 makes them   of different size */#include <linux/types.h>typedef __kernel_mode_t ntmode_t;typedef __kernel_uid_t ntfs_uid_t;typedef __kernel_gid_t ntfs_gid_t;typedef __kernel_size_t ntfs_size_t;typedef __kernel_time_t ntfs_time_t;#else#include <sys/types.h>#include <sys/stat.h>typedef mode_t ntmode_t;typedef uid_t ntfs_uid_t;typedef gid_t ntfs_gid_t;typedef size_t ntfs_size_t;typedef time_t ntfs_time_t;#endif/* * Local variables: * c-file-style: "linux" * End: */

⌨️ 快捷键说明

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