Am 18.12.2017 um 12:50 schrieb Riccardo (Jack) Lucchetti:
On Mon, 18 Dec 2017, Riccardo (Jack) Lucchetti wrote:
> I think the following could be a base for automatic sanitizing of
sprintf
better (preserves indentation and adds a comment)
<sprintf.sed>
s/^\([ \t]*\)sprintf \([A-Za-z_0-9]*\) \(.*\)/\1# was: sprintf \2
\3\n\1string \2 = sprintf(\3)\n/
</sprintf.sed>
<bash>
sed $1 -f sprintf.sed
</bash>
so for example
<hansl>
sprintf ii "%d", i-2
</hansl>
becomes
<hansl>
# was: sprintf ii "%d", i-2
string ii = sprintf("%d", i-2)
</nansl>
OK, very nice -- so how many packages are affected?
thanks,
sven