Lines Matching refs:ascii_data
276 const unsigned char *ascii_data; in binascii_a2b_uu_impl() local
285 ascii_data = data->buf; in binascii_a2b_uu_impl()
291 bin_len = (*ascii_data++ - ' ') & 077; in binascii_a2b_uu_impl()
299 for( ; bin_len > 0 ; ascii_len--, ascii_data++ ) { in binascii_a2b_uu_impl()
301 this_ch = (ascii_len > 0) ? *ascii_data : 0; in binascii_a2b_uu_impl()
343 this_ch = *ascii_data++; in binascii_a2b_uu_impl()
374 unsigned char *ascii_data; in binascii_b2a_uu_impl() local
398 ascii_data = _PyBytesWriter_Alloc(&writer, out_len); in binascii_b2a_uu_impl()
399 if (ascii_data == NULL) in binascii_b2a_uu_impl()
404 *ascii_data++ = '`'; in binascii_b2a_uu_impl()
406 *ascii_data++ = ' ' + (unsigned char)bin_len; in binascii_b2a_uu_impl()
421 *ascii_data++ = '`'; in binascii_b2a_uu_impl()
423 *ascii_data++ = this_ch + ' '; in binascii_b2a_uu_impl()
426 *ascii_data++ = '\n'; /* Append a courtesy newline */ in binascii_b2a_uu_impl()
428 return _PyBytesWriter_Finish(&writer, ascii_data); in binascii_b2a_uu_impl()
446 const unsigned char *ascii_data = data->buf; in binascii_a2b_base64_impl() local
462 unsigned char this_ch = ascii_data[i]; in binascii_a2b_base64_impl()
549 unsigned char *ascii_data; in binascii_b2a_base64_impl() local
579 ascii_data = _PyBytesWriter_Alloc(&writer, out_len); in binascii_b2a_base64_impl()
580 if (ascii_data == NULL) in binascii_b2a_base64_impl()
592 *ascii_data++ = table_b2a_base64[this_ch]; in binascii_b2a_base64_impl()
596 *ascii_data++ = table_b2a_base64[(leftchar&3) << 4]; in binascii_b2a_base64_impl()
597 *ascii_data++ = BASE64_PAD; in binascii_b2a_base64_impl()
598 *ascii_data++ = BASE64_PAD; in binascii_b2a_base64_impl()
600 *ascii_data++ = table_b2a_base64[(leftchar&0xf) << 2]; in binascii_b2a_base64_impl()
601 *ascii_data++ = BASE64_PAD; in binascii_b2a_base64_impl()
604 *ascii_data++ = '\n'; /* Append a courtesy newline */ in binascii_b2a_base64_impl()
606 return _PyBytesWriter_Finish(&writer, ascii_data); in binascii_b2a_base64_impl()
627 const unsigned char *ascii_data; in binascii_a2b_hqx_impl() local
638 ascii_data = data->buf; in binascii_a2b_hqx_impl()
654 for( ; len > 0 ; len--, ascii_data++ ) { in binascii_a2b_hqx_impl()
656 this_ch = table_a2b_hqx[*ascii_data]; in binascii_a2b_hqx_impl()
787 unsigned char *ascii_data; in binascii_b2a_hqx_impl() local
805 ascii_data = _PyBytesWriter_Alloc(&writer, len * 2 + 2); in binascii_b2a_hqx_impl()
806 if (ascii_data == NULL) in binascii_b2a_hqx_impl()
816 *ascii_data++ = table_b2a_hqx[this_ch]; in binascii_b2a_hqx_impl()
822 *ascii_data++ = table_b2a_hqx[leftchar & 0x3f]; in binascii_b2a_hqx_impl()
825 return _PyBytesWriter_Finish(&writer, ascii_data); in binascii_b2a_hqx_impl()
1305 const unsigned char *ascii_data; in binascii_a2b_qp_impl() local
1310 ascii_data = data->buf; in binascii_a2b_qp_impl()
1323 if (ascii_data[in] == '=') { in binascii_a2b_qp_impl()
1327 if ((ascii_data[in] == '\n') || (ascii_data[in] == '\r')) { in binascii_a2b_qp_impl()
1328 if (ascii_data[in] != '\n') { in binascii_a2b_qp_impl()
1329 while (in < datalen && ascii_data[in] != '\n') in++; in binascii_a2b_qp_impl()
1333 else if (ascii_data[in] == '=') { in binascii_a2b_qp_impl()
1339 ((ascii_data[in] >= 'A' && ascii_data[in] <= 'F') || in binascii_a2b_qp_impl()
1340 (ascii_data[in] >= 'a' && ascii_data[in] <= 'f') || in binascii_a2b_qp_impl()
1341 (ascii_data[in] >= '0' && ascii_data[in] <= '9')) && in binascii_a2b_qp_impl()
1342 ((ascii_data[in+1] >= 'A' && ascii_data[in+1] <= 'F') || in binascii_a2b_qp_impl()
1343 (ascii_data[in+1] >= 'a' && ascii_data[in+1] <= 'f') || in binascii_a2b_qp_impl()
1344 (ascii_data[in+1] >= '0' && ascii_data[in+1] <= '9'))) { in binascii_a2b_qp_impl()
1346 ch = _PyLong_DigitValue[ascii_data[in]] << 4; in binascii_a2b_qp_impl()
1348 ch |= _PyLong_DigitValue[ascii_data[in]]; in binascii_a2b_qp_impl()
1356 else if (header && ascii_data[in] == '_') { in binascii_a2b_qp_impl()
1361 odata[out] = ascii_data[in]; in binascii_a2b_qp_impl()