snarf, plumbing
This commit is contained in:
parent
7f3d278a3b
commit
0c7f940a72
2 changed files with 6 additions and 8 deletions
|
|
@ -97,8 +97,6 @@ threadmain(int argc, char *argv[])
|
||||||
keyboardctl = initkeyboard(nil);
|
keyboardctl = initkeyboard(nil);
|
||||||
if(keyboardctl == nil)
|
if(keyboardctl == nil)
|
||||||
error("cannot find keyboard");
|
error("cannot find keyboard");
|
||||||
if((plumbfd = plumbopen("send", OWRITE)) < 0)
|
|
||||||
fprint(2, "9term: plumbopen: %r\n");
|
|
||||||
mouse = &mousectl->m;
|
mouse = &mousectl->m;
|
||||||
|
|
||||||
winclosechan = chancreate(sizeof(Window*), 0);
|
winclosechan = chancreate(sizeof(Window*), 0);
|
||||||
|
|
@ -523,7 +521,6 @@ riogetsnarf(void)
|
||||||
char *s;
|
char *s;
|
||||||
int n, nb, nulls;
|
int n, nb, nulls;
|
||||||
|
|
||||||
fprint(2, "getsnarf\n");
|
|
||||||
s = getsnarf();
|
s = getsnarf();
|
||||||
if(s == nil)
|
if(s == nil)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
#include <keyboard.h>
|
#include <keyboard.h>
|
||||||
#include <frame.h>
|
#include <frame.h>
|
||||||
#include <fcall.h>
|
#include <fcall.h>
|
||||||
|
#include <9pclient.h>
|
||||||
#include <plumb.h>
|
#include <plumb.h>
|
||||||
#include <complete.h>
|
#include <complete.h>
|
||||||
#include "dat.h"
|
#include "dat.h"
|
||||||
|
|
@ -806,14 +807,14 @@ void
|
||||||
wplumb(Window *w)
|
wplumb(Window *w)
|
||||||
{
|
{
|
||||||
Plumbmsg *m;
|
Plumbmsg *m;
|
||||||
static int fd = -2;
|
static CFid *fd;
|
||||||
char buf[32];
|
char buf[32];
|
||||||
uint p0, p1;
|
uint p0, p1;
|
||||||
Cursor *c;
|
Cursor *c;
|
||||||
|
|
||||||
if(fd == -2)
|
if(fd == nil)
|
||||||
fd = plumbopen("send", OWRITE|OCEXEC);
|
fd = plumbopenfid("send", OWRITE);
|
||||||
if(fd < 0)
|
if(fd == nil)
|
||||||
return;
|
return;
|
||||||
m = emalloc(sizeof(Plumbmsg));
|
m = emalloc(sizeof(Plumbmsg));
|
||||||
m->src = estrdup("rio");
|
m->src = estrdup("rio");
|
||||||
|
|
@ -837,7 +838,7 @@ wplumb(Window *w)
|
||||||
return; /* too large for 9P */
|
return; /* too large for 9P */
|
||||||
}
|
}
|
||||||
m->data = runetobyte(w->r+p0, p1-p0, &m->ndata);
|
m->data = runetobyte(w->r+p0, p1-p0, &m->ndata);
|
||||||
if(plumbsend(fd, m) < 0){
|
if(plumbsendtofid(fd, m) < 0){
|
||||||
c = lastcursor;
|
c = lastcursor;
|
||||||
riosetcursor(&query, 1);
|
riosetcursor(&query, 1);
|
||||||
sleep(300);
|
sleep(300);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue