stdarg.h

来自「FritzOS - 简单的C++开发OS的实例// 英文」· C头文件 代码 · 共 46 行

H
46
字号
/* stdarg.h : FritzOS Sandard Args Header File For The FritzOS C++ Kernel   Copyright (C) 2002 Tom Fritz * This program is a part of the FritzOS kernel, and may be freely * copied under the terms of the GNU General Public License (GPL), * version 2, or at your option any later version.   For more info, look at the COPYING file.*/// defines:#ifndef STDARG_H#define STDARG_H// These are the #defines for function arguments ( the type with the ... operator ).// These are used to get the values in the '...''s// if your wondering where LASTARG is defined, I think the compile does it.#define	va_start( AP, LASTARG )	\	( AP = ( ( va_list ) & ( LASTARG ) + VA_SIZE( LASTARG ) ) )// same with TYPE#define va_arg( AP, TYPE )						\ ( AP += __va_rounded_size ( TYPE ),					\  * ( ( TYPE * ) ( AP - __va_rounded_size ( TYPE ) ) ) )#define __va_rounded_size( TYPE )  \  ( ( ( sizeof ( TYPE ) + sizeof ( int ) - 1 ) / sizeof ( int ) ) * sizeof ( int ) )#define	VA_SIZE( TYPE )					\	( ( sizeof( TYPE ) + sizeof( STACKITEM ) - 1 )	\		& ~( sizeof( STACKITEM ) - 1 ) )// StackItem is defined here:#define	STACKITEM	int#define va_end(AP)	// typedefs:typedef unsigned char *va_list;#endif// End of stdarg.h

⌨️ 快捷键说明

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