> > Which algorithm will become sufficient for your data processing needs
> > around the usage of functions with variadic arguments because of format 
> > strings?
>
> Actually, I really didn't get why you're asking about that.

I suggest to take another look at affected software aspects.


> because we are talking about X and you're asking for Y.

I presented another approach to tackle your use case.


> the point is because I am studying about the Coccinelle

This is nice.


> and I am just trying to figure out if the tool could detect "%s"
> called with "mydata->name" and then replace by "%m" and remove the "->name"

It can be achieved for such format string parameters.
But I hope that the software development attention will grow
for the handling of multiple data conversions for several arguments.


> But, I've read again the other samples and the documentation.
> therefore, I didn't figure out how it should be.

Would you like to help to improve this area also for your needs?


> btw, thank you Julia for the suggestion performing the 
> /Ocalm/make_expr/replace/.
> (Due to something wrong with the Coccinelle distributed by Brew/Osx.
> I just rewrote your sample using Python and the result was the same.

Both programming languages can perform string replacements as usual.


> But, I can't just replace all "%s" by "%m".

Will you become aware of more temporary software limitations
because mentioned implementation details can refer also to work in progress?


> As I said, it should be only if the "%s" was declared to use "mydata->name".

Such a requirement seems to be clear.


> so, I still fighting yet.

Can it be that your design imaginations are too limited
for the discussed use case so far?

How do you think about to develop a few corresponding SmPL script variants
which can handle more concrete function calls besides searching for a solution
according to the desired general source code transformation?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to