[FFmpeg-devel] [PATCH] configure: Print large lists in more columns if the screen size allows

Ganesh Ajjanagadde gajjanag at mit.edu
Tue Sep 15 02:09:19 CEST 2015


On Mon, Sep 14, 2015 at 7:46 PM, Timothy Gu <timothygu99 at gmail.com> wrote:
> ---
>  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
>  }

Shouldn't this function be renamed, since it no longer necessarily
prints in 3 columns?

>
>  show_list() {
> --
> 1.9.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list