Refactorization of *printf-like functions