generalised printf to function call & fixed spaces problem in string literals