aboutsummaryrefslogtreecommitdiff
path: root/libXmu/src
diff options
context:
space:
mode:
Diffstat (limited to 'libXmu/src')
-rw-r--r--libXmu/src/CrCmap.c2
-rw-r--r--libXmu/src/LocBitmap.c6
-rw-r--r--libXmu/src/Lower.c24
-rw-r--r--libXmu/src/WidgetNode.c4
4 files changed, 20 insertions, 16 deletions
diff --git a/libXmu/src/CrCmap.c b/libXmu/src/CrCmap.c
index 9cb5c81c0..4414b1f27 100644
--- a/libXmu/src/CrCmap.c
+++ b/libXmu/src/CrCmap.c
@@ -496,7 +496,7 @@ RWcell(Display *dpy, Colormap cmap, XColor *color, XColor *request,
static int
compare(_Xconst void *e1, _Xconst void *e2)
{
- return ((int)(*(long *)e1 - *(long *)e2));
+ return ((int)(*(_Xconst long *)e1 - *(_Xconst long *)e2));
}
diff --git a/libXmu/src/LocBitmap.c b/libXmu/src/LocBitmap.c
index 1d8b19828..229d0fde4 100644
--- a/libXmu/src/LocBitmap.c
+++ b/libXmu/src/LocBitmap.c
@@ -150,7 +150,7 @@ XmuLocatePixmapFile(Screen *screen, _Xconst char *name,
*/
for (i = 1; i <= 4; i++) {
- char *fn = filename;
+ const char *fn = filename;
Pixmap pixmap;
unsigned char *data;
@@ -158,7 +158,7 @@ XmuLocatePixmapFile(Screen *screen, _Xconst char *name,
case 1:
if (!(name[0] == '/' || ((name[0] == '.') && name[1] == '/')))
continue;
- fn = (char *) name;
+ fn = name;
try_plain_name = False;
break;
case 2:
@@ -175,7 +175,7 @@ XmuLocatePixmapFile(Screen *screen, _Xconst char *name,
break;
case 4:
if (!try_plain_name) continue;
- fn = (char *) name;
+ fn = name;
break;
}
diff --git a/libXmu/src/Lower.c b/libXmu/src/Lower.c
index d3aaaf3ee..d33d20442 100644
--- a/libXmu/src/Lower.c
+++ b/libXmu/src/Lower.c
@@ -60,9 +60,10 @@ in this Software without prior written authorization from The Open Group.
void
XmuCopyISOLatin1Lowered(char *dst, _Xconst char *src)
{
- register unsigned char *dest, *source;
+ unsigned char *dest;
+ _Xconst unsigned char *source;
- for (dest = (unsigned char *)dst, source = (unsigned char *)src;
+ for (dest = (unsigned char *)dst, source = (_Xconst unsigned char *)src;
*source;
source++, dest++)
*dest = XmuTolower(*source);
@@ -72,9 +73,10 @@ XmuCopyISOLatin1Lowered(char *dst, _Xconst char *src)
void
XmuCopyISOLatin1Uppered(char *dst, _Xconst char *src)
{
- register unsigned char *dest, *source;
+ unsigned char *dest;
+ _Xconst unsigned char *source;
- for (dest = (unsigned char *)dst, source = (unsigned char *)src;
+ for (dest = (unsigned char *)dst, source = (_Xconst unsigned char *)src;
*source;
source++, dest++)
*dest = XmuToupper(*source);
@@ -84,9 +86,9 @@ XmuCopyISOLatin1Uppered(char *dst, _Xconst char *src)
int
XmuCompareISOLatin1(_Xconst char *first, _Xconst char *second)
{
- register unsigned char *ap, *bp;
+ _Xconst unsigned char *ap, *bp;
- for (ap = (unsigned char *)first, bp = (unsigned char *)second;
+ for (ap = (_Xconst unsigned char *)first, bp = (_Xconst unsigned char *)second;
*ap && *bp && XmuTolower(*ap) == XmuTolower(*bp);
ap++, bp++)
;
@@ -97,11 +99,12 @@ XmuCompareISOLatin1(_Xconst char *first, _Xconst char *second)
void
XmuNCopyISOLatin1Lowered(char *dst, _Xconst char *src, register int size)
{
- register unsigned char *dest, *source;
+ unsigned char *dest;
+ _Xconst unsigned char *source;
if (size > 0)
{
- for (dest = (unsigned char *)dst, source = (unsigned char *)src;
+ for (dest = (unsigned char *)dst, source = (_Xconst unsigned char *)src;
*source && size > 1;
source++, dest++, size--)
*dest = XmuTolower(*source);
@@ -112,11 +115,12 @@ XmuNCopyISOLatin1Lowered(char *dst, _Xconst char *src, register int size)
void
XmuNCopyISOLatin1Uppered(char *dst, _Xconst char *src, register int size)
{
- register unsigned char *dest, *source;
+ unsigned char *dest;
+ _Xconst unsigned char *source;
if (size > 0)
{
- for (dest = (unsigned char *)dst, source = (unsigned char *)src;
+ for (dest = (unsigned char *)dst, source = ( _Xconst unsigned char *)src;
*source && size > 1;
source++, dest++, size--)
*dest = XmuToupper(*source);
diff --git a/libXmu/src/WidgetNode.c b/libXmu/src/WidgetNode.c
index db295bf15..037eb0cdf 100644
--- a/libXmu/src/WidgetNode.c
+++ b/libXmu/src/WidgetNode.c
@@ -86,8 +86,8 @@ static int
compare_resource_entries(register _Xconst void *a,
register _Xconst void *b)
{
- return strcmp (((XtResourceList)a)->resource_name,
- ((XtResourceList)b)->resource_name);
+ return strcmp (((_Xconst XtResource *)a)->resource_name,
+ ((_Xconst XtResource *)b)->resource_name);
}