home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 5 / CD_Magazyn_EXEC_nr_5.iso / Programy / Programowanie / vbcc07e.lzx / vbcc / amigawos / include / stdarg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-03-20  |  600 b   |  22 lines

  1. /*
  2. ** stdarg.h for vbcc-PowerOpen/WarpOS
  3. **
  4. ** V1.0 21-Apr-98 phx
  5. **      vbcc PPC CG V0.2n provides a completely different vararg-solution:
  6. **      The slots for fixed args remain reserved in the stack frame.
  7. **      The address of lastarg+1 is guaranteed to point to the first vararg.
  8. ** V0.1 19-Apr-98 phx
  9. **      created
  10. */
  11.  
  12. #ifndef __STDARG_H
  13. #define __STDARG_H 1
  14.  
  15. typedef unsigned char *va_list;
  16.  
  17. #define va_start(ap, la) ((ap) = (va_list)(&la+1))
  18. #define va_arg(ap, type) ((ap) += (sizeof(type)<sizeof(int)?sizeof(int):sizeof(type)), ((type *)(ap))[-1])
  19. #define va_end(ap) ((ap) = 0L)
  20.  
  21. #endif
  22.