| 85 | GETMAX(D, double); |
| 86 | |
| 87 | int main(int argc, char **argv) { |
| 88 | vary("*cheez: %d+%d*", 0, |
| 89 | 24); // Also tests that '0' is not special as an array ender |
| 90 | vary("*albeit*"); // Should not fail with no var args in vararg function |
| 91 | vary2('Q', "%d*", 85); |
| 92 | |
| 93 | int maxxi = getMaxi(6, 2, 5, 21, 4, -10, 19); |
| 94 | printf("maxxi:%d*\n", maxxi); |
| 95 | double maxxD = getMaxD(6, (double)2.1, (double)5.1, (double)22.1, (double)4.1, |
| 96 | (double)-10.1, (double)19.1, (double)2); |
| 97 | printf("maxxD:%.2f*\n", (float)maxxD); |
| 98 | |
| 99 | // And, as a function pointer |
| 100 | void (*vfp)(const char * s, ...) = argc == 1211 ? NULL : vary; |
| 101 | vfp("*vfp:%d,%d*", 22, 199); |
| 102 | |
| 103 | // ensure lists work properly when copied, reinited etc. |
| 104 | varargs_listoffsets_main(); |
| 105 | |
| 106 | return 0; |
| 107 | } |
nothing calls this directly
no test coverage detected