Extended POSIX-style sprintf