1adime_va_list(3) Adime API Reference adime_va_list(3)
2
3
4
6 adime_va_list, adime_va_start, adime_va_arg, adime_va_end
7
9 #include <adime.h>
10
11
12 typedef adime_va_list;
13
14 void adime_va_start(adime_va_list ap, first_arg);
15
16 TYPE adime_va_arg(adime_va_list ap, TYPE);
17
18 void adime_va_end(adime_va_list ap);
19
21 Because of weirdnesses in the C language, some things that Adime does
22 with va_lists would not be portable if it used a va_list directly.
23 Instead you always have to use this replacement API, which works
24 exactly like the standard API for va_lists, but is more portable. Also,
25 if you pass an `adime_va_list´ to another function, which reads an
26 argument with `adime_va_arg()´, then the `adime_va_list´ will have
27 advanced to the same position in the calling function as in the called
28 function. In particular, after calling `adime_vdialogf()´, the
29 `adime_va_list´ will have advanced to after the last argument used by
30 Adime.
31
32 The following example shows how `adime_dialogf()´ is implemented in
33 terms of `adime_vdialogf()´:
34
35 int adime_dialogf(char *title, int x, int y, int edit_w,
36 char *format, ...)
37 {
38 int ret;
39 va_list ap;
40
41 va_start(ap, format);
42 ret = adime_vdialogf(title, x, y, edit_w, format, ap);
43 va_end(ap);
44
45 return ret;
46 }
47
48 See documentation for the standard `va_list´, `va_start()´, `va_arg()´
49 and `va_end()´ for more information.
50
51
52
53
55 adime_vdialogf(3), adime_dialogf(3), adime_lowlevel_vdialogf(3)
56
57
58
59Adime version 2.2.1 adime_va_list(3)