[FFmpeg-devel] [PATCH] configure: Print large lists in more columns if the screen size allows
Timothy Gu
timothygu99 at gmail.com
Tue Sep 15 01:46:14 CEST 2015
---
configure | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index da18e70..3dfbb91 100755
--- a/configure
+++ b/configure
@@ -425,7 +425,10 @@ if test -t 1 && which tput >/dev/null; then
error_color=$(tput setaf 1)
reset_color=$(tput sgr0)
fi
+ # 72 used instead of 80 since that's the default of pr
+ ncols=$(tput cols)
fi
+: ${ncols:=72}
log(){
echo "$@" >> $logfile
@@ -3042,7 +3045,8 @@ die_unknown(){
}
print_3_columns() {
- cat | tr ' ' '\n' | sort | pr -r -3 -t
+ cols=$(expr $ncols / 24)
+ cat | tr ' ' '\n' | sort | pr -r "-$cols" -w $ncols -t
}
show_list() {
--
1.9.1
More information about the ffmpeg-devel
mailing list