devcons.ed - vx32 - Local 9vx git repository for patches.
(HTM) git clone git://r-36.net/vx32
(DIR) Log
(DIR) Files
(DIR) Refs
---
devcons.ed (1306B)
---
1 g/exit(/ s/exit/restoretty(); &/
2 g/"pool.h"/d
3 ,s!QLock;!QLock lk;!g
4 /vlong fasthz/ s!;! = 1000000000ULL; // Plan 9 VX = nsecs!
5 ,s!lock(c)!lock(\&c->ref.lk)!g
6 g/^kbd/ s/Queue\*,/Queue *q,/
7 ,s!lock(\&kbd)!lock(\&kbd.lk)!g
8 ,s!(a = strchr(a, ' '))!(&)!g
9 ,s!MACHP(0)->ticks!msec()!g
10 /^long2le/-1 s!static!/*static*/!
11 /static int ctrlt, pid/ s/, pid//
12 /^ snprint(tmp/,/imagmem/c
13 tmp[0] = 0;
14 .
15 /^Queue\* serialoq/d
16 /^consactive/-1i
17 #if 0 // Plan 9 VX
18 .
19 /^}/a
20 #endif
21 .
22 /^kbdputcclock/-1i
23 #if 0 // Plan 9 VX
24 .
25 /^}/a
26 #endif
27 .
28 /^prflush/-1i
29 #if 0 // Plan 9 VX
30 .
31 /^}/a
32 #endif
33 .
34 /^putstrn0/;#
35 / int m/d
36 / char \*t/d
37 / if(serialoq == nil)/i
38 uartputs(str, n);
39 #if 0 // Plan 9 VX
40 .
41 /^}/i
42 #endif
43 .
44 /^static Lock iprintlock/i
45 #if 0 // Plan 9 VX
46 .
47 /^_assert/;#
48 /^}/a
49 #endif
50 .
51 /^echoserialoq/-1i
52 #if 0 // Plan 9 VX
53 .
54 /^}/a
55 #endif
56 .
57 /^echo(/-1 s/static //
58 /^ if(serialoq)/d
59 d
60 /^kbdputc/+1a
61 int n;
62 Rune r;
63 char buf[UTFmax];
64
65 r = ch;
66 n = runetochar(buf, &r);
67 echo(buf, n);
68 return 0;
69
70 #if 0 // Plan 9 VX
71 .
72 /^}/i
73 #endif
74 .
75 /at 115200 baud/-1i
76 #if 0 // Plan 9 VX
77 .
78 /addclock0link/a
79 #endif
80 .
81 $a
82
83 // Plan 9 VX
84 int
85 tailkmesg(char *a, int n)
86 {
87 ilock(&kmesg.lk);
88 if(n > kmesg.n)
89 n = kmesg.n;
90 memmove(a, kmesg.buf+kmesg.n-n, n);
91 iunlock(&kmesg.lk);
92 return n;
93 }
94 .
95 /echoscreen(buf, n)/a
96 uartecho(buf, n); // Plan 9 VX
97 .