if(lflags & ASN1_STRFLGS_SHOW_NAME) {
if(lflags & ASN1_STRFLGS_SHOW_TYPE) {
static int do_print_ex(char_io *io_ch, void *arg, unsigned long lflags, ASN1_STRING *str){	int outlen, len;	int type;	char quotes;	unsigned char flags;	quotes = 0;	/* Keep a copy of escape flags */	flags = lflags & ESC_FLAGS;	type = str->type;	outlen = 0;	if(lflags & ASN1_STRFLGS_SHOW_NAME) {		const char *tagname;		tagname = ASN1_tag2str(type);		outlen += strlen(tagname);		if(!io_ch(arg, tagname, outlen) || !io_ch(arg, ":", 1)) return -1; 		outlen++;	}	/* Decide what to do with type, either dump content or display it */	/* Dump everything */	if(lflags & ASN1_STRFLGS_DUMP_ALL) type = -1;	/* Ignore the string type */	else if(lflags & ASN1_STRFLGS_IGNORE_TYPE) type = 1;	else {		/* Else determine width based on type */		if((type > 0) && (type < 31)) type = tag2nbyte[type];		else type = -1;		if((type == -1) && !(lflags & ASN1_STRFLGS_DUMP_UNKNOWN)) type = 1;	}	if(type == -1) {		len = do_dump(lflags, io_ch, arg, str);		if(len < 0) return -1;		outlen += len;		return outlen;	}	if(lflags & ASN1_STRFLGS_UTF8_CONVERT) {		/* Note: if string is UTF8 and we want		 * to convert to UTF8 then we just interpret		 * it as 1 byte per character to avoid converting		 * twice.		 */		if(!type) type = 1;		else type |= BUF_TYPE_CONVUTF8;	}	len = do_buf(str->data, str->length, type, flags, &quotes, io_ch, NULL);	if(outlen < 0) return -1;	outlen += len;	if(quotes) outlen += 2;	if(!arg) return outlen;	if(quotes && !io_ch(arg, "\"", 1)) return -1;	do_buf(str->data, str->length, type, flags, NULL, io_ch, arg);	if(quotes && !io_ch(arg, "\"", 1)) return -1;	return outlen;}