Last change
on this file since 2 was 2, checked in by bird, 22 years ago |
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
File size:
743 bytes
|
Line | |
---|
1 | #include <varargs.h>
|
---|
2 |
|
---|
3 | typedef double TYPE;
|
---|
4 |
|
---|
5 | void vafunction (dummy1, dummy2, va_alist)
|
---|
6 | TYPE dummy1, dummy2;
|
---|
7 | va_dcl
|
---|
8 | {
|
---|
9 | va_list ap;
|
---|
10 |
|
---|
11 | va_start(ap);
|
---|
12 | if (dummy1 != 888.)
|
---|
13 | abort();
|
---|
14 | if (dummy2 != 999.)
|
---|
15 | abort();
|
---|
16 | if (va_arg (ap, TYPE) != 1.)
|
---|
17 | abort();
|
---|
18 | if (va_arg (ap, TYPE) != 2.)
|
---|
19 | abort();
|
---|
20 | if (va_arg (ap, TYPE) != 3.)
|
---|
21 | abort();
|
---|
22 | if (va_arg (ap, TYPE) != 4.)
|
---|
23 | abort();
|
---|
24 | if (va_arg (ap, TYPE) != 5.)
|
---|
25 | abort();
|
---|
26 | if (va_arg (ap, TYPE) != 6.)
|
---|
27 | abort();
|
---|
28 | if (va_arg (ap, TYPE) != 7.)
|
---|
29 | abort();
|
---|
30 | if (va_arg (ap, TYPE) != 8.)
|
---|
31 | abort();
|
---|
32 | if (va_arg (ap, TYPE) != 9.)
|
---|
33 | abort();
|
---|
34 | va_end(ap);
|
---|
35 | }
|
---|
36 |
|
---|
37 |
|
---|
38 | int main (void)
|
---|
39 | {
|
---|
40 | vafunction( 888., 999., 1., 2., 3., 4., 5., 6., 7., 8., 9. );
|
---|
41 | exit(0);
|
---|
42 | return 0;
|
---|
43 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.