📄 stdarg.h
字号:
/************************************************************************
Standard variable argument header.
va_start initializes an arg pointer of type va_list.
va_arg gets the next argument given its promoted type.
NOTE: the type cannot be "char" or "short" and
instead must be the promoted type ("int") for
such arguments.
va_end must be done at the end.
A function defined to take a variable number of arguments
should be patterned after:
#include <stdarg.h>
int f( int a, char *b, ... ) { int x; long y;
va_list argp;
va_start( argp, b );
x = va_arg( argp, int );
y = va_arg( argp, long );
va_end( argp ); }
************************************************************************/
#ifndef __STDARG
#define __STDARG
#ifndef __VA_LIST
#define __VA_LIST
typedef char *va_list;
#endif
#define va_start(_ap, _parmN) (_ap = (char *)&_parmN)
#define va_end(_ap)
#define va_arg(_ap, _type) ((_ap -= (sizeof(_type) > sizeof(int)) ? \
sizeof(_type) : sizeof(int)), \
(*(_type *)(_ap)))
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -