Merge changes I2add6b4b,I9b296372,I7af2f1d1 into integration

* changes:
  libc/snprintf: use macro to reduce duplicated code
  libc/snprintf: add support to print "%" character
  libc/printf: add support to print "%" character