From f005d2950d8286475fc804e0d0e0cfbf99014323 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Wed, 23 Oct 2019 18:03:53 -0400 Subject: Send to server if client has no needs --- client.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/client.c b/client.c index 0bba8d3..74d1e5c 100644 --- a/client.c +++ b/client.c @@ -158,9 +158,15 @@ void clientRecv(struct Client *client) { for (;;) { crlf = memmem(line, &client->buf[client->len] - line, "\r\n", 2); if (!crlf) break; - crlf[0] = '\0'; - if (verbose) fprintf(stderr, "\x1B[33m%s\x1B[m\n", line); - clientParse(client, line); + if (verbose) { + fprintf(stderr, "\x1B[33m%.*s\x1B[m\n", (int)(crlf - line), line); + } + if (client->need) { + crlf[0] = '\0'; + clientParse(client, line); + } else { + serverSend(line, crlf + 2 - line); + } line = crlf + 2; } client->len -= line - client->buf; -- cgit 1.4.1
summary refs log tree commit diff
path: root/bin/glitch.c (unfollow)
Commit message (Collapse)Author
2018-04-03Ignore c and txtJune McEnroe
2018-04-03Move home bins to ~/.local/binJune McEnroe
Also replaced ~/.cargo/bin with a symlink to ~/.local/bin to avoid having to have that in $path as well.
2018-04-02Highlight Special as NormalJune McEnroe
Special characters in strings are more like normal code than keywords.
2018-04-02Use size_t for iterating in schemeJune McEnroe
2018-04-02Modulo H and saturate S, V in schemeJune McEnroe
2018-04-02Rewrite scheme in a more sensible orderJune McEnroe
2018-04-02Use function pointers in schemeJune McEnroe
2018-04-02Use union for scheme gen functionsJune McEnroe
2018-04-02Use uint32_t for len in schemeJune McEnroe
There are potentially 256 colours.
2018-04-01Add HSV output to schemeJune McEnroe
2018-03-31Output Linux console escapes from schemeJune McEnroe
2018-03-31Add scheme to READMEJune McEnroe
2018-03-31Brighten color schemeJune McEnroe
2018-03-31Set Dark terminal to schemeJune McEnroe
2018-03-31Lighten cursor colorJune McEnroe
2018-03-31Tweak cyan furtherJune McEnroe
It's actually green at this point.
2018-03-31Tweak colors in schemeJune McEnroe
2018-03-31Add scheme.png targetJune McEnroe
2018-03-31Generate Terminal.app color schemeJune McEnroe
Colors still very much WIP, but coming along.
2018-03-31Generate basic ANSI color schemeJune McEnroe
2018-03-31Add hex output to schemeJune McEnroe
2018-03-31Add color scheme PNG generatorJune McEnroe
2018-03-31Simplify gfxx palette generationJune McEnroe
2018-03-31Switch to HSV for gfxx palette generationJune McEnroe
2018-03-30Generate default palette in gfxxJune McEnroe
2018-03-30Ignore build and cloneJune McEnroe
2018-03-30Set g:clipboard to pb{copy,paste} alwaysJune McEnroe
Previously neovim would use these automatically if it found them, but now it only checks for them on macOS. pbd continues to work well.
2018-03-28Add d-_-b crateJune McEnroe