3 Silence gcc warnings about unsafe pointer casts
.
4 Call
<ctype
.h
> functions correctly
.
6 --- source
/userCmds
.c
~ 2004-09-02 08:50:38.000000000 +0000
8 @@
-1116,7 +1116,7 @@
static void dimSelDepItemsInMenu(Widget
9 XtVaGetValues(items
[n
], XmNsubMenuId
, &subMenu
, NULL
);
10 dimSelDepItemsInMenu(subMenu
, menuList
, nMenuItems
, sensitive
);
12 - index
= (int)userData
- 10;
13 + index
= (intptr_t)userData
- 10;
14 if (index
<0 || index
>= nMenuItems
)
16 if (menuList
[index
]->input
== FROM_SELECTION
)
17 @@
-2864,7 +2864,7 @@
static void generateAcceleratorString(ch
18 /* for a consistent look to the accelerator names in the menus,
19 capitalize the first letter of the keysym */
20 strcpy(keyName
, XKeysymToString(keysym
));
21 - *keyName
= toupper(*keyName
);
22 + *keyName
= toupper((unsigned char)*keyName
);
24 /* concatenate the strings together */
25 sprintf(text
, "%s%s%s%s%s%s%s%s", shiftStr
, ctrlStr
, altStr
,
26 @@
-2946,7 +2946,7 @@
static int parseAcceleratorString(const
27 of the keysyms are
"prettied up" by generateAcceleratorString */
28 *keysym
= XStringToKeysym(fields
[nFields
-1]);
29 if (*keysym
== NoSymbol
) {
30 - *fields
[nFields
-1] = tolower(*fields
[nFields
-1]);
31 + *fields
[nFields
-1] = tolower((unsigned char)*fields
[nFields
-1]);
32 *keysym
= XStringToKeysym(fields
[nFields
-1]);
33 if (*keysym
== NoSymbol
)