You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
configure: Print large lists in more columns if the screen size allows
Reviewed-by: Ganesh Ajjanagadde <gajjanag@mit.edu> Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
16
configure
vendored
16
configure
vendored
@@ -425,7 +425,10 @@ if test -t 1 && which tput >/dev/null; then
|
|||||||
error_color=$(tput setaf 1)
|
error_color=$(tput setaf 1)
|
||||||
reset_color=$(tput sgr0)
|
reset_color=$(tput sgr0)
|
||||||
fi
|
fi
|
||||||
|
# 72 used instead of 80 since that's the default of pr
|
||||||
|
ncols=$(tput cols)
|
||||||
fi
|
fi
|
||||||
|
: ${ncols:=72}
|
||||||
|
|
||||||
log(){
|
log(){
|
||||||
echo "$@" >> $logfile
|
echo "$@" >> $logfile
|
||||||
@@ -3041,14 +3044,15 @@ die_unknown(){
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
print_3_columns() {
|
print_in_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() {
|
show_list() {
|
||||||
suffix=_$1
|
suffix=_$1
|
||||||
shift
|
shift
|
||||||
echo $* | sed s/$suffix//g | print_3_columns
|
echo $* | sed s/$suffix//g | print_in_columns
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5969,17 +5973,17 @@ test -n "$random_seed" &&
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
echo "Enabled programs:"
|
echo "Enabled programs:"
|
||||||
print_enabled '' $PROGRAM_LIST | print_3_columns
|
print_enabled '' $PROGRAM_LIST | print_in_columns
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "External libraries:"
|
echo "External libraries:"
|
||||||
print_enabled '' $EXTERNAL_LIBRARY_LIST | print_3_columns
|
print_enabled '' $EXTERNAL_LIBRARY_LIST | print_in_columns
|
||||||
echo
|
echo
|
||||||
|
|
||||||
for type in decoder encoder hwaccel parser demuxer muxer protocol filter bsf indev outdev; do
|
for type in decoder encoder hwaccel parser demuxer muxer protocol filter bsf indev outdev; do
|
||||||
echo "Enabled ${type}s:"
|
echo "Enabled ${type}s:"
|
||||||
eval list=\$$(toupper $type)_LIST
|
eval list=\$$(toupper $type)_LIST
|
||||||
print_enabled '_*' $list | print_3_columns
|
print_enabled '_*' $list | print_in_columns
|
||||||
echo
|
echo
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user