break;
case ArgColor:
- ParseColor((int)ad->argLoc, argValue);
+ ParseColor((int)(intptr_t)ad->argLoc, argValue);
break;
case ArgAttribs: {
break;
case ArgFont:
- ParseFont(argValue, (int)ad->argLoc);
+ ParseFont(argValue, (int)(intptr_t)ad->argLoc);
break;
case ArgCommSettings:
case ArgBoolean:
case ArgTrue:
case ArgFalse:
- *(Boolean *) argDescriptors[i].argLoc = (int)argDescriptors[i].defaultValue;
+ *(Boolean *) argDescriptors[i].argLoc = (int)(intptr_t)argDescriptors[i].defaultValue;
break;
case ArgInt:
case ArgX:
case ArgY:
case ArgZ:
- *(int *) argDescriptors[i].argLoc = (int)argDescriptors[i].defaultValue;
+ *(int *) argDescriptors[i].argLoc = (int)(intptr_t)argDescriptors[i].defaultValue;
break;
case ArgString:
case ArgFilename:
*(char **) argDescriptors[i].argLoc = (char *)argDescriptors[i].defaultValue;
break;
case ArgBoardSize:
- *(int *) argDescriptors[i].argLoc = (int)argDescriptors[i].defaultValue;
+ *(int *) argDescriptors[i].argLoc = (int)(intptr_t)argDescriptors[i].defaultValue;
break;
case ArgColor:
- ParseColor((int)argDescriptors[i].argLoc, (char*)argDescriptors[i].defaultValue);
+ ParseColor((int)(intptr_t)argDescriptors[i].argLoc, (char*)argDescriptors[i].defaultValue);
break;
case ArgFloat: // floats cannot be casted to int without precision loss
default: ; // some arg types cannot be initialized through table
return;
}
- SFdrawList((int)n, SF_DO_NOT_SCROLL);
+ SFdrawList((int)(intptr_t)n, SF_DO_NOT_SCROLL);
}
/* ARGSUSED */
scrollbarWidgetClass, selFileLists[n], arglist, i);
XtAddCallback(selFileVScrolls[n], XtNjumpProc,
- SFvFloatSliderMovedCallback, (XtPointer) n);
+ SFvFloatSliderMovedCallback, (XtPointer)(intptr_t) n);
XtAddCallback(selFileVScrolls[n], XtNscrollProc,
- SFvAreaSelectedCallback, (XtPointer) n);
+ SFvAreaSelectedCallback, (XtPointer)(intptr_t) n);
i = 0;
scrollbarWidgetClass, selFileLists[n], arglist, i);
XtAddCallback(selFileHScrolls[n], XtNjumpProc,
- SFhSliderMovedCallback, (XtPointer) n);
+ SFhSliderMovedCallback, (XtPointer)(intptr_t) n);
XtAddCallback(selFileHScrolls[n], XtNscrollProc,
- SFhAreaSelectedCallback, (XtPointer) n);
+ SFhAreaSelectedCallback, (XtPointer)(intptr_t) n);
}
i = 0;
for (n = 0; n < NR; n++) {
XtAddEventHandler(selFileLists[n], ExposureMask, True,
- SFexposeList, (XtPointer) n);
+ SFexposeList, (XtPointer)(intptr_t) n);
XtAddEventHandler(selFileLists[n], EnterWindowMask, False,
- SFenterList, (XtPointer) n);
+ SFenterList, (XtPointer)(intptr_t) n);
XtAddEventHandler(selFileLists[n], LeaveWindowMask, False,
- SFleaveList, (XtPointer) n);
+ SFleaveList, (XtPointer)(intptr_t) n);
XtAddEventHandler(selFileLists[n], PointerMotionMask, False,
- SFmotionList, (XtPointer) n);
+ SFmotionList, (XtPointer)(intptr_t) n);
XtAddEventHandler(selFileLists[n], ButtonPressMask, False,
- SFbuttonPressList, (XtPointer) n);
+ SFbuttonPressList, (XtPointer)(intptr_t) n);
XtAddEventHandler(selFileLists[n], ButtonReleaseMask, False,
- SFbuttonReleaseList, (XtPointer) n);
+ SFbuttonReleaseList, (XtPointer)(intptr_t) n);
}
XtAddEventHandler(selFileField, KeyPressMask, False,
SaveFontArg(FILE *f, ArgDescriptor *ad)
{
char *name;
- int i, n = (int)ad->argLoc;
+ int i, n = (int)(intptr_t)ad->argLoc;
switch(n) {
case 0: // CLOCK_FONT
name = appData.clockFont;
void
SaveAttribsArg(FILE *f, ArgDescriptor *ad)
{ // here the "argLoc" defines a table index. It could have contained the 'ta' pointer itself, though
- fprintf(f, OPTCHAR "%s" SEPCHAR "%s\n", ad->argName, (&appData.colorShout)[(int)ad->argLoc]);
+ fprintf(f, OPTCHAR "%s" SEPCHAR "%s\n", ad->argName, (&appData.colorShout)[(int)(intptr_t)ad->argLoc]);
}
void
SaveColor(FILE *f, ArgDescriptor *ad)
{ // in WinBoard the color is an int and has to be converted to text. In X it would be a string already?
- if(colorVariable[(int)ad->argLoc])
- fprintf(f, OPTCHAR "%s" SEPCHAR "%s\n", ad->argName, *(char**)colorVariable[(int)ad->argLoc]);
+ if(colorVariable[(int)(intptr_t)ad->argLoc])
+ fprintf(f, OPTCHAR "%s" SEPCHAR "%s\n", ad->argName, *(char**)colorVariable[(int)(intptr_t)ad->argLoc]);
}
void