News for hackers. Stuff that matters.
Re:Generalizing Printf in C by kevin_thibedeau on Friday November 28, 2025 @03:32PM (#46082509)
idx should be a size_t.
Re:Generalizing Printf in C by einpoklum on Friday November 28, 2025 @04:36PM (#46082978)
Actually, there are historical reasons why `int` may be used. Look at the definition of the %n format specifier - it expects an `int *` argument. And all of the famirly functions return `int`'s ... see also:

https://stackoverflow.com/q/45740276/1593077