Make whitespace changes

Status lines for Emacs and Vim have been added to Python sources so
they'll be easier to edit using Python's preferred coding style.

Some DNS helper functions have been broken up into multiple files. It's
nice to have one function per file whenever possible, since that way we
don't need -ffunction-sections.  Another reason it's good to have small
source files, is because the build will be enforcing resource limits on
compilation and testing soon.
This commit is contained in:
Justine Tunney 2021-08-13 03:20:45 -07:00
parent 71273bc5c9
commit 9b29358511
293 changed files with 1975 additions and 609 deletions

View file

@ -1,3 +1,9 @@
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│
vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi
Python 3
https://docs.python.org/3/license.html │
*/
#define PY_SSIZE_T_CLEAN
#include "libc/assert.h"
#include "third_party/python/Include/abstract.h"
@ -12,6 +18,7 @@
#include "third_party/python/Include/unicodeobject.h"
#include "third_party/zlib/zlib.h"
/* clang-format off */
/*
** Routines to represent binary data in ASCII and vice-versa
**
@ -153,8 +160,6 @@ static const char table_a2b_base64[] = {
static const unsigned char table_b2a_base64[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static const unsigned short crctab_hqx[256] = {
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,
0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef,
@ -1411,11 +1416,9 @@ static struct PyMethodDef binascii_module_methods[] = {
{NULL, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called PyInit_binascii) */
PyDoc_STRVAR(doc_binascii, "Conversion between binary data and ASCII");
static struct PyModuleDef binasciimodule = {
PyModuleDef_HEAD_INIT,
"binascii",