summaryrefslogtreecommitdiff
path: root/appl/acme
diff options
context:
space:
mode:
authorforsyth <forsyth@vitanuova.com>2010-08-02 14:49:50 +0100
committerforsyth <forsyth@vitanuova.com>2010-08-02 14:49:50 +0100
commit66f5808b81b1df84bc57c4f7b9d487201bc162fb (patch)
treefe09448075dcf50ecca78a673e16ad84a666d3da /appl/acme
parent7781741266783e4df3b35d42a55e8e504838898b (diff)
20100802-1449
Diffstat (limited to 'appl/acme')
-rw-r--r--appl/acme/acme/bin/src/win.b14
1 files changed, 8 insertions, 6 deletions
diff --git a/appl/acme/acme/bin/src/win.b b/appl/acme/acme/bin/src/win.b
index 857539cf..a470820a 100644
--- a/appl/acme/acme/bin/src/win.b
+++ b/appl/acme/acme/bin/src/win.b
@@ -625,25 +625,27 @@ addtype(c : int, p0 : int, b : array of byte, nb : int, nr : int)
sendtype(fd0 : ref FD, raw : int)
{
- i, n, nr : int;
-
while(ntypebreak){
brkc := 0;
- for(i=0; i<ntypeb; i++)
+ i := 0;
+ while(i<ntypeb){
if(typing[i]==byte '\n' || typing[i]==byte 16r04){
- n = i + (typing[i] == byte '\n');
+ n := i + (typing[i] == byte '\n');
i++;
if(write(fd0, typing, n) != n)
error("sending to program");
- nr = nrunes(typing, i);
+ nr := nrunes(typing, i);
if (!raw)
q.p += nr;
ntyper -= nr;
ntypeb -= i;
typing[0:] = typing[i:i+ntypeb];
+ i = 0;
ntypebreak--;
brkc = 1;
- }
+ }else
+ i++;
+ }
if (!brkc) {
fprint(stdout, "no breakchar\n");
ntypebreak = 0;