Simplifies the code by defining dedicated functions and separating the case from the main ones. Also use the snprintf function since the buffer size is known.
Simplifies the code by defining dedicated functions and separating the case from the main ones. Also use the snprintf function since the buffer size is known.