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

📄 stddef.h

📁 c库的部分源代码 用惯了操作系统提供的内存api,你是否了解系统的运行机制,这是提供动态内存分配最简单的实现代码 静态的代码库 可用各种c编译
💻 H
字号:
/************************************************************************
    Standard definitions.

    prtdiff_t	signed integral type of result of subtracing two pointers
    size_t	unsigned integral type of the result of sizeof
    wchar_t	integral type which can represent all characters in any
		    supported extended character set

    NULL	a null pointer constant

    offsetof(type,member)
		expands to a type size_t expression representing the
		offset in bytes from the beginning of a structure of
		type "type" to the named "member".
************************************************************************/
#ifndef __STDDEF
#define __STDDEF

typedef _ptrdiff_t	ptrdiff_t;

#ifndef __SIZE_T
#define __SIZE_T
#ifdef _INTBITS
    typedef _size_t		size_t;
#else
    typedef unsigned int	size_t;
#endif
#endif

#ifndef __WCHAR_T
#define __WCHAR_T
typedef char		wchar_t;
#endif

#if __cplusplus
# define NULL 0
#else
# define NULL (void *)0
#endif

#define offsetof(t,m)	((size_t)(((char*)&(((t*)0)->m))-(char*)0))

#endif

⌨️ 快捷键说明

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