} else BIO_write(bpart, "\r\n", 2);  while(iscrlf(linebuf[len - 1])) len--; BIO_write(bpart, linebuf, len);
} else if (eol) BIO_write(bpart, "\r\n", 2); eol = next_eol; if (len) BIO_write(bpart, linebuf, len);
static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret){	char linebuf[MAX_SMLEN];	int len, blen;	BIO *bpart = NULL;	STACK_OF(BIO) *parts;	char state, part, first;	blen = strlen(bound);	part = 0;	state = 0;	first = 1;	parts = sk_BIO_new_null();	*ret = parts;	while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {		state = mime_bound_check(linebuf, len, bound, blen);		if(state == 1) {			first = 1;			part++;		} else if(state == 2) {			sk_BIO_push(parts, bpart);			return 1;		} else if(part) {			if(first) {				first = 0;				if(bpart) sk_BIO_push(parts, bpart);				bpart = BIO_new(BIO_s_mem());							} else BIO_write(bpart, "\r\n", 2);			/* Strip CR+LF from linebuf */			while(iscrlf(linebuf[len - 1])) len--;			BIO_write(bpart, linebuf, len);		}	}	return 0;}