terminal_size should use LINES, not ROWS.
The shell's pseudo-variable is called LINES. This is true of at least
bash and mksh.
diff --git a/lib/lib.c b/lib/lib.c
index 9664bec..99d2ea6 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -627,7 +627,7 @@ int terminal_size(unsigned *xx, unsigned *yy)
}
s = getenv("COLUMNS");
if (s) sscanf(s, "%u", &x);
- s = getenv("ROWS");
+ s = getenv("LINES");
if (s) sscanf(s, "%u", &y);
// Never return 0 for either value, leave it at default instead.
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net