[PATCH] Replace XmuSnprintf with snprintf.

Alan Coopersmith alan.coopersmith at oracle.com
Mon Sep 19 10:40:42 PDT 2011


On 09/18/11 18:57, Jamey Sharp wrote:
> Alan Coopersmith explains:
>
> 	XmuSnprintf() can be replaced by snprintf() now. (It was a
> 	implementation X provided for it's libraries to use in the days
> 	before all platforms we cared about had snprintf in libc.)
>
> Reported-by: walter harms<wharms at bfs.de>
> Signed-off-by: Jamey Sharp<jamey at minilop.net>
> ---
>   hw/dmx/config/xdmxconfig.c   |   23 +++++++++++------------
>   hw/dmx/dmxclient.h           |    1 -
>   hw/dmx/dmxinit.c             |   11 ++++++-----
>   hw/dmx/dmxprop.c             |    9 +++++----
>   hw/dmx/doc/dmx.xml           |    2 +-
>   hw/dmx/examples/dmxwininfo.c |    3 +--
>   hw/dmx/input/dmxinputinit.c  |    6 +++---
>   hw/dmx/input/lnx-keyboard.c  |    4 ++--
>   hw/dmx/input/usb-common.c    |    4 ++--
>   9 files changed, 31 insertions(+), 32 deletions(-)
>
> diff --git a/hw/dmx/config/xdmxconfig.c b/hw/dmx/config/xdmxconfig.c
> index 2de7f2b..a153f09 100644
> --- a/hw/dmx/config/xdmxconfig.c
> +++ b/hw/dmx/config/xdmxconfig.c
> @@ -49,7 +49,6 @@
>   #include<X11/Xaw/Viewport.h>
>   #include<X11/Xaw/Dialog.h>
>   #include<X11/keysym.h>
> -#include<X11/Xmu/SysUtil.h>
>   #include "Canvas.h"
>
>   #include "dmxparse.h"
> @@ -199,8 +198,8 @@ static void dmxConfigDataUpdate(void)
>           XtVaSetValues(ndbutton1,                XtNsensitive, False, NULL);
>       } else {
>           name = dmxConfigCurrent->name;
> -        XmuSnprintf(cnambuf, sizeof(cnambuf), "%s", name ? name : "");
> -	XmuSnprintf(cdimbuf, sizeof(cdimbuf), "%dx%d",
> +        snprintf(cnambuf, sizeof(cnambuf), "%s", name ? name : "");
> +	snprintf(cdimbuf, sizeof(cdimbuf), "%dx%d",

Indentation is a bit inconsistent there (I know you didn't introduce it, but
you could fix it).

Looks good though, so even if you don't fix that:
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>


-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list