libXmu: Branch 'master' - 9 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Sep 20 18:10:34 UTC 2022


 .git-blame-ignore-revs     |   18 ++++++++
 Makefile.am                |    2 
 configure.ac               |    1 
 doc/Xmu.xml                |    2 
 include/X11/Xmu/EditresP.h |   16 +++----
 src/AllCmap.c              |    2 
 src/Clip.c                 |    4 -
 src/CmapAlloc.c            |    2 
 src/CursorName.c           |    2 
 src/CvtStdSel.c            |    4 -
 src/EditresCom.c           |   14 +++---
 src/Makefile.am            |    2 
 src/RdBitF.c               |    2 
 src/ShapeWidg.c            |    4 -
 src/StdCmap.c              |    4 -
 src/StrToCurs.c            |    4 -
 src/StrToShap.c            |    2 
 src/WidgetNode.c           |    4 -
 src/Xct.c                  |    5 --
 test/EditResStream.c       |   99 +++++++++++++++++++++++++++++++++++++++++++++
 test/Makefile.am           |   30 +++++++++++++
 21 files changed, 185 insertions(+), 38 deletions(-)

New commits:
commit 52db31f9e388cf9781a68e5e7d33c3cbb22d412c
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat Sep 17 08:48:08 2022 -0700

    Add .git-blame-ignore-revs to hide whitespace commits from git blame
    
    To use this in your local repo clone, you will need to either run
    `git blame --ignore-revs-file .git-blame-ignore-revs`
    or set it permanently with
    `git config blame.ignoreRevsFile .git-blame-ignore-revs`
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 0000000..9fea13e
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,18 @@
+# This file contains revisions to be ignored by git blame.
+# These revisions are expected to be formatting-only changes.
+#
+# Calling `git blame --ignore-revs-file .git-blame-ignore-revs` will
+# tell git blame to ignore changes made by these revisions when assigning
+# assigning blame, as if the change never happened.
+#
+# You can enable this as a default for your local repository by running
+# `git config blame.ignoreRevsFile .git-blame-ignore-revs`
+# Important: if you do this, then switch to a branch without this file,
+# `git blame` will fail with an error.
+#
+# Make EditresCom.c identation a lot less random
+6ab92082d5f6c842b578a9fe1f9888ed3339336a
+# Strip trailing whitespace
+66492163cb244fbe22c67bebb14c0918dd11eab6
+# Convert tabs to spaces in StrToWidg.c
+bc78541e9a9a95bbd5413d62bfc114ddc9265c36
commit 749d9bb10245985a25ee2a6a3262b8d882b8a889
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Tue Sep 13 18:46:43 2022 -0700

    Add simple test cases for _XEditRes{Put,Get}* functions
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/Makefile.am b/Makefile.am
index 271d872..61110df 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = include src doc
+SUBDIRS = include src doc test
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = xmu.pc xmuu.pc
diff --git a/configure.ac b/configure.ac
index 4afe3d5..04538ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,7 @@ AC_CONFIG_FILES([Makefile
 		doc/Makefile
 		include/Makefile
 		src/Makefile
+		test/Makefile
 		xmu.pc
 		xmuu.pc])
 AC_OUTPUT
diff --git a/test/EditResStream.c b/test/EditResStream.c
new file mode 100644
index 0000000..4f35a37
--- /dev/null
+++ b/test/EditResStream.c
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2022, Oracle and/or its affiliates.
+ *
+ * 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 (including the next
+ * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
+ */
+
+/* Test code for ProtocolStream Get/Put functions in src/EditResCom.c */
+#include <X11/Xmu/EditresP.h>
+#include <assert.h>
+
+static const char *test_string = "\tIt was a dark and stormy night...\n";
+
+#define FillBuffer(d, v) memset(d, v, sizeof(d))
+
+int main(void)
+{
+    ProtocolStream ps = { 0, 0, NULL, NULL, NULL };
+    unsigned char c;
+    unsigned short s;
+    unsigned long l;
+    Bool res;
+    char *str;
+    unsigned long ids[] = { 1, 10, 0xbabe, 0xbabeface, 0xffffffff };
+    WidgetInfo i = {
+        .num_widgets = sizeof(ids) / sizeof(ids[0]),
+        .ids = ids,
+        .real_widget = 0
+    };
+    WidgetInfo out = { 0, NULL, 0 };
+
+    _XEditResResetStream(&ps);
+
+    _XEditResPut8(&ps, 8);
+    _XEditResPut16(&ps, 16);
+    _XEditResPut16(&ps, 0xface);
+    _XEditResPut32(&ps, 32);
+    _XEditResPut32(&ps, 0xbabeface);
+    _XEditResPutString8(&ps, test_string);
+    _XEditResPutWidgetInfo(&ps, &i);
+
+    /* current is a pointer to the next byte to read from or write to,
+       so we need to reset it to the beginning to read the data we wrote */
+    ps.current = ps.top;
+
+    res = _XEditResGet8(&ps, &c);
+    assert(res == True);
+    assert(c == 8);
+
+    res = _XEditResGet16(&ps, &s);
+    assert(res == True);
+    assert(s == 16);
+
+    res = _XEditResGet16(&ps, &s);
+    assert(res == True);
+    assert(s == 0xface);
+
+    /* set the full value so we can make sure that in 64-bit mode we
+       write to the full long value, not just 32-bits of it. */
+    memset(&l, 0x0f, sizeof(l));
+    res = _XEditResGet32(&ps, &l);
+    assert(res == True);
+    assert(l == 32);
+
+    memset(&l, 0x0f, sizeof(l));
+    res = _XEditResGet32(&ps, &l);
+    assert(res == True);
+    assert(l == 0xbabeface);
+
+    res = _XEditResGetString8(&ps, &str);
+    assert(res == True);
+    assert(strcmp(str, test_string) == 0);
+    XtFree(str);
+    str = NULL;
+
+    res = _XEditResGetWidgetInfo(&ps, &out);
+    assert(res == True);
+    assert(memcmp(ids, out.ids, sizeof(ids)) == 0);
+    XtFree((char *) out.ids);
+    out.ids = NULL;
+
+    return 0;
+}
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..955c0a6
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 2022, Oracle and/or its affiliates.
+#
+# 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 (including the next
+# paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
+#
+
+AM_CPPFLAGS = -D_CONST_X_STRING -I${top_srcdir}/include
+
+check_PROGRAMS = EditResStream
+TESTS = $(check_PROGRAMS)
+
+EditResStream_SOURCES = EditResStream.c
+EditResStream_LDADD = ${top_builddir}/src/libXmu.la $(XMU_LIBS)
commit 35831b86d10dfbe7af05040fae1fa4a6181ebfc0
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Tue Sep 13 18:45:25 2022 -0700

    _XEditResGet32: Fix casts to avoid unexpected sign extension in 64-bit
    
    Like _XEditResGet16 we need to cast to our destination type, not
    the source type, before combining the upper & lower halves.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/src/EditresCom.c b/src/EditresCom.c
index 531384f..29103d9 100644
--- a/src/EditresCom.c
+++ b/src/EditresCom.c
@@ -1884,7 +1884,7 @@ _XEditResGet32(ProtocolStream *stream, unsigned long *value)
     if (!(_XEditResGet16(stream, &temp1) && _XEditResGet16(stream, &temp2)))
 	return (False);
 
-    *value = ((unsigned short)temp1 << (XER_NBBY * 2)) + (unsigned short)temp2;
+    *value = ((unsigned long)temp1 << (XER_NBBY * 2)) + (unsigned long)temp2;
     return (True);
 }
 
commit fe87eb4099416be52b0fc9a0a1e8a52b65dfa23c
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Tue Sep 13 16:31:40 2022 -0700

    Handle -Wmissing-field-initializers warnings
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/src/StrToCurs.c b/src/StrToCurs.c
index fc064c6..60fbab2 100644
--- a/src/StrToCurs.c
+++ b/src/StrToCurs.c
@@ -133,8 +133,8 @@ XmuCvtStringToCursor(XrmValuePtr args, Cardinal *num_args,
     char maskname[PATH_MAX];
     Pixmap source, mask = 0;
     /* XXX - make fg/bg resources */
-    static XColor bgColor = {0, 0xffff, 0xffff, 0xffff};
-    static XColor fgColor = {0, 0, 0, 0};
+    static XColor bgColor = {0, 0xffff, 0xffff, 0xffff, 0, 0};
+    static XColor fgColor = {0, 0, 0, 0, 0, 0};
     int xhot, yhot;
     int len;
 
commit 7185a8a484de41c878149e23848c903893936e14
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Tue Sep 13 16:28:37 2022 -0700

    Handle -Wsign-compare warnings
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/src/AllCmap.c b/src/AllCmap.c
index a974ce0..07edf38 100644
--- a/src/AllCmap.c
+++ b/src/AllCmap.c
@@ -110,7 +110,7 @@ XmuAllStandardColormaps(Display *dpy)
 	v2 = getDeepestVisual(PseudoColor, vinfo, nvisuals);
 
 	if (v2 &&
-	    (!v1 || (v2->colormap_size >=
+	    (!v1 || (v2->colormap_size >= (long)
 		     ((v1->red_mask | v1->green_mask | v1->blue_mask) + 1))))
 	    status = XmuVisualStandardColormaps(dpy, scr, v2->visualid,
 						(unsigned) v2->depth, 1, 1);
diff --git a/src/CursorName.c b/src/CursorName.c
index 635ae51..82bc5fa 100644
--- a/src/CursorName.c
+++ b/src/CursorName.c
@@ -119,7 +119,7 @@ XmuCursorNameToIndex(_Xconst char *name)
     };
 #define NUM_CURSOR_NAMES    (sizeof (cursor_names) / sizeof (cursor_names[0]))
     register _Xconst struct _CursorName *table;
-    register int i;
+    unsigned int i;
     char tmp[40];
 
     if (strlen (name) >= sizeof tmp) return -1;
diff --git a/src/StdCmap.c b/src/StdCmap.c
index ccc822e..4da007b 100644
--- a/src/StdCmap.c
+++ b/src/StdCmap.c
@@ -190,11 +190,11 @@ valid_args(XVisualInfo *vinfo, unsigned long red_max, unsigned long green_max,
 	    return 0;
     } else if (property == XA_RGB_GRAY_MAP) {
 	ncolors = red_max + green_max + blue_max + 1;
-	if (ncolors > vinfo->colormap_size)
+	if (ncolors > (unsigned long) vinfo->colormap_size)
 	    return 0;
     } else {
 	ncolors = (red_max + 1) * (green_max + 1) * (blue_max + 1);
-	if (ncolors > vinfo->colormap_size)
+	if (ncolors > (unsigned long) vinfo->colormap_size)
 	    return 0;
     }
 
commit 7b63db9adf687e360a1e348aabbbc16265104fc2
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Tue Sep 13 16:20:53 2022 -0700

    Clear some more -Wdiscarded-qualifiers warnings
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/src/EditresCom.c b/src/EditresCom.c
index 2303833..531384f 100644
--- a/src/EditresCom.c
+++ b/src/EditresCom.c
@@ -2083,7 +2083,7 @@ _XEditresGetStringValues(Widget w, Arg *warg, int numargs)
     XtResource *res = NULL;
     long value;
     Cardinal i;
-    char *string = "";
+    const char *string = "";
     Arg args[1];
     XrmValue to, from;
 
@@ -2155,7 +2155,7 @@ _XEditresGetStringValues(Widget w, Arg *warg, int numargs)
 	fprintf(stderr, "_XEditresGetStringValues: bad size %d\n",
 		res->resource_size);
 	string = "bad size";
-	*(char **)(warg->value) = string;
+	*(char **)(warg->value) = (char *) string;
 	XtFree((char *)res_list);
 	return;
     }
@@ -2208,6 +2208,6 @@ _XEditresGetStringValues(Widget w, Arg *warg, int numargs)
     if (string == NULL)
 	string = "";
 
-    *(char **)(warg->value) = string;
+    *(char **)(warg->value) = (char *) string;
     XtFree((char *)res_list);
 }
diff --git a/src/StrToShap.c b/src/StrToShap.c
index 0773404..de93342 100644
--- a/src/StrToShap.c
+++ b/src/StrToShap.c
@@ -78,7 +78,7 @@ Boolean
 XmuCvtShapeStyleToString(Display *dpy, XrmValue *args, Cardinal *num_args,
 			 XrmValue *fromVal, XrmValue *toVal, XtPointer *data)
 {
-  static char *buffer;
+  static const char *buffer;
   Cardinal size;
 
   switch (*(int *)fromVal->addr)
commit d35c1ce67641e9b6ab2c329570a8270b5c73d255
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Tue Sep 13 16:11:14 2022 -0700

    Use _CONST_X_STRING to make libXt declare String as const char *
    
    Clears 11 out of 58 -Wdiscarded-qualifiers warnings from gcc
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/src/CvtStdSel.c b/src/CvtStdSel.c
index ac370b4..8a1b05d 100644
--- a/src/CvtStdSel.c
+++ b/src/CvtStdSel.c
@@ -206,7 +206,7 @@ XmuConvertStandardSelection(Widget w, Time time, Atom *selection, Atom *target,
     }
     if (*target == XA_CLASS(d)) {
 	Widget parent = XtParent(w);
-	char *class;
+	String class;
 	int len;
 	while (parent != NULL && !isApplicationShell(w)) {
 	    w = parent;
diff --git a/src/EditresCom.c b/src/EditresCom.c
index 07c0d47..2303833 100644
--- a/src/EditresCom.c
+++ b/src/EditresCom.c
@@ -1148,7 +1148,7 @@ DumpChildren(Widget w, ProtocolStream *stream, unsigned short *count)
     int i, num_children;
     Widget *children;
     unsigned long window;
-    char *c_class;
+    String c_class;
 
     (*count)++;
 
diff --git a/src/Makefile.am b/src/Makefile.am
index a08a8bb..b0652f7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,7 @@ BITMAP_DEFINES = -DBITMAPDIR=\"$(includedir)/X11/bitmaps\"
 AM_CPPFLAGS = \
 	-I${top_srcdir}/include \
 	-I${top_srcdir}/include/X11/Xmu \
-	$(BITMAP_DEFINES) -D_BSD_SOURCE
+	$(BITMAP_DEFINES) -D_CONST_X_STRING -D_BSD_SOURCE
 
 AM_CFLAGS = $(CWARNFLAGS) $(XMU_CFLAGS)
 
diff --git a/src/WidgetNode.c b/src/WidgetNode.c
index 5c4fcc8..7a91723 100644
--- a/src/WidgetNode.c
+++ b/src/WidgetNode.c
@@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group.
 static char *binsearch(char*, char*, int, int,
 		       int (*__compar)(_Xconst void*, _Xconst void*));
 static int compare_resource_entries(_Xconst void *a,  _Xconst void *b);
-static XmuWidgetNode *find_resource(XmuWidgetNode*, char*, Bool);
+static XmuWidgetNode *find_resource(XmuWidgetNode*, _Xconst char*, Bool);
 static void mark_resource_owner(XmuWidgetNode*);
 /*
  * Implementation
@@ -92,7 +92,7 @@ compare_resource_entries(register _Xconst void *a,
 
 
 static XmuWidgetNode *
-find_resource(XmuWidgetNode *node, char *name, Bool cons)
+find_resource(XmuWidgetNode *node, _Xconst char *name, Bool cons)
 {
     register XmuWidgetNode *sup;
     XtResource res;
commit 1d85b2960cd4bf761cc359db61f2727f19b1560c
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Tue Sep 13 13:33:22 2022 -0700

    Use memcpy instead of memmove when buffers are known not to overlap
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/src/CvtStdSel.c b/src/CvtStdSel.c
index 439ab7a..ac370b4 100644
--- a/src/CvtStdSel.c
+++ b/src/CvtStdSel.c
@@ -179,7 +179,7 @@ XmuConvertStandardSelection(Widget w, Time time, Atom *selection, Atom *target,
 	    *(long*)*value = time;
 	else {
 	    long temp = time;
-	    (void) memmove((char*)*value, ((char*)&temp)+sizeof(long)-4, 4);
+	    memcpy((char*)*value, ((char*)&temp)+sizeof(long)-4, 4);
 	}
 	*type = XA_INTEGER;
 	*length = 1;
diff --git a/src/Xct.c b/src/Xct.c
index bfa606e..8ce0782 100644
--- a/src/Xct.c
+++ b/src/Xct.c
@@ -306,7 +306,7 @@ HandleExtended(register XctData data, int c)
 		return 0;
 	}
 	ptr = malloc(len + 1);
-	(void) memmove((char *)ptr, (char *)enc, len);
+	memcpy(ptr, enc, len);
 	ptr[len] = 0x00;
 	priv->enc_count++;
 	new_encodings = reallocarray(priv->encodings,
@@ -337,8 +337,7 @@ ShiftGRToGL(register XctData data, int hasCdata)
 	else
 	    priv->itembuf = malloc(priv->buf_count);
     }
-    (void) memmove((char *)priv->itembuf, (char *)data->item,
-		   data->item_length);
+    memcpy(priv->itembuf, data->item, data->item_length);
     data->item = priv->itembuf;
     if (hasCdata) {
 	for (i = data->item_length; --i >= 0; ) {
commit eb9adbd41bbd200be1a6baa1e05cecd41dd89f46
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Tue Sep 13 12:58:29 2022 -0700

    More typo fixes
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/doc/Xmu.xml b/doc/Xmu.xml
index fdd60e0..1af467a 100644
--- a/doc/Xmu.xml
+++ b/doc/Xmu.xml
@@ -61,7 +61,7 @@ and widgets.  This library is required by the Athena Widgets.
     <para>
 Starting in XFree86 4.1.0, and incorporated into X11R6.7 and later releases,
 a subset of the functions that do not rely on the Athena Widgets (libXaw)
-or X Toolkit Instrinsics (libXt) are provided in a second library, libXmuu.
+or X Toolkit Intrinsics (libXt) are provided in a second library, libXmuu.
     </para>
 
     <para>
diff --git a/include/X11/Xmu/EditresP.h b/include/X11/Xmu/EditresP.h
index c606f81..cdb1d33 100644
--- a/include/X11/Xmu/EditresP.h
+++ b/include/X11/Xmu/EditresP.h
@@ -48,9 +48,9 @@ in this Software without prior written authorization from The Open Group.
 
   The binary protocol has the following format:
 
-	Card8:		8-bit unsingned integer
-	Card16:		16-bit unsingned integer
-	Card32:		32-bit unsingned integer
+	Card8:		8-bit unsigned integer
+	Card16:		16-bit unsigned integer
+	Card32:		32-bit unsigned integer
 	Int16:		16-bit signed integer
 	Window:		32-bit value
 	Widget:		32-bit value
@@ -59,7 +59,7 @@ in this Software without prior written authorization from The Open Group.
 	[a][b][c] represent an exclusive list of choices.
 
 	All widgets are passed as a list of widgets, containing the
-	full instance heirarch of this widget.  The hierarchy is ordered
+	full instance heirarchy of this widget.  The hierarchy is ordered
 	from parent to child.  Thus the first element of each list is
 	the root of the widget tree (this makes verifying that the widget
 	still exists, MUCH faster).
@@ -128,7 +128,7 @@ in this Software without prior written authorization from The Open Group.
 		window:		Card32
          	toolkit:        String8
 
-	Send Widget Tree returns the toolkit type, and a fuly specified list
+        SendWidgetTree returns the toolkit type, and a fully specified list
         of widgets for each widget in the tree.  This is enough information
         to completely reconstruct the entire widget hierarchy.
 
@@ -194,7 +194,7 @@ in this Software without prior written authorization from The Open Group.
 			Class:	String8
 			Type:	String8 ]
 
-	GetResource retrieves the kind, name, class and type for every
+	GetResources retrieves the kind, name, class, and type for every
 	widget passed to it.  If an error occurred with the resource fetch
 	Error will be set to True for the given widget and a message
 	is returned rather than the resource info.
@@ -224,7 +224,7 @@ in this Software without prior written authorization from The Open Group.
 	and border width for each widget specified.  If an error occurred
 	with the geometry fetch "Error" will be set to True for the given
 	widget and a message is returned rather than the geometry info.
-	X an Y corrospond to the root coordinates of the upper left corner
+	X an Y correspond to the root coordinates of the upper left corner
 	of the widget (outside the window border).
 
   FindChild:
@@ -237,7 +237,7 @@ in this Software without prior written authorization from The Open Group.
 
 	Widget:		ListOfWidgets
 
-	Find Child returns a descendent of the widget specified that
+	FindChild returns a descendent of the widget specified that
 	is at the root coordinates specified.
 
 	NOTE:
diff --git a/src/Clip.c b/src/Clip.c
index 4797562..ae9e132 100644
--- a/src/Clip.c
+++ b/src/Clip.c
@@ -252,7 +252,7 @@ XmuAreaNot(XmuArea *area, int x1, int y1, int x2, int y2)
  *	or  - or operation if true, else xor operation
  *
  * Description:
- *	Executes Or (Union) or Xor (Reverse intesection) of the areas
+ *	Executes Or (Union) or Xor (Reverse intersection) of the areas
  */
 XmuArea *
 XmuAreaOrXor(XmuArea *dst, XmuArea *src, Bool or)
@@ -1017,7 +1017,7 @@ XmuScanlineAndSegment(XmuScanline *dst, XmuSegment *src)
  *	dst - destination scanline
  *	src - source segment
  *
- * Descriptipn:
+ * Description:
  * (input)     +------------+  +----------+    +-----------+
  * (src)           +------------------------+
  * (output)    +---+        +--+          +-+  +-----------+
diff --git a/src/CmapAlloc.c b/src/CmapAlloc.c
index 31cc153..0d259d2 100644
--- a/src/CmapAlloc.c
+++ b/src/CmapAlloc.c
@@ -205,7 +205,7 @@ default_allocation(XVisualInfo *vinfo, unsigned long *red,
  * 	maximum blue value = floor(cube_root(n)) - 1;
  *	maximum green value = n / ((# red values) * (# blue values)) - 1;
  * Which, on a GPX, allows for 252 entries in the best map, out of 254
- * defineable colormap entries.
+ * definable colormap entries.
  */
 
 static void
diff --git a/src/EditresCom.c b/src/EditresCom.c
index 1d1625f..07c0d47 100644
--- a/src/EditresCom.c
+++ b/src/EditresCom.c
@@ -1780,7 +1780,7 @@ _XEditResResetStream(ProtocolStream *stream)
  */
 /*
  * Function:
- *	_XEditResGetg8
+ *	_XEditResGet8
  *
  * Parameters:
  *	stream - protocol stream
@@ -1971,7 +1971,7 @@ _XEditResGetWidgetInfo(ProtocolStream *stream, WidgetInfo *info)
  ************************************************************/
 /*
  * Function:
- *	CvStringToBlock
+ *	CvtStringToBlock
  *
  * Parameters:
  *	dpy	       - display
diff --git a/src/RdBitF.c b/src/RdBitF.c
index 51f6e2a..df379c5 100644
--- a/src/RdBitF.c
+++ b/src/RdBitF.c
@@ -144,7 +144,7 @@ NextInt(FILE *fstream)
  * The data returned by the following routine is always in left-most byte
  * first and left-most bit first.  If it doesn't return BitmapSuccess then
  * its arguments won't have been touched.  This routine should look as much
- * like the Xlib routine XReadBitmapfile as possible.
+ * like the Xlib routine XReadBitmapFile as possible.
  */
 int
 XmuReadBitmapData(FILE *fstream, unsigned int *width, unsigned int *height,
diff --git a/src/ShapeWidg.c b/src/ShapeWidg.c
index 3ca7116..f093a6b 100644
--- a/src/ShapeWidg.c
+++ b/src/ShapeWidg.c
@@ -178,9 +178,9 @@ ShapeOval(Widget w)
  *
  * Parameters:
  *	w	- widget to be reshaped
- *	ellipse - True if shape to ellise, rounded rectangle otherwise
+ *	ellipse - True if shape to ellipse, rounded rectangle otherwise
  *	ew	- horizontal radius of rounded rectangle
- *	eh	- vertical radius of rouded rectangle
+ *	eh	- vertical radius of rounded rectangle
  *
  * Description:
  *	  Based on the ellipse parameter, gives the widget a elliptical


More information about the xorg-commit mailing list