diff options
author | rsc <devnull@localhost> | 2005-11-07 15:07:40 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-11-07 15:07:40 +0000 |
commit | 0c7f940a724d3da79de887433ce89ad76cbf202a (patch) | |
tree | 750456f461efc5c2962098981b0726958079b908 /src/cmd/9term | |
parent | 7f3d278a3bf42d174ac7e33bca180b7f4adc8310 (diff) | |
download | plan9port-0c7f940a724d3da79de887433ce89ad76cbf202a.tar.gz plan9port-0c7f940a724d3da79de887433ce89ad76cbf202a.tar.bz2 plan9port-0c7f940a724d3da79de887433ce89ad76cbf202a.zip |
snarf, plumbing
Diffstat (limited to 'src/cmd/9term')
-rw-r--r-- | src/cmd/9term/9term.c | 3 | ||||
-rw-r--r-- | src/cmd/9term/wind.c | 11 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c index e62330a3..26e13f39 100644 --- a/src/cmd/9term/9term.c +++ b/src/cmd/9term/9term.c @@ -97,8 +97,6 @@ threadmain(int argc, char *argv[]) keyboardctl = initkeyboard(nil); if(keyboardctl == nil) error("cannot find keyboard"); - if((plumbfd = plumbopen("send", OWRITE)) < 0) - fprint(2, "9term: plumbopen: %r\n"); mouse = &mousectl->m; winclosechan = chancreate(sizeof(Window*), 0); @@ -523,7 +521,6 @@ riogetsnarf(void) char *s; int n, nb, nulls; -fprint(2, "getsnarf\n"); s = getsnarf(); if(s == nil) return; diff --git a/src/cmd/9term/wind.c b/src/cmd/9term/wind.c index 2eb2e638..69dec8a7 100644 --- a/src/cmd/9term/wind.c +++ b/src/cmd/9term/wind.c @@ -7,6 +7,7 @@ #include <keyboard.h> #include <frame.h> #include <fcall.h> +#include <9pclient.h> #include <plumb.h> #include <complete.h> #include "dat.h" @@ -806,14 +807,14 @@ void wplumb(Window *w) { Plumbmsg *m; - static int fd = -2; + static CFid *fd; char buf[32]; uint p0, p1; Cursor *c; - if(fd == -2) - fd = plumbopen("send", OWRITE|OCEXEC); - if(fd < 0) + if(fd == nil) + fd = plumbopenfid("send", OWRITE); + if(fd == nil) return; m = emalloc(sizeof(Plumbmsg)); m->src = estrdup("rio"); @@ -837,7 +838,7 @@ wplumb(Window *w) return; /* too large for 9P */ } m->data = runetobyte(w->r+p0, p1-p0, &m->ndata); - if(plumbsend(fd, m) < 0){ + if(plumbsendtofid(fd, m) < 0){ c = lastcursor; riosetcursor(&query, 1); sleep(300); |