Annotation of GNUtools/cc/va-clipper.h, revision 1.1.1.1

1.1       root        1: /* GNU C varargs and stdargs support for Clipper.  */
                      2: 
                      3: /* Define __gnuc_va_list. */
                      4: 
                      5: #ifndef __GNUC_VA_LIST
                      6: #define __GNUC_VA_LIST
                      7: 
                      8: typedef struct
                      9: {
                     10:   int __va_ap;                         /* pointer to stack args */
                     11:   void *__va_reg[4];                   /* pointer to r0,f0,r1,f1 */
                     12:   int __va_num;                                /* number of args processed */
                     13: } __gnuc_va_list;
                     14: #endif /* not __GNUC_VA_LIST */
                     15: 
                     16: 
                     17: #if defined (_STDARG_H) || defined (_VARARGS_H)
                     18: #define va_list __gnuc_va_list
                     19: #define __va_list __gnuc_va_list       /* acc compatibility */
                     20: 
                     21: #define _VA_LIST
                     22: #define _VA_LIST_
                     23: #define _SYS_INT_STDARG_H              /* acc compatibility */
                     24: 
                     25: #ifdef _STDARG_H
                     26: #define va_start(AP,LASTARG)                   \
                     27:   ((AP) = *(va_list *)__builtin_saveregs(),    \
                     28:    (AP).__va_num = __builtin_args_info (0),    \
                     29:    (AP).__va_ap += __builtin_args_info (1))
                     30: #else
                     31: #define va_alist  __builtin_va_alist
                     32: /* The ... causes current_function_varargs to be set in cc1.  */
                     33: #define va_dcl    va_list __builtin_va_alist; ...
                     34: #define va_start(AP)                           \
                     35:   ((AP) = *(va_list *)__builtin_saveregs(),    \
                     36:    (AP).__va_num = __builtin_args_info (0))
                     37: #endif /* _STDARG_H */
                     38: 
                     39: #define __va_rounded_size(TYPE)  \
                     40:   (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
                     41: 
                     42: #define __va_round(AP,TYPE)                                    \
                     43:   ((AP).__va_ap = ((AP).__va_ap + __alignof__ (TYPE) - 1 ) &   \
                     44:    ~(__alignof__ (TYPE) - 1))
                     45: 
                     46: #define va_arg(AP, TYPE) \
                     47:   ((AP).__va_num < 2 && __builtin_classify_type (* (TYPE *)0) < 12     \
                     48:    ? (__builtin_classify_type (* (TYPE *)0) == 8                       \
                     49:       ? (*(TYPE *)(AP).__va_reg[2 * (AP).__va_num++ + 1])              \
                     50:       : (*(TYPE *)(AP).__va_reg[2 * (AP).__va_num++ ]))                        \
                     51:    : ((AP).__va_num++, __va_round (AP,TYPE), *((TYPE *)((AP).__va_ap))++))
                     52: 
                     53: #define va_end(AP)
                     54: 
                     55: #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.