add control-d to send the message. strip trailing control-d and newlines.
1 files changed, 13 insertions(+), 0 deletions(-) M main.c
M main.c => main.c +13-0
@@ 57,6 57,11 @@ wineventproc(void *aux) sendp(ctl, "act"); break; case 'I': if(strcmp(ev.text, "") == 0) sendp(ctl, "send"); break; } } @@ } 66,11 71,19 @@ readbody(AWin *w) { Biobuf *fd; char *buf; int i; fd = awinfsbopen(w, "body", OREAD); buf = Brdstr(fd, '\0', 0); Bterm(fd); for(i = strlen(buf)-1; i > 0; i--) { if(buf[i] == '' || buf[i] == '\n') buf[i] = '\0'; else break; } awinclear(w); return buf;