mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
ANSI-fication
This commit is contained in:
parent
fe74263cec
commit
a788a7f0fb
4 changed files with 43 additions and 124 deletions
|
@ -187,9 +187,7 @@ static unsigned short crctab_hqx[256] = {
|
|||
static char doc_a2b_uu[] = "(ascii) -> bin. Decode a line of uuencoded data";
|
||||
|
||||
static PyObject *
|
||||
binascii_a2b_uu(self, args)
|
||||
PyObject *self;
|
||||
PyObject *args;
|
||||
binascii_a2b_uu(PyObject *self, PyObject *args)
|
||||
{
|
||||
unsigned char *ascii_data, *bin_data;
|
||||
int leftbits = 0;
|
||||
|
@ -264,9 +262,7 @@ binascii_a2b_uu(self, args)
|
|||
static char doc_b2a_uu[] = "(bin) -> ascii. Uuencode line of data";
|
||||
|
||||
static PyObject *
|
||||
binascii_b2a_uu(self, args)
|
||||
PyObject *self;
|
||||
PyObject *args;
|
||||
binascii_b2a_uu(PyObject *self, PyObject *args)
|
||||
{
|
||||
unsigned char *ascii_data, *bin_data;
|
||||
int leftbits = 0;
|
||||
|
@ -315,10 +311,7 @@ binascii_b2a_uu(self, args)
|
|||
|
||||
|
||||
static int
|
||||
binascii_find_valid(s, slen, num)
|
||||
char *s;
|
||||
int slen;
|
||||
int num;
|
||||
binascii_find_valid(unsigned char *s, int slen, int num)
|
||||
{
|
||||
/* Finds & returns the (num+1)th
|
||||
** valid character for base64, or -1 if none.
|
||||
|
@ -345,9 +338,7 @@ binascii_find_valid(s, slen, num)
|
|||
static char doc_a2b_base64[] = "(ascii) -> bin. Decode a line of base64 data";
|
||||
|
||||
static PyObject *
|
||||
binascii_a2b_base64(self, args)
|
||||
PyObject *self;
|
||||
PyObject *args;
|
||||
binascii_a2b_base64(PyObject *self, PyObject *args)
|
||||
{
|
||||
unsigned char *ascii_data, *bin_data;
|
||||
int leftbits = 0;
|
||||
|
@ -430,9 +421,7 @@ binascii_a2b_base64(self, args)
|
|||
static char doc_b2a_base64[] = "(bin) -> ascii. Base64-code line of data";
|
||||
|
||||
static PyObject *
|
||||
binascii_b2a_base64(self, args)
|
||||
PyObject *self;
|
||||
PyObject *args;
|
||||
binascii_b2a_base64(PyObject *self, PyObject *args)
|
||||
{
|
||||
unsigned char *ascii_data, *bin_data;
|
||||
int leftbits = 0;
|
||||
|
@ -483,9 +472,7 @@ binascii_b2a_base64(self, args)
|
|||
static char doc_a2b_hqx[] = "ascii -> bin, done. Decode .hqx coding";
|
||||
|
||||
static PyObject *
|
||||
binascii_a2b_hqx(self, args)
|
||||
PyObject *self;
|
||||
PyObject *args;
|
||||
binascii_a2b_hqx(PyObject *self, PyObject *args)
|
||||
{
|
||||
unsigned char *ascii_data, *bin_data;
|
||||
int leftbits = 0;
|
||||
|
@ -549,9 +536,7 @@ binascii_a2b_hqx(self, args)
|
|||
static char doc_rlecode_hqx[] = "Binhex RLE-code binary data";
|
||||
|
||||
static PyObject *
|
||||
binascii_rlecode_hqx(self, args)
|
||||
PyObject *self;
|
||||
PyObject *args;
|
||||
binascii_rlecode_hqx(PyObject *self, PyObject *args)
|
||||
{
|
||||
unsigned char *in_data, *out_data;
|
||||
PyObject *rv;
|
||||
|
@ -598,9 +583,7 @@ PyObject *args;
|
|||
static char doc_b2a_hqx[] = "Encode .hqx data";
|
||||
|
||||
static PyObject *
|
||||
binascii_b2a_hqx(self, args)
|
||||
PyObject *self;
|
||||
PyObject *args;
|
||||
binascii_b2a_hqx(PyObject *self, PyObject *args)
|
||||
{
|
||||
unsigned char *ascii_data, *bin_data;
|
||||
int leftbits = 0;
|
||||
|
@ -640,9 +623,7 @@ binascii_b2a_hqx(self, args)
|
|||
static char doc_rledecode_hqx[] = "Decode hexbin RLE-coded string";
|
||||
|
||||
static PyObject *
|
||||
binascii_rledecode_hqx(self, args)
|
||||
PyObject *self;
|
||||
PyObject *args;
|
||||
binascii_rledecode_hqx(PyObject *self, PyObject *args)
|
||||
{
|
||||
unsigned char *in_data, *out_data;
|
||||
unsigned char in_byte, in_repeat;
|
||||
|
@ -739,9 +720,7 @@ static char doc_crc_hqx[] =
|
|||
"(data, oldcrc) -> newcrc. Compute hqx CRC incrementally";
|
||||
|
||||
static PyObject *
|
||||
binascii_crc_hqx(self, args)
|
||||
PyObject *self;
|
||||
PyObject *args;
|
||||
binascii_crc_hqx(PyObject *self, PyObject *args)
|
||||
{
|
||||
unsigned char *bin_data;
|
||||
unsigned int crc;
|
||||
|
@ -879,9 +858,7 @@ static unsigned long crc_32_tab[256] = {
|
|||
};
|
||||
|
||||
static PyObject *
|
||||
binascii_crc32(self, args)
|
||||
PyObject *self;
|
||||
PyObject *args;
|
||||
binascii_crc32(PyObject *self, PyObject *args)
|
||||
{ /* By Jim Ahlstrom; All rights transferred to CNRI */
|
||||
unsigned char *bin_data;
|
||||
unsigned long crc = 0UL; /* initial value of CRC */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue