[PATCH] fix xman version string

Peter Hutterer peter.hutterer at who-t.net
Tue Oct 27 15:51:57 PDT 2009


On Tue, Oct 27, 2009 at 10:59:45PM +0100, Matthieu Herrb wrote:
> Him 
> 
> I noticed that xmans Options->Show Version menu item is showing lies. 
> The patch belows fixes that (and removes the one-line version.h file)
> 
> ok?
> 
> From: Matthieu Herrb <matthieu.herrb at laas.fr>
> Date: Tue, 27 Oct 2009 22:45:12 +0100
> Subject: [PATCH] Fix version display.
> 
> ---
>  configure.ac |    6 ++++++
>  handler.c    |    9 +++++++++
>  man.h        |    1 -
>  version.h    |   32 --------------------------------
>  4 files changed, 15 insertions(+), 33 deletions(-)
>  delete mode 100644 version.h
> 
> diff --git a/configure.ac b/configure.ac
> index 619b033..8e405ef 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -141,4 +141,10 @@ AC_ARG_WITH(appdefaultdir,
>  	[appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
>  AC_SUBST(appdefaultdir)
>  
> +XORG_RELEASE_VERSION
> +
> +if test "x$RELEASE_VERSION" != "x"; then
> +	AC_DEFINE_UNQUOTED([RELEASE_VERSION], "$RELEASE_VERSION", 
> +		[Release version string if set])
> +fi
>  AC_OUTPUT([Makefile])
> diff --git a/handler.c b/handler.c
> index 497a768..cf2d83a 100644
> --- a/handler.c
> +++ b/handler.c
> @@ -35,6 +35,9 @@ from the X Consortium.
>   * Author:    Chris D. Peterson, MIT Project Athena
>   * Created:   October 29, 1987
>   */
> +#ifdef HAVE_CONFIG_H
> +# include "config.h"
> +#endif
>  
>  #include <sys/types.h>
>  #include <sys/stat.h>
> @@ -45,6 +48,12 @@ from the X Consortium.
>  #include "print.h"
>  #endif /* INCLUDE_XPRINT_SUPPORT */
>  
> +#ifdef RELEASE_VERSION
> +#define XMAN_VERSION "Xman Version " PACKAGE_VERSION " - X11R" RELEASE_VERSION
> +#else
> +#define XMAN_VERSION "Xman Version " PACKAGE_VERSION
> +#endif
> +
>  static void PutUpManpage(ManpageGlobals * man_globals, FILE * file);
>  static void ToggleBothShownState(ManpageGlobals * man_globals);
>  
> diff --git a/man.h b/man.h
> index f7f04b4..73b17bb 100644
> --- a/man.h
> +++ b/man.h
> @@ -70,7 +70,6 @@ from the X Consortium.
>  
>  #include "ScrollByL.h"
>  
> -#include "version.h"
>  #include "defs.h"
>  
>  /* Turn a NULL pointer string into an empty string */
> diff --git a/version.h b/version.h
> deleted file mode 100644
> index f10367d..0000000
> --- a/version.h
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -/* $XConsortium: version.h,v 1.11 94/04/17 20:44:00 gildea Exp $ */
> -/*
> -
> -Copyright (c) 1987, 1988  X Consortium
> -
> -Permission is hereby granted, free of charge, to any person obtaining
> -a copy of this software and associated documentation files (the
> -"Software"), to deal in the Software without restriction, including
> -without limitation the rights to use, copy, modify, merge, publish,
> -distribute, sublicense, and/or sell copies of the Software, and to
> -permit persons to whom the Software is furnished to do so, subject to
> -the following conditions:
> -
> -The above copyright notice and this permission notice shall be included
> -in all copies or substantial portions of the Software.
> -
> -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> -IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
> -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> -OTHER DEALINGS IN THE SOFTWARE.
> -
> -Except as contained in this notice, the name of the X Consortium shall
> -not be used in advertising or otherwise to promote the sale, use or
> -other dealings in this Software without prior written authorization
> -from the X Consortium.
> -
> -*/
> -
> -#define XMAN_VERSION "Xman Version 3.2.0 - X11R7.0"
> -- 
> 1.6.5

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

tested too.

Cheers,
  Peter


More information about the xorg-devel mailing list