Re: [Cocci] Changing format string usage with SmPL?

2019-12-06 Thread Markus Elfring
> After some research, I could create a Python function called > fmt_replace_by_pos() to replace the %fmt by the Indice position. I imagine that this development direction can become more interesting. Now I would like to point a few implementation details out which can be improved in the shown

Re: [Cocci] Changing format string usage with SmPL?

2019-12-06 Thread Markus Elfring
> Therefore, I could find the %fmt and replace by whatever I want based on > the *expression-list. *currently struggled on that. Are you also looking for direct support of such expression lists by Coccinelle's programming interface (see also “man coccilib”)? Regards, Markus

Re: [Cocci] Changing format string usage with SmPL?

2019-12-06 Thread Markus Elfring
> Unfortunately, it doesn't work. A bit more information would be nice for the explanation of the failure reason. I assume that you are still looking for better support of format strings with several conversion parameters. > But, I am working on some solutions using Python. I am curious how