/* copy src to dest, skipping leading and trailing blanks and null terminate the string "len" is the size of available memory including the terminating '\0'  */
static void ident_cpy(unsigned char *dest, unsigned char *src, unsigned int len)
/* copy src to dest, skipping leading and trailing blanks and null terminate the string "len" is the size of available memory including the terminating '\0'  */
static void ident_cpy(unsigned char *dest, unsigned char *src, unsigned int len)
{
	unsigned char *end, *last;
	last = dst;
	end  = src + len - 1;
	if (len < 2)
		goto OUT;
	while ((*src) && (src<end) && (*src==' '))
		++src;
	while ((*src) && (src<end)) {
		*dst++ = *src;
		if (*src++ != ' ')
			last = dst;
	}
OUT:
	*last = '\0';
}