[PATCH:xman] Remove xmu dependency by inlining AssignMax macro

Matt Turner mattst88 at gmail.com
Fri Mar 4 19:27:17 PST 2011


On Sat, Mar 5, 2011 at 2:20 AM, Alan Coopersmith
<alan.coopersmith at oracle.com> wrote:
> No calls from libXmu were used, just one instance of one simple macro
> that made the code harder to understand, so stop requiring it and
> linking directly to it.   (Of course, libXaw still depends on it, so
> it will still be loaded indirectly.)
>
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>  ScrollByL.c  |    4 ++--
>  configure.ac |    2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/ScrollByL.c b/ScrollByL.c
> index 911f494..bedc2c9 100644
> --- a/ScrollByL.c
> +++ b/ScrollByL.c
> @@ -40,7 +40,6 @@ from the X Consortium.
>  #include <X11/StringDefs.h>
>
>  #include <X11/Xaw/Scrollbar.h>
> -#include <X11/Xmu/Misc.h>
>
>  #include "ScrollByLP.h"
>
> @@ -401,7 +400,8 @@ Boolean force_redisp)
>   }
>   else {
>     max_lines = sblw->scroll.lines - (int)w->core.height / sblw->scroll.font_height;
> -    AssignMax(max_lines, 0);
> +    if (max_lines < 0)
> +       max_lines = 0;
>
>     if ( new_line > max_lines ) {
>       new_line = max_lines;
> diff --git a/configure.ac b/configure.ac
> index f0c2c99..9021077 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -66,7 +66,7 @@ if test x$LOCALMANPATH != x; then
>  fi
>
>  # Obtain compiler/linker options from depedencies
> -PKG_CHECK_MODULES(XMAN, xproto xaw7 xmu xt)
> +PKG_CHECK_MODULES(XMAN, xproto xaw7 xt)
>
>  AC_ARG_WITH(manconfig,
>         AS_HELP_STRING([--with-manconfig=<filename>],
> --
> 1.7.3.2

Why would such a macro have ever been a good idea?

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the xorg-devel mailing list