tadd ? for unknown plumbs - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit acc021b8f8c727c0f04f33615354170fd7bccd0c
(DIR) parent 4fe01a2b112e98271b429738b3f9d617bd348ab1
(HTM) Author: rsc <devnull@localhost>
Date: Sun, 2 Jan 2005 03:45:07 +0000
add ? for unknown plumbs
Diffstat:
M src/cmd/9term/9term.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c
t@@ -196,6 +196,18 @@ Cursor whitearrow = {
0xD3, 0xB8, 0xF1, 0xF0, 0xE0, 0xE0, 0xC0, 0x40, }
};
+Cursor query = {
+ {-7,-7},
+ {0x0f, 0xf0, 0x1f, 0xf8, 0x3f, 0xfc, 0x7f, 0xfe,
+ 0x7c, 0x7e, 0x78, 0x7e, 0x00, 0xfc, 0x01, 0xf8,
+ 0x03, 0xf0, 0x07, 0xe0, 0x07, 0xc0, 0x07, 0xc0,
+ 0x07, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0xc0, },
+ {0x00, 0x00, 0x0f, 0xf0, 0x1f, 0xf8, 0x3c, 0x3c,
+ 0x38, 0x1c, 0x00, 0x3c, 0x00, 0x78, 0x00, 0xf0,
+ 0x01, 0xe0, 0x03, 0xc0, 0x03, 0x80, 0x03, 0x80,
+ 0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, }
+};
+
void
usage(void)
{
t@@ -1791,7 +1803,14 @@ plumb(uint q0, uint q1)
p += runetochar(p, t.r+q0+i);
*p = '\0';
pm->ndata = strlen(pm->data);
- plumbsend(plumbfd, pm);
+ if(plumbsend(plumbfd, pm) < 0){
+ setcursor(mc, &query);
+ sleep(500);
+ if(holdon)
+ setcursor(mc, &whitearrow);
+ else
+ setcursor(mc, nil);
+ }
plumbfree(pm);
}