I wouldn't do that, there are some perfectly good implementations out there. Try xnprintf (google and feel lucky).