Improve documentation

The Cosmo API documentation page is pretty good now
https://justine.lol/cosmopolitan/documentation.html
This commit is contained in:
Justine Tunney 2020-12-27 07:02:35 -08:00
parent 13437dd19b
commit 1bc3a25505
367 changed files with 2542 additions and 26178 deletions

View file

@ -90,13 +90,8 @@ get_TI(void)
#define p5s TI0.P5s
#endif /*}}*/
Bigint *
Balloc
#ifdef KR_headers
(k MTa) int k; MTk
#else
(int k MTd)
#endif
Bigint *
Balloc(int k MTd)
{
int x;
Bigint *rv;
@ -152,13 +147,8 @@ Balloc
return rv;
}
void
Bfree
#ifdef KR_headers
(v MTa) Bigint *v; MTk
#else
(Bigint *v MTd)
#endif
void
Bfree(Bigint *v MTd)
{
#ifdef MULTIPLE_THREADS
ThInfo *TI;
@ -187,13 +177,8 @@ Bfree
}
}
int
lo0bits
#ifdef KR_headers
(y) ULong *y;
#else
(ULong *y)
#endif
int
lo0bits(ULong *y)
{
int k;
ULong x = *y;
@ -235,13 +220,8 @@ lo0bits
return k;
}
Bigint *
multadd
#ifdef KR_headers
(b, m, a MTa) Bigint *b; int m, a; MTk
#else
(Bigint *b, int m, int a MTd) /* multiply by m and add a */
#endif
Bigint *
multadd(Bigint *b, int m, int a MTd) /* multiply by m and add a */
{
int i, wds;
#ifdef ULLong
@ -292,13 +272,8 @@ multadd
return b;
}
int
hi0bits_D2A
#ifdef KR_headers
(x) ULong x;
#else
(ULong x)
#endif
int
__gdtoa_hi0bits(ULong x)
{
int k = 0;
@ -326,13 +301,8 @@ hi0bits_D2A
return k;
}
Bigint *
i2b
#ifdef KR_headers
(i MTa) int i; MTk
#else
(int i MTd)
#endif
Bigint *
i2b(int i MTd)
{
Bigint *b;
@ -342,13 +312,8 @@ i2b
return b;
}
Bigint *
mult
#ifdef KR_headers
(a, b MTa) Bigint *a, *b; MTk
#else
(Bigint *a, Bigint *b MTd)
#endif
Bigint *
mult(Bigint *a, Bigint *b MTd)
{
Bigint *c;
int k, wa, wb, wc;
@ -452,13 +417,8 @@ mult
return c;
}
Bigint *
pow5mult
#ifdef KR_headers
(b, k MTa) Bigint *b; int k; MTk
#else
(Bigint *b, int k MTd)
#endif
Bigint *
pow5mult(Bigint *b, int k MTd)
{
Bigint *b1, *p5, *p51;
#ifdef MULTIPLE_THREADS
@ -524,13 +484,8 @@ pow5mult
return b;
}
Bigint *
lshift
#ifdef KR_headers
(b, k MTa) Bigint *b; int k; MTk
#else
(Bigint *b, int k MTd)
#endif
Bigint *
lshift(Bigint *b, int k MTd)
{
int i, k1, n, n1;
Bigint *b1;
@ -578,13 +533,8 @@ lshift
return b1;
}
int
cmp
#ifdef KR_headers
(a, b) Bigint *a, *b;
#else
(Bigint *a, Bigint *b)
#endif
int
cmp(Bigint *a, Bigint *b)
{
ULong *xa, *xa0, *xb, *xb0;
int i, j;
@ -612,13 +562,8 @@ cmp
return 0;
}
Bigint *
diff
#ifdef KR_headers
(a, b MTa) Bigint *a, *b; MTk
#else
(Bigint *a, Bigint *b MTd)
#endif
Bigint *
diff(Bigint *a, Bigint *b MTd)
{
Bigint *c;
int i, wa, wb;
@ -706,13 +651,8 @@ diff
return c;
}
double
b2d
#ifdef KR_headers
(a, e) Bigint *a; int *e;
#else
(Bigint *a, int *e)
#endif
double
b2d(Bigint *a, int *e)
{
ULong *xa, *xa0, w, y, z;
int k;
@ -775,13 +715,8 @@ b2d
#undef d0
#undef d1
Bigint *
d2b
#ifdef KR_headers
(dd, e, bits MTa) double dd; int *e, *bits; MTk
#else
(double dd, int *e, int *bits MTd)
#endif
Bigint *
d2b(double dd, int *e, int *bits MTd)
{
Bigint *b;
U d;
@ -913,7 +848,7 @@ d2b
#undef d0
#undef d1
CONST double
CONST double
#ifdef IEEE_Arith
bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 };
CONST double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128, 1e-256
@ -928,7 +863,7 @@ CONST double tinytens[] = { 1e-16, 1e-32 };
#endif
#endif
CONST double
CONST double
tens[] = {
1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
@ -938,12 +873,8 @@ tens[] = {
#endif
};
char *
#ifdef KR_headers
strcp_D2A(a, b) char *a; char *b;
#else
strcp_D2A(char *a, CONST char *b)
#endif
char *
__gdtoa_strcp(char *a, CONST char *b)
{
while((*a = *b++))
a++;
@ -952,12 +883,8 @@ strcp_D2A(char *a, CONST char *b)
#ifdef NO_STRING_H
Char *
#ifdef KR_headers
memcpy_D2A(a, b, len) Char *a; Char *b; size_t len;
#else
memcpy_D2A(void *a1, void *b1, size_t len)
#endif
Char *
__gdtoa_memcpy(void *a1, void *b1, size_t len)
{
char *a = (char*)a1, *ae = a + len;
char *b = (char*)b1, *a0 = a;