static void drop_newline(char *buf)
{
	size_t len = strlen(buf);

	if (len == 0)
		return;
	if (*(buf + len - 1) == '\n')
		*(buf + len - 1) = '\0';
}
static void drop_newline(char *buf)
{
	size_t len = strlen(buf);

	if (len == 0)
		return;
	if (*(buf + len - 1) == '\n')
		*(buf + len - 1) = '\0';
}