/* Heuristic to guess if this is a string or concatenated strings.  */
static int is_printable_string(const void *data, int len)
/* Heuristic to guess if this is a string or concatenated strings.  */
static int is_printable_string(const void *data, int len)
{
	const char *s = data;
	if (len == 0)
		return 0;
	if (s[len - 1] != '\0' && s[len - 1] != '\n')
		return 0;
	while (((*s == '\0') || isprint(*s) || isspace(*s)) && (len > 0)) {
		if (s[0] == '\0') {
			if (len == 1)
				return 1;
			if (s[1] == '\0')
				return 0;
		}
		s++;
		len--;
	}
	if (*s != '\0' || (len != 0))
		return 0;
	return 1;
}