* [9fans] improvement to ssh
@ 2000-06-14 3:01 Scott Schwartz
0 siblings, 0 replies; only message in thread
From: Scott Schwartz @ 2000-06-14 3:01 UTC (permalink / raw)
To: 9fans
If you run ssh under vt, ssh ought to pay attention to the
environment variables it sets for LINES and COLS.
term% diff /sys/src/cmd/ssh/cmd/client_messages.c .
393a394,404
> static int
> int_env(char *key, int dflt)
> {
> int ival;
> char *eval = getenv(key);
> if (eval)
> if (ival=atoi(eval))
> return ival;
> return dflt;
> }
>
409c420
<
---
>
411,412c422,423
< putlong(packet, 24); /* rows */
< putlong(packet, 80); /* columns */
---
> putlong(packet, int_env("LINES", 24)); /* rows */
> putlong(packet, int_env("COLS", 80)); /* columns */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-06-14 3:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-14 3:01 [9fans] improvement to ssh Scott Schwartz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).