Don't set rows or columns to zero, to avoid
authorJim Meyering <jim@meyering.net>
Mon, 3 Jan 2005 21:25:13 +0000 (21:25 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 3 Jan 2005 21:25:13 +0000 (21:25 +0000)
a bug in the TIOCGWINSZ ioctl on at least Solaris5.9 systems.  Setting
either (or both) to zero would succeed, but subsequent `stty size'
would say `no size information for this device' due to the ioctl
failing with EINVAL.

tests/stty/row-col-1

index edf2db5..7873a6d 100755 (executable)
@@ -26,13 +26,13 @@ export LC_ALL
 
 tests='
 1 rows_40_columns_80 40_80
-2 rows_0_columns_0 0_0
+2 rows_1_columns_1 1_1
 3 rows_40_columns_80 40_80
-4 rows_0 0_80
-5 columns_0 0_0
-6 rows_40 40_0
-7 rows_0 0_0
-8 columns_80 0_80
+4 rows_1 1_80
+5 columns_1 1_1
+6 rows_40 40_1
+7 rows_1 1_1
+8 columns_80 1_80
 9 rows_30 30_80
 NA LAST NA
 '