diff options
author | rsc <devnull@localhost> | 2004-04-25 20:49:44 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-04-25 20:49:44 +0000 |
commit | 2d930d45526d0f7d452d4f13933dd205f42a90e8 (patch) | |
tree | 749a01a1a6a988ac5b0f910d93226fb52ade17c2 /src/cmd/9term | |
parent | 4a4a7c3e5b24c8b8f0625d8bbf0697ab94e45bb6 (diff) | |
download | plan9port-2d930d45526d0f7d452d4f13933dd205f42a90e8.tar.gz plan9port-2d930d45526d0f7d452d4f13933dd205f42a90e8.tar.bz2 plan9port-2d930d45526d0f7d452d4f13933dd205f42a90e8.zip |
always be honest about tabstop.
Diffstat (limited to 'src/cmd/9term')
-rw-r--r-- | src/cmd/9term/9term.c | 6 | ||||
-rw-r--r-- | src/cmd/9term/win.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c index a77dc32b..5fab0401 100644 --- a/src/cmd/9term/9term.c +++ b/src/cmd/9term/9term.c @@ -194,6 +194,7 @@ void threadmain(int argc, char *argv[]) { char *p, *font; + char buf[32]; rfork(RFNOTEG); font = nil; @@ -225,7 +226,10 @@ threadmain(int argc, char *argv[]) if(p != 0 && maxtab <= 0) maxtab = strtoul(p, 0, 0); if(maxtab <= 0) - maxtab = 8; + maxtab = 4; /* be like rio */ + + snprint(buf, sizeof buf, "%d", maxtab); + putenv("tabstop", maxtab); initdraw(0, nil, "9term"); notify(hangupnote); diff --git a/src/cmd/9term/win.c b/src/cmd/9term/win.c index 9fba1e84..f341c102 100644 --- a/src/cmd/9term/win.c +++ b/src/cmd/9term/win.c @@ -141,6 +141,8 @@ threadmain(int argc, char **argv) if(ctlfd == 0 || fsread(ctlfd, buf, 12) != 12) sysfatal("ctl: %r"); id = atoi(buf); + snprint(buf, sizeof buf, "%d", id); + putenv("winid", buf); sprint(buf, "%d/tag", id); fd = fsopenfd(fs, buf, OWRITE|OCEXEC); write(fd, " Send Delete", 12); |