[Xorg-commit] xc/lib/Xmu EditresCom.c,1.1.4.2,1.1.4.3 SysUtil.h,1.1.4.1,1.1.4.2 Xmu.h,1.1.4.1,1.1.4.2

Kaleb Keithley xorg-commit at pdx.freedesktop.org
Wed May 9 17:30:30 EEST 2007


Committed by: kaleb

Update of /cvs/xorg/xc/lib/Xmu
In directory pdx:/home/kaleb/xorg/xc.XORG-CURRENT/lib/Xmu

Modified Files:
      Tag: XORG-CURRENT
	EditresCom.c SysUtil.h Xmu.h 
Log Message:
merge most of XFree86 RC3 (4.3.99.903) from vendor branch.
bug #214


Index: EditresCom.c
===================================================================
RCS file: /cvs/xorg/xc/lib/Xmu/EditresCom.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- a/EditresCom.c	26 Nov 2003 22:48:39 -0000	1.1.4.2
+++ b/EditresCom.c	23 Feb 2004 21:34:30 -0000	1.1.4.3
@@ -25,7 +25,7 @@
 in this Software without prior written authorization from The Open Group.
 
 */
-/* $XFree86: xc/lib/Xmu/EditresCom.c,v 1.21 2003/10/24 15:44:05 tsi Exp $ */
+/* $XFree86: xc/lib/Xmu/EditresCom.c,v 1.22 2004/01/23 02:36:34 dawes Exp $ */
 
 /*
  * Author:  Chris D. Peterson, Dave Sternlicht, MIT X Consortium
@@ -753,6 +753,7 @@
       for (i = 0; i < num_norm; i++)
 	if (strcmp(norm_list[i].resource_type, XtRWidget) == 0)
 	  {
+	    widget = NULL;
 	    XtSetArg(args[0], norm_list[i].resource_name, &widget);
 	    XtGetValues(parent, args, 1);
 	    if (widget && XtParent(widget) == parent)
@@ -766,6 +767,7 @@
       for (i = 0; i < num_cons; i++)
 	if (strcmp(cons_list[i].resource_type, XtRWidget) == 0)
 	  {
+	    widget = NULL;
 	    XtSetArg(args[0], cons_list[i].resource_name, &widget);
 	    XtGetValues(parent, args, 1);
 	    if (widget && XtParent(widget) == parent)
@@ -816,8 +818,9 @@
 	for (j = 0; j < num_extra; j++)
 	  if ((*children)[i] == extra_widgets[j])
 	    {
-	      memmove(&extra_widgets[j], &extra_widgets[j + 1],
-		      (num_extra - j) * sizeof(Widget));
+	      if ((j + 1) < num_extra)
+		memmove(&extra_widgets[j], &extra_widgets[j + 1],
+			(num_extra - j) * sizeof(Widget));
 	      --num_extra;
 	    }
 
@@ -999,7 +1002,8 @@
 	if (streq((String)info->event->value, XtRString))
 	    XmuSnprintf(buf, sizeof(buf),
 			"Could not convert the string '%s' for the `%s' "
-			"resource.", info->event->value, info->event->name);
+			"resource.", (String)info->event->value,
+			info->event->name);
 	else
 	    XmuSnprintf(buf, sizeof(buf),
 			"Could not convert the `%s' resource.",
@@ -2189,11 +2193,11 @@
 	      XmuSnprintf(buffer, sizeof(buffer), "%d", (int)(value & 0xffff));
 	      break;
 	    case sizeof(int):
-	      XmuSnprintf(buffer, sizeof(buffer), "0x%08hx", (int)value);
+	      XmuSnprintf(buffer, sizeof(buffer), "0x%08x", (int)value);
 	      break;
 #ifdef LONG_64
 	    case sizeof(long):
-	      XmuSnprintf(buffer, sizeof(buffer), "0x%016hx", value);
+	      XmuSnprintf(buffer, sizeof(buffer), "0x%016lx", value);
 	      break;
 #endif
 	    }

Index: SysUtil.h
===================================================================
RCS file: /cvs/xorg/xc/lib/Xmu/SysUtil.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/SysUtil.h	17 Nov 2003 19:03:41 -0000	1.1.4.1
+++ b/SysUtil.h	23 Feb 2004 21:34:30 -0000	1.1.4.2
@@ -25,7 +25,7 @@
 in this Software without prior written authorization from The Open Group.
 
 */
-/* $XFree86: xc/lib/Xmu/SysUtil.h,v 1.9 2001/12/14 19:55:55 dawes Exp $ */
+/* $XFree86: xc/lib/Xmu/SysUtil.h,v 1.10 2004/01/23 03:57:58 dawes Exp $ */
 
 #ifndef _SYSUTIL_H_
 #define _SYSUTIL_H_
@@ -47,7 +47,12 @@
  int			size,
  _Xconst char		*fmt,
     ...
- );
+ )
+#if defined(__GNUC__) && \
+    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
+__attribute((format(printf,3,4)))
+#endif
+;
 #endif
 
 _XFUNCPROTOEND

Index: Xmu.h
===================================================================
RCS file: /cvs/xorg/xc/lib/Xmu/Xmu.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/Xmu.h	17 Nov 2003 19:03:41 -0000	1.1.4.1
+++ b/Xmu.h	23 Feb 2004 21:34:30 -0000	1.1.4.2
@@ -25,7 +25,7 @@
 in this Software without prior written authorization from The Open Group.
 
 */
-/* $XFree86: xc/lib/Xmu/Xmu.h,v 1.9 2001/12/14 19:55:59 dawes Exp $ */
+/* $XFree86: xc/lib/Xmu/Xmu.h,v 1.10 2004/01/23 03:57:58 dawes Exp $ */
 
 /*
  * The interfaces described by this header file are for miscellaneous utilities
@@ -116,7 +116,12 @@
 #endif /* notdef */
 
 #ifndef _SYSUTIL_H_
-int XmuSnprintf(char *str, int size, _Xconst char *fmt, ...);
+int XmuSnprintf(char *str, int size, _Xconst char *fmt, ...)
+#if defined(__GNUC__) && \
+    ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
+__attribute((format(printf,3,4)))
+#endif
+;
 #endif
 
 #endif /* _XMU_H_ */





More information about the xorg-commit mailing list