?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. /*-----------------------------------------------------------------------------------*/
  2. /* stdarg.h - ANSI macros for variable parameter list                                */
  3. /*-----------------------------------------------------------------------------------*/
  4.  
  5. #ifndef __SDC51_STDARG_H
  6. #define __SDC51_STDARG_H 1
  7.  
  8. #if defined(__z80) || defined(__gbz80) || defined(__hc08)
  9.  
  10. typedef unsigned char * va_list;
  11. #define va_start(marker, last)  { marker = (va_list)&last + sizeof(last); }
  12. #define va_arg(marker, type)    *((type *)((marker += sizeof(type)) - sizeof(type)))
  13.  
  14. #elif defined(__ds390) || defined(__ds400)
  15.  
  16. typedef unsigned char * va_list;
  17. #define va_start(marker, first) { marker = (va_list)&first; }
  18. #define va_arg(marker, type)    *((type *)(marker -= sizeof(type)))
  19.  
  20. #elif defined(SDCC_USE_XSTACK)
  21.  
  22. typedef unsigned char __pdata * va_list;
  23. #define va_start(marker, first) { marker = (va_list)&first; }
  24. #define va_arg(marker, type)    *((type __pdata *)(marker -= sizeof(type)))
  25.  
  26. #else
  27.  
  28. typedef unsigned char __data * va_list;
  29. #define va_start(marker, first) { marker = (va_list)&first; }
  30. #define va_arg(marker, type)    *((type __data * )(marker -= sizeof(type)))
  31.  
  32. #endif
  33.  
  34. #define va_end(marker) marker = (va_list) 0;
  35.  
  36. #endif
  37.