Unified · Split
| @@ -1,6 +1,7 @@ | ||
| 1 | 1 | 20070608 |
| 2 | 2 | update /lib9 functions to use silly va_copy (and then va_end) instead of just assigning, to account for silly C implementations |
| 3 | 3 | change /appl/cmd/mc.b not to require Draw or Env (so lc works on smaller systems) |
| 4 | + update acme to include the font size data (eg, for use by mc(1)) | |
| 4 | 5 | 20070607 |
| 5 | 6 | /appl/wm/man.b /appl/lib/man.b to allow 10.1 etc as section references |
| 6 | 7 | 20070605 |
Binary file not shown.
| @@ -4,9 +4,11 @@ include "sys.m"; · 3 unmodified lines | ||
| 4 | 4 | include "draw.m"; |
| 5 | 5 | include "workdir.m"; |
| 6 | 6 | include "sh.m"; |
| 7 | +include "env.m"; | |
| 7 | 8 | |
| 8 | 9 | sys : Sys; |
| 9 | 10 | workdir : Workdir; |
| 11 | +env: Env; | |
| 10 | 12 | |
| 11 | 13 | OREAD, OWRITE, ORDWR, FORKNS, FORKENV, FORKFD, NEWPGRP, MREPL, FD, UTFmax, pctl, open, read, write, fprint, sprint, fildes, bind, dup, byte2char, utfbytes : import sys; |
| 12 | 14 | |
| @@ -35,6 +37,7 @@ init(ctxt : ref Draw->Context, argl : list of string) · 22 unmodified lines | ||
| 35 | 37 | { |
| 36 | 38 | sys = load Sys Sys->PATH; |
| 37 | 39 | workdir = load Workdir Workdir->PATH; |
| 40 | + env = load Env Env->PATH; | |
| 38 | 41 | drawctxt = ctxt; |
| 39 | 42 | stdout = fildes(1); |
| 40 | 43 | stderr = fildes(2); |
| @@ -222,6 +225,7 @@ main(argv : list of string) · 181 unmodified lines | ||
| 222 | 225 | error("ctl"); |
| 223 | 226 | id = int string buf; |
| 224 | 227 | buf = nil; |
| 228 | + env->setenv("acmewin", string id); | |
| 225 | 229 | b := sprint("/chan/%d/tag", id); |
| 226 | 230 | fd = open(b, OWRITE); |
| 227 | 231 | write(fd, array of byte " Send Delete", 12); |
| @@ -1164,7 +1164,7 @@ run(win : ref Window, s : string, rdir : string, ndir : int, newns : int, argadd · 1163 unmodified lines | ||
| 1164 | 1164 | pipechar := 0; |
| 1165 | 1165 | if (t < len s && (s[t] == '<' || s[t] == '|' || s[t] == '>')){ |
| 1166 | 1166 | pipechar = s[t++]; |
| 1167 | − s = s[1: ]; | |
| 1167 | + s = s[t:]; | |
| 1168 | 1168 | } |
| 1169 | 1169 | c.pid = sys->pctl(0, nil); |
| 1170 | 1170 | c.iseditcmd = iseditcmd; |
| @@ -446,7 +446,7 @@ Row.dump(row : self ref Row, file : string) · 445 unmodified lines | ||
| 446 | 446 | w.body.file.buf.nc, fontname)); |
| 447 | 447 | } |
| 448 | 448 | a = nil; |
| 449 | − buf = w.ctlprint(); | |
| 449 | + buf = w.ctlprint(0); | |
| 450 | 450 | b.puts(buf); |
| 451 | 451 | m = min(BUFSIZE, w.tag.file.buf.nc); |
| 452 | 452 | w.tag.file.buf.read(0, r, 0, m); |
| @@ -527,10 +527,14 @@ Window.clean(w : self ref Window, conservative : int, exiting : int) : int # as · 526 unmodified lines | ||
| 527 | 527 | return TRUE; |
| 528 | 528 | } |
| 529 | 529 | |
| 530 | −Window.ctlprint(w : self ref Window) : string | |
| 530 | +Window.ctlprint(w : self ref Window, fonts : int) : string | |
| 531 | 531 | { |
| 532 | − return sprint("%11d %11d %11d %11d %11d ", w.id, w.tag.file.buf.nc, | |
| 532 | + s := sprint("%11d %11d %11d %11d %11d ", w.id, w.tag.file.buf.nc, | |
| 533 | 533 | w.body.file.buf.nc, w.isdir, w.dirty); |
| 534 | + if(fonts) | |
| 535 | + return sprint("%s%11d %q %11d ", s, w.body.frame.r.dx(), | |
| 536 | + w.body.reffont.f.name, w.body.frame.maxtab); | |
| 537 | + return s; | |
| 534 | 538 | } |
| 535 | 539 | |
| 536 | 540 | Window.event(w : self ref Window, fmt : string) |
| @@ -374,7 +374,7 @@ Xfid.read(x : self ref Xfid) · 373 unmodified lines | ||
| 374 | 374 | QWbody => |
| 375 | 375 | x.utfread(w.body, 0, w.body.file.buf.nc, QWbody); |
| 376 | 376 | QWctl => |
| 377 | − sbuf = w.ctlprint(); | |
| 377 | + sbuf = w.ctlprint(1); | |
| 378 | 378 | QWevent => |
| 379 | 379 | x.eventread(w); |
| 380 | 380 | QWdata => |
| @@ -1052,7 +1052,7 @@ Xfid.indexread(x : self ref Xfid) · 671 unmodified lines | ||
| 1052 | 1052 | # only show the currently active window of a set |
| 1053 | 1053 | if(w.body.file.curtext != w.body) |
| 1054 | 1054 | continue; |
| 1055 | − ctls := w.ctlprint(); | |
| 1055 | + ctls := w.ctlprint(0); | |
| 1056 | 1056 | ctlb := array of byte ctls; |
| 1057 | 1057 | if (len ctls != Ctlsize || len ctlb != Ctlsize) |
| 1058 | 1058 | error("bad length in indexread"); |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
| @@ -154,7 +154,9 @@ is always appended; the file offset is ignored. · 153 unmodified lines | ||
| 154 | 154 | .B ctl |
| 155 | 155 | may be read to recover the five numbers as held in the |
| 156 | 156 | .B index |
| 157 | −file, described above. | |
| 157 | +file, described above, plus three more fields: the width of the | |
| 158 | +window in pixels, the name of the font used in the window, | |
| 159 | +and the width of a tab character in pixels. | |
| 158 | 160 | Text messages may be written to |
| 159 | 161 | .B ctl |
| 160 | 162 | to affect the window. |