summaryrefslogtreecommitdiff
path: root/appl
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2007-06-08 13:03:54 +0000
committerCharles.Forsyth <devnull@localhost>2007-06-08 13:03:54 +0000
commit043f83732c06a092cd12b5ad4f92264dee44c61a (patch)
tree8e7d497649f33c02b03e6cc476018487dd8c1374 /appl
parent9f620229775d41f76096d9039c46ff368fd44d47 (diff)
20070608-1402
Diffstat (limited to 'appl')
-rw-r--r--appl/acme/acme/bin/src/win.b4
-rw-r--r--appl/acme/exec.b2
-rw-r--r--appl/acme/row.b2
-rw-r--r--appl/acme/wind.b8
-rw-r--r--appl/acme/xfid.b4
5 files changed, 14 insertions, 6 deletions
diff --git a/appl/acme/acme/bin/src/win.b b/appl/acme/acme/bin/src/win.b
index f8299ee1..857539cf 100644
--- a/appl/acme/acme/bin/src/win.b
+++ b/appl/acme/acme/bin/src/win.b
@@ -4,9 +4,11 @@ include "sys.m";
include "draw.m";
include "workdir.m";
include "sh.m";
+include "env.m";
sys : Sys;
workdir : Workdir;
+env: Env;
OREAD, OWRITE, ORDWR, FORKNS, FORKENV, FORKFD, NEWPGRP, MREPL, FD, UTFmax, pctl, open, read, write, fprint, sprint, fildes, bind, dup, byte2char, utfbytes : import sys;
@@ -35,6 +37,7 @@ init(ctxt : ref Draw->Context, argl : list of string)
{
sys = load Sys Sys->PATH;
workdir = load Workdir Workdir->PATH;
+ env = load Env Env->PATH;
drawctxt = ctxt;
stdout = fildes(1);
stderr = fildes(2);
@@ -222,6 +225,7 @@ main(argv : list of string)
error("ctl");
id = int string buf;
buf = nil;
+ env->setenv("acmewin", string id);
b := sprint("/chan/%d/tag", id);
fd = open(b, OWRITE);
write(fd, array of byte " Send Delete", 12);
diff --git a/appl/acme/exec.b b/appl/acme/exec.b
index 204b6c37..93a4b67d 100644
--- a/appl/acme/exec.b
+++ b/appl/acme/exec.b
@@ -1164,7 +1164,7 @@ run(win : ref Window, s : string, rdir : string, ndir : int, newns : int, argadd
pipechar := 0;
if (t < len s && (s[t] == '<' || s[t] == '|' || s[t] == '>')){
pipechar = s[t++];
- s = s[1: ];
+ s = s[t:];
}
c.pid = sys->pctl(0, nil);
c.iseditcmd = iseditcmd;
diff --git a/appl/acme/row.b b/appl/acme/row.b
index 9c857c93..478ec930 100644
--- a/appl/acme/row.b
+++ b/appl/acme/row.b
@@ -446,7 +446,7 @@ Row.dump(row : self ref Row, file : string)
w.body.file.buf.nc, fontname));
}
a = nil;
- buf = w.ctlprint();
+ buf = w.ctlprint(0);
b.puts(buf);
m = min(BUFSIZE, w.tag.file.buf.nc);
w.tag.file.buf.read(0, r, 0, m);
diff --git a/appl/acme/wind.b b/appl/acme/wind.b
index 2b97fafa..aa4e1950 100644
--- a/appl/acme/wind.b
+++ b/appl/acme/wind.b
@@ -527,10 +527,14 @@ Window.clean(w : self ref Window, conservative : int, exiting : int) : int # as
return TRUE;
}
-Window.ctlprint(w : self ref Window) : string
+Window.ctlprint(w : self ref Window, fonts : int) : string
{
- return sprint("%11d %11d %11d %11d %11d ", w.id, w.tag.file.buf.nc,
+ s := sprint("%11d %11d %11d %11d %11d ", w.id, w.tag.file.buf.nc,
w.body.file.buf.nc, w.isdir, w.dirty);
+ if(fonts)
+ return sprint("%s%11d %q %11d ", s, w.body.frame.r.dx(),
+ w.body.reffont.f.name, w.body.frame.maxtab);
+ return s;
}
Window.event(w : self ref Window, fmt : string)
diff --git a/appl/acme/xfid.b b/appl/acme/xfid.b
index 0533a70e..85d9da9f 100644
--- a/appl/acme/xfid.b
+++ b/appl/acme/xfid.b
@@ -374,7 +374,7 @@ Xfid.read(x : self ref Xfid)
QWbody =>
x.utfread(w.body, 0, w.body.file.buf.nc, QWbody);
QWctl =>
- sbuf = w.ctlprint();
+ sbuf = w.ctlprint(1);
QWevent =>
x.eventread(w);
QWdata =>
@@ -1052,7 +1052,7 @@ Xfid.indexread(x : self ref Xfid)
# only show the currently active window of a set
if(w.body.file.curtext != w.body)
continue;
- ctls := w.ctlprint();
+ ctls := w.ctlprint(0);
ctlb := array of byte ctls;
if (len ctls != Ctlsize || len ctlb != Ctlsize)
error("bad length in indexread");