mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-28 13:30:29 +00:00
Update redbean lua example code
This commit is contained in:
parent
451e3f73d9
commit
72e9be5c20
7 changed files with 56 additions and 51 deletions
6
third_party/linenoise/linenoise.c
vendored
6
third_party/linenoise/linenoise.c
vendored
|
@ -781,7 +781,9 @@ static ssize_t linenoiseRead(int fd, char *buf, size_t size,
|
|||
if (l && gotwinch) refreshme = 1;
|
||||
if (refreshme) linenoiseRefreshLine(l);
|
||||
if (!block && linenoisePoll(l, fd) == -1) return -1;
|
||||
--__strace;
|
||||
rc = readansi(fd, buf, size);
|
||||
++__strace;
|
||||
if (rc == -1 && errno == EINTR) {
|
||||
if (!block) break;
|
||||
} else {
|
||||
|
@ -1277,11 +1279,15 @@ StartOver:
|
|||
}
|
||||
|
||||
void linenoiseRefreshLine(struct linenoiseState *l) {
|
||||
--__strace;
|
||||
linenoiseRefreshLineImpl(l, 0);
|
||||
++__strace;
|
||||
}
|
||||
|
||||
static void linenoiseRefreshLineForce(struct linenoiseState *l) {
|
||||
--__strace;
|
||||
linenoiseRefreshLineImpl(l, 1);
|
||||
++__strace;
|
||||
}
|
||||
|
||||
static void linenoiseEditInsert(struct linenoiseState *l, const char *p,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue