Import mini-printf from "mludvig"
mini-printf: Add "\r" when deal with "\n"
cat: display the content using mini-snprintf