commit - e830a908498c8f0270948fd08c50f6d773315880
commit + 10ab06a791c2ed5cccd8ab7e24fb435997b7a47a
blob - 285878e8b82b0946df372d9b1b544a98266fe938
blob + c610e0468afa90fc96327107191880559eacbb5a
--- src/cmd/9term/9term.c
+++ src/cmd/9term/9term.c
pair.ns = nr;
send(cwm.cw, &pair);
}
+}
+
+void
+winterrupt(Window *w)
+{
+ char rubout[1];
+
+ USED(w);
+ rubout[0] = getintr(sfd);
+ write(rcfd, rubout, 1);
}
/*
blob - 9fc3093323ba57b65b1161a4a2a6266b27694d09
blob + 2d31ad882dae0b6431f9cbae9f1f08435ae0d25d
--- src/cmd/9term/fns.h
+++ src/cmd/9term/fns.h
void timerinit(void);
int goodrect(Rectangle);
int rawon(void);
+void winterrupt(Window*);
#define runemalloc(n) malloc((n)*sizeof(Rune))
#define runerealloc(a, n) realloc(a, (n)*sizeof(Rune))
blob - 600a4e42187f377973c137129e3442e6148d8d37
blob + 781a91d585aba8cdecda88d2835c61c1dd5d7069
--- src/cmd/9term/wind.c
+++ src/cmd/9term/wind.c
uint q0 ,q1;
int n, nb, nr;
Rune *rp;
- int *notefd;
if(r == 0)
return;
case 0x7F: /* send interrupt */
w->qh = w->nr;
wshow(w, w->qh);
- notefd = emalloc(sizeof(int));
- *notefd = w->notefd;
- proccreate(interruptproc, notefd, 4096);
+ winterrupt(w);
return;
case 0x06: /* ^F: file name completion */
case Kins: /* Insert: file name completion */
wsetpid(Window *w, int pid, int dolabel)
{
char buf[128];
- int fd;
w->pid = pid;
if(dolabel){
sprint(buf, "rc %d", pid);
free(w->label);
w->label = estrdup(buf);
+ drawsetlabel(w->label);
}
- sprint(buf, "/proc/%d/notepg", pid);
- fd = open(buf, OWRITE|OCEXEC);
- if(w->notefd > 0)
- close(w->notefd);
- w->notefd = fd;
}
static Rune left1[] = { '{', '[', '(', '<', 0xAB, 0 };