On Thursday, April 09, 2015 11:18:58 AM Aaron Plattner wrote:
> Combine the two forms of verbose mode printing into a single function.  Pass 
> the
> 'current' and 'preferred' flags as arguments.  This fixes the code that prints
> unassociated modes to print the flags as well.
> 
> Signed-off-by: Aaron Plattner <[email protected]>
> ---
>  xrandr.c | 62 ++++++++++++++++++++++++++++++--------------------------------
>  1 file changed, 30 insertions(+), 32 deletions(-)
> 
> diff --git a/xrandr.c b/xrandr.c
> index 8a345427a226..5be2167d724f 100644
> --- a/xrandr.c
> +++ b/xrandr.c
> @@ -566,7 +566,7 @@ mode_geometry (XRRModeInfo *mode_info, Rotation rotation,
>  
>  /* v refresh frequency in Hz */
>  static double
> -mode_refresh (XRRModeInfo *mode_info)
> +mode_refresh (const XRRModeInfo *mode_info)
>  {
>      double rate;
>      double vTotal = mode_info->vTotal;
> @@ -592,7 +592,7 @@ mode_refresh (XRRModeInfo *mode_info)
>  
>  /* h sync frequency in Hz */
>  static double
> -mode_hsync (XRRModeInfo *mode_info)
> +mode_hsync (const XRRModeInfo *mode_info)
>  {
>      double rate;
>      
> @@ -603,6 +603,30 @@ mode_hsync (XRRModeInfo *mode_info)
>      return rate;
>  }
>  
> +static void print_verbose_mode (const XRRModeInfo *mode, Bool current,
> +                             Bool preferred)
> +{

Seems like maybe "static void" should be on its own line, but I'm not
familiar with the coding style in xrandr.

This looks correct to me, looks like a nice cleanup, and printing the
flags seems sensible (though I've never read xrandr code before).

Reviewed-by: Kenneth Graunke <[email protected]>

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to