Lines Matching +full:foo +full:- +full:bar
1 /* SPDX-License-Identifier: MIT */
19 * CALL_ARGS - Invoke a macro, but allow parameters to be expanded beforehand.
28 * #define foo X,Y,Z,Q
29 * #define bar COUNT_ARGS(foo)
30 * #define buz CALL_ARGS(COUNT_ARGS, foo)
32 * With above definitions bar expands to 1 while buz expands to 4.
38 * DROP_FIRST_ARG - Returns all arguments except the first one.
46 * #define foo X,Y,Z,Q
47 * #define bar CALL_ARGS(COUNT_ARGS, DROP_FIRST_ARG(foo))
49 * With above definitions bar expands to 3.
55 * FIRST_ARG - Returns the first argument.
63 * #define foo X,Y,Z,Q
64 * #define bar FIRST_ARG(foo)
66 * With above definitions bar expands to X.
72 * LAST_ARG - Returns the last argument.
82 * #define foo X,Y,Z,Q
83 * #define bar LAST_ARG(foo)
85 * With above definitions bar expands to Q.
91 * PICK_ARG - Returns the n-th argument.
103 * #define foo X,Y,Z,Q
104 * #define bar PICK_ARG(2, foo)
105 * #define buz PICK_ARG3(foo)
107 * With above definitions bar expands to Y and buz expands to Z.
125 * ARGS_SEP_COMMA - Definition of a comma character.
133 * #define foo(f) f(X) f(Y) f(Z) f(Q)
134 * #define bar DROP_FIRST_ARG(foo(ARGS_SEP_COMMA __stringify))
135 * #define buz CALL_ARGS(COUNT_ARGS, DROP_FIRST_ARG(foo(ARGS_SEP_COMMA)))
137 * With above definitions bar expands to