Further refine documentation

This commit is contained in:
Justine Tunney 2020-12-27 17:05:03 -08:00
parent 1bc3a25505
commit 548dcb9f08
27 changed files with 389 additions and 1478 deletions

View file

@ -40,15 +40,15 @@ M(0, i, "true", True, 1, "1")
M(0, i, "intmin", IntMin, INT128_MIN, "native integer minimum")
M(0, i, "intmax", IntMax, INT128_MAX, "native integer maximum")
M(0, f, "e", Euler, M_E, "𝑒")
M(0, f, "pi", Fldpi, fldpi(), "π")
M(0, f, "pi", Fldpi, M_PI, "π")
M(0, f, "epsilon", Epsilon, EPSILON, "ɛ")
M(0, f, "inf", Inf, INFINITY, "")
M(0, f, "nan", Nan, NAN, "NAN")
M(0, f, "-0", Negzero, -0., "wut")
M(0, f, "l2t", Fldl2t, fldl2t(), "log₂10")
M(0, f, "lg2", Fldlg2, fldlg2(), "log₁₀2")
M(0, f, "ln2", Fldln2, fldln2(), "logₑ2")
M(0, f, "l2e", Fldl2e, fldl2e(), "logₑ10")
M(0, f, "l2t", Fldl2t, M_LOG2_10, "log₂10")
M(0, f, "lg2", Fldlg2, M_LOG10_2, "log₁₀2")
M(0, f, "ln2", Fldln2, M_LN2, "logₑ2")
M(0, f, "l2e", Fldl2e, M_LOG2E, "logₑ10")
M(1, f, "sqrt", Sqrt, sqrtl(x), "√𝑥")
M(1, f, "exp", Exp, expl(x), "𝑒ˣ")

View file

@ -86,7 +86,6 @@
#include "libc/sysv/consts/sa.h"
#include "libc/sysv/consts/shut.h"
#include "libc/sysv/consts/sig.h"
#include "libc/sysv/consts/sock.h"
#include "libc/sysv/consts/splice.h"
#include "libc/sysv/consts/termios.h"
#include "libc/sysv/consts/w.h"
@ -251,7 +250,6 @@ static const struct NamedVector kLightings[] = {
};
static plm_t *plm_;
static FILE *fsock_;
static float gamma_;
static int volscale_;
static enum Blur blur_;
@ -1210,8 +1208,6 @@ static void PerformBestEffortIo(void) {
struct pollfd fds[] = {
{infd_, POLLIN},
{outfd_, f1_ && f1_->n ? POLLOUT : 0},
{fsock_ ? fileno(fsock_) : -1,
fsock_ && favail(fsock_) < (NETBUFSIZ >> 1) ? POLLIN : 0},
};
pollms = MAX(0, AsMilliseconds(GetGraceTime()));
DEBUGF("poll() ms=%,d", pollms);
@ -1221,12 +1217,6 @@ static void PerformBestEffortIo(void) {
if (toto) {
if (fds[0].revents & (POLLIN | POLLERR)) ReadKeyboard();
if (fds[1].revents & (POLLOUT | POLLERR)) WriteVideo();
if (fds[2].revents & (POLLHUP | POLLERR)) {
LOGIFNEG1(shutdown(fsock_->fd, SHUT_RD));
fsock_ = NULL; /* plm destroys it */
} else if (fds[2].revents & POLLIN) {
freplenish(fsock_);
}
}
} else if (errno == EINTR) {
DEBUGF("poll() → EINTR");