home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
unix
/
unixlib36d
/
clib
/
h
/
varargs
< prev
Wrap
Text File
|
1994-02-26
|
575b
|
27 lines
/* varargs.h (c) Copyright 1990 H.Rogers */
#ifndef __VARARGS_H
#define __VARARGS_H
#define __STDARG_H
#ifdef __cplusplus
extern "C" {
#endif
typedef char *va_list;
#define va_align(x) (((x) + (sizeof(int) - 1)) & (~(sizeof(int) - 1)))
#define va_dcl int va_alist;
#define va_start(a) ((void)(a = (char *)(&va_alist)))
#define va_arg(a,t) ((sizeof(t) > sizeof(int)) ? \
*(t *)(((a) += va_align(sizeof(t))) - va_align(sizeof(t))) : \
(t)(*(int *)(((a) += sizeof(int)) - sizeof(int))))
#define va_end(a) ((void)((a) = (char *)-1))
#ifdef __cplusplus
}
#endif
#endif