On 2015-10-07 23:33, Rasmus Villemoes wrote:
> On Wed, Oct 07 2015, Michal Marek wrote:
>> It should be accompanied by a patch to scripts/tags.sh teaching
>> ctags/etags about the new macros.
>
> Do you mean that something like
>
> --regex-c='/COND_CONFIG\([^,]*,([^,]*)\)/\1/'
>
> should
On 2015-10-07 23:33, Rasmus Villemoes wrote:
> On Wed, Oct 07 2015, Michal Marek wrote:
>> It should be accompanied by a patch to scripts/tags.sh teaching
>> ctags/etags about the new macros.
>
> Do you mean that something like
>
>
On Wed, Oct 07 2015, Michal Marek wrote:
> On 2015-10-06 23:05, Rasmus Villemoes wrote:
>> It's not hard to generalize the macro magic used to build the
>> IS_ENABLED macro and friends to produce a few other potentially useful
>> macros:
>>
>> CHOOSE_EXPR(CONFIG_FOO, expr): if CONFIG_FOO is set
On 2015-10-06 23:05, Rasmus Villemoes wrote:
> It's not hard to generalize the macro magic used to build the
> IS_ENABLED macro and friends to produce a few other potentially useful
> macros:
>
> CHOOSE_EXPR(CONFIG_FOO, expr): if CONFIG_FOO is set expands to
> expr, otherwise expands to nothing.
* Rasmus Villemoes wrote:
> +#define _COMMA ,
> +#define _COND_PUNCTUATION_0(p)
> +#define _COND_PUNCTUATION_1(p) p
> +
> +#define CHOOSE_EXPR(cfg, expr, ...) _CHOOSE_EXPR(cfg, expr, ##__VA_ARGS__,
> /* empty defalt arg */)
> +#define _CHOOSE_EXPR(cfg, expr, def, ...)
>
On Wed, Oct 07 2015, Michal Marek wrote:
> On 2015-10-06 23:05, Rasmus Villemoes wrote:
>> It's not hard to generalize the macro magic used to build the
>> IS_ENABLED macro and friends to produce a few other potentially useful
>> macros:
>>
>> CHOOSE_EXPR(CONFIG_FOO, expr): if
On 2015-10-06 23:05, Rasmus Villemoes wrote:
> It's not hard to generalize the macro magic used to build the
> IS_ENABLED macro and friends to produce a few other potentially useful
> macros:
>
> CHOOSE_EXPR(CONFIG_FOO, expr): if CONFIG_FOO is set expands to
> expr, otherwise expands to nothing.
* Rasmus Villemoes wrote:
> +#define _COMMA ,
> +#define _COND_PUNCTUATION_0(p)
> +#define _COND_PUNCTUATION_1(p) p
> +
> +#define CHOOSE_EXPR(cfg, expr, ...) _CHOOSE_EXPR(cfg, expr, ##__VA_ARGS__,
> /* empty defalt arg */)
> +#define _CHOOSE_EXPR(cfg, expr, def, ...)
8 matches
Mail list logo