Cosmetic changes
snprintf():  If size is zero, then snprintf() should return the size of the required buffer without writing anyting.  From Sami Pelkonen
snprintf():  If size is zero, then snprintf() should return the size of the required buffer without writing anyting.  From Sami Pelkonen