Make improvements

- Expand redbean UNIX module
- Expand redbean documentation
- Ensure Lua copyright is embedded in binary
- Increase the PATH_MAX limit especially on NT
- Use column major sorting for linenoise completions
- Fix some suboptimalities in redbean's new UNIX API
- Figured out right flags for Multics newline in raw mode
This commit is contained in:
Justine Tunney 2022-04-24 09:59:22 -07:00
parent cf3174dc74
commit 2046c0d2ae
305 changed files with 6602 additions and 4221 deletions

View file

@ -496,7 +496,7 @@ static void OnMouse(char *p) {
static void ReadKeyboard(void) {
char buf[32], *p = buf;
memset(buf, 0, sizeof(buf));
bzero(buf, sizeof(buf));
if (readansi(0, buf, sizeof(buf)) == -1) {
if (errno == EINTR) return;
exit(errno);
@ -797,7 +797,7 @@ static void Zoom(long have) {
n >>= 1;
}
if (n < tyn * txn) {
memset(canvas + n, 0, canvassize - n);
bzero(canvas + n, canvassize - n);
}
if (have != -1) {
n = have >> zoom;
@ -817,7 +817,7 @@ static void FileZoom(void) {
have = MIN(displaysize, size - offset);
have = pread(fd, canvas, have, offset);
have = MAX(0, have);
memset(canvas + have, 0, canvassize - have);
bzero(canvas + have, canvassize - have);
Zoom(have);
Render();
}