Lines Matching refs:tmpbuf

6087 static size_t transfer_encoded_size(mb_convert_buf *tmpbuf, bool base64)  in transfer_encoded_size()  argument
6090 return ((mb_convert_buf_len(tmpbuf) + 2) / 3) * 4; in transfer_encoded_size()
6093 unsigned char *p = (unsigned char*)ZSTR_VAL(tmpbuf->str); in transfer_encoded_size()
6094 while (p < tmpbuf->out) { in transfer_encoded_size()
6102 static void transfer_encode_mime_bytes(mb_convert_buf *tmpbuf, mb_convert_buf *outbuf, bool base64) in transfer_encode_mime_bytes() argument
6106 unsigned char *p = (unsigned char*)ZSTR_VAL(tmpbuf->str), *e = tmpbuf->out; in transfer_encode_mime_bytes()
6144 mb_convert_buf_reset(tmpbuf, 0); in transfer_encode_mime_bytes()
6329 mb_convert_buf tmpbuf; in mb_mime_header_encode() local
6330 mb_convert_buf_init(&tmpbuf, in_len, '?', MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR); in mb_mime_header_encode()
6365 size_t tmppos = mb_convert_buf_len(&tmpbuf); in mb_mime_header_encode()
6366 unsigned int tmpstate = tmpbuf.state; in mb_mime_header_encode()
6372 outcode->from_wchar(p, n, &tmpbuf, false); in mb_mime_header_encode()
6377 size_t tmppos2 = mb_convert_buf_len(&tmpbuf); in mb_mime_header_encode()
6378 unsigned int tmpstate2 = tmpbuf.state; in mb_mime_header_encode()
6379 outcode->from_wchar(NULL, 0, &tmpbuf, true); in mb_mime_header_encode()
6381 if (transfer_encoded_size(&tmpbuf, base64) <= space_available || (n == 1 && tmppos == 0)) { in mb_mime_header_encode()
6390 transfer_encode_mime_bytes(&tmpbuf, &buf, base64); in mb_mime_header_encode()
6393 mb_convert_buf_free(&tmpbuf); in mb_mime_header_encode()
6398 mb_convert_buf_reset(&tmpbuf, tmppos2); in mb_mime_header_encode()
6399 tmpbuf.state = tmpstate2; in mb_mime_header_encode()
6404 mb_convert_buf_reset(&tmpbuf, tmppos); in mb_mime_header_encode()
6405 tmpbuf.state = tmpstate; in mb_mime_header_encode()
6410 outcode->from_wchar(NULL, 0, &tmpbuf, true); in mb_mime_header_encode()
6411 transfer_encode_mime_bytes(&tmpbuf, &buf, base64); in mb_mime_header_encode()
6412 tmpbuf.state = 0; in mb_mime_header_encode()
6434 mb_convert_buf_free(&tmpbuf); in mb_mime_header_encode()