/*+++++++++++++++++++++++++++++++++++++++*/
#include <X11/Xlib.h>
+#include <errno.h>
#include <Xm/MwmUtil.h>
#include <Xm/XmP.h>
sprintf(bufr, "%s*audioDlg.x: %d\n", bufr, x);
sprintf(bufr, "%s*audioDlg.y: %d\n", bufr, y);
- write (fd, bufr, strlen(bufr));
+ if(-1 == write (fd, bufr, strlen(bufr))) {
+ perror(strerror(errno));
+ }
}
}
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
+#include <errno.h>
#if defined(_AIX) || defined(__apollo)
#include <sys/dir.h>
backdrops.selected);
sprintf(bufr, "%s*backdropsDialog.selectedItem: %s\n", bufr,
backdrops.bitmapNames[backdrops.selected]);
- write (fd, bufr, strlen(bufr));
+ if(-1 == write (fd, bufr, strlen(bufr))) {
+ perror(strerror(errno));
+ }
}
}
#include <X11/keysym.h>
#include <math.h>
+#include <errno.h>
#include <X11/Xlib.h>
#include <Xm/MwmUtil.h>
reason_code = ((XmAnyCallbackStruct *)call_data)->reason;
if ( reason_code == XmCR_VALUE_CHANGED || reason_code == XmCR_DRAG )
{
- color = (int) client_data;
+ color = (int) (intptr_t) client_data;
value = ((XmScaleCallbackStruct *)call_data)->value;
if (edit.current_scale == NONE)
reason_code = ((XmAnyCallbackStruct *)call_data)->reason;
if ( reason_code == XmCR_VALUE_CHANGED || reason_code == XmCR_DRAG )
{
- scale = (int) client_data;
+ scale = (int) (intptr_t) client_data;
value = ((XmScaleCallbackStruct *)call_data)->value;
if (edit.current_scale == NONE)
sprintf(bufr, "%s*colorEditDlg.x: %d\n", bufr, x);
sprintf(bufr, "%s*colorEditDlg.y: %d\n", bufr, y);
/*any other parameter you want to save goes here*/
- write (fd, bufr, strlen(bufr));
+ if(-1 == write (fd, bufr, strlen(bufr))) {
+ perror(strerror(errno));
+ }
}
}
#include <stdio.h>
#include <fcntl.h>
+#include <errno.h>
#include <X11/Xlib.h>
pCurrentPalette->color[i].bg.red,
pCurrentPalette->color[i].bg.green,
pCurrentPalette->color[i].bg.blue);
- write(fd, temp, strlen(temp));
+ if(-1 == write(fd, temp, strlen(temp))) {
+ perror(strerror(errno));
+ return(-1);
+ }
}
XtFree(temp);
}
#include <locale.h>
#include <stdlib.h>
+#include <errno.h>
#include <X11/Intrinsic.h>
#include <X11/Xlib.h>
#include <Xm/MwmUtil.h>
if (style.dynamicColor || style.visualClass==TrueColor
|| style.visualClass==DirectColor)
XtAddCallback(colorButton[i], XmNactivateCallback, selectColorCB,
- (XtPointer)i);
+ (XtPointer) (intptr_t) i);
XmStringFree(string);
}
XtManageChildren(colorButton,pCurrentPalette->num_of_colors);
XtPointer client_data,
XtPointer call_data )
{
- int i,n;
+ intptr_t i;
+ int n;
Arg args[4];
ColorSet *color_set;
XmPushButtonCallbackStruct *cb = (XmPushButtonCallbackStruct *)call_data;
- i = (int) client_data;
+ i = (intptr_t) client_data;
/* if click_count == 1 .. first button press, set time out */
if(cb->click_count == 1)
XtIntervalId *id )
{
register int n;
- int i;
+ intptr_t i;
Arg args[2];
Pixel bg_pixel;
if (TypeOfMonitor == XmCO_BLACK_WHITE)
return;
- i = (int)client_data;
+ i = (intptr_t) client_data;
if ((edit.DialogShell == NULL) || (!XtIsManaged(edit.DialogShell)))
{
XmToggleButtonCallbackStruct *cb =
(XmToggleButtonCallbackStruct *)call_data;
- colorDialog.currentColorUse = (int) client_data;
+ colorDialog.currentColorUse = (int) (intptr_t) client_data;
switch (colorDialog.currentColorUse)
{
case XmCO_HIGH_COLOR:
style.colorSrv = True;
if(value != NULL)
{
- if((int)client_data == GET_TYPE_MONITOR)
+ if((intptr_t) client_data == GET_TYPE_MONITOR)
{
sscanf ((char *)value, "%x_%x_%x_%x", (unsigned int *) &(TypeOfMonitor),
(unsigned int *) &(UsePixmaps), (unsigned int *) &(FgColor), (unsigned int *) &dynamic_color);
pCurrentPalette->name);
sprintf(bufr, "%s*paletteDlg.selected_button: %d\n", bufr,
selected_button);
- write (fd, bufr, strlen(bufr));
+ if(-1 == write (fd, bufr, strlen(bufr))) {
+ perror(strerror(errno));
+ }
}
}
/*+++++++++++++++++++++++++++++++++++++++*/
#include <X11/Xlib.h>
+#include <errno.h>
#include <Xm/MwmUtil.h>
#include <Xm/XmP.h>
sprintf(bufr, "%s*dtwmDlg.y: %d\n", bufr, y);
sprintf(bufr, "%s*dtwmDlg.width: %d\n", bufr, width);
sprintf(bufr, "%s*dtwmDlg.height: %d\n", bufr, height);
- write (fd, bufr, strlen(bufr));
+ if(-1 == write (fd, bufr, strlen(bufr))) {
+ perror(strerror(errno));
+ }
}
}
#include <Dt/HourGlass.h>
#include <string.h>
+#include <errno.h>
#include "Help.h"
#include "Main.h"
#include "SaveRestore.h"
sprintf(bufr, "%s*Fonts.x: %d\n", bufr, x);
sprintf(bufr, "%s*Fonts.y: %d\n", bufr, y);
- write (fd, bufr, strlen(bufr));
+ if(-1 == write (fd, bufr, strlen(bufr))) {
+ perror(strerror(errno));
+ }
}
}
caddr_t call_data )
{
char *helpVolume, *locationId;
- int topic;
+ intptr_t topic;
- topic = (int) client_data;
+ topic = (intptr_t) client_data;
helpVolume = HELP_VOLUME;
switch (topic)
/*+++++++++++++++++++++++++++++++++++++++*/
#include <X11/Xlib.h>
+#include <errno.h>
#include <Xm/MwmUtil.h>
#include <Xm/XmP.h>
n = 0;
XtSetArg(args[n], XmNcomboBoxType, XmDROP_DOWN_COMBO_BOX); n++;
i18n.serverHostCB =
- (Widget) XmCreateComboBox(inputMethodForm, "serverHostCB", args, n);
+ (Widget) (intptr_t) XmCreateComboBox(inputMethodForm, "serverHostCB", args, n);
XtAddCallback(XtNameToWidget(i18n.serverHostCB, "Text"),
XmNactivateCallback, ServerHostCB, NULL);
n = 0;
XtSetArg(args[n], XmNselectionPolicy, XmBROWSE_SELECT); n++;
i18n.preeditTypeList =
- (Widget) XmCreateList(preeditTypeForm, "preeditTypeList", args, n);
+ (Widget) (intptr_t) XmCreateList(preeditTypeForm, "preeditTypeList", args, n);
n = 0;
string = CMPSTR((char *)GETMESSAGE(19, 10, "Move Up"));
sprintf(bufr, "%s*i18nDlg.y: %d\n", bufr, y);
sprintf(bufr, "%s*i18nDlg.width: %d\n", bufr, width);
sprintf(bufr, "%s*i18nDlg.height: %d\n", bufr, height);
- write (fd, bufr, strlen(bufr));
+ if(-1 == write (fd, bufr, strlen(bufr))) {
+ perror(strerror(errno));
+ }
}
}
/* include files */
/*+++++++++++++++++++++++++++++++++++++++*/
+#include <errno.h>
#include <X11/Xlib.h>
#include <Xm/MwmUtil.h>
sprintf(bufr, "%s*keyboardDlg.x: %d\n", bufr, x);
sprintf(bufr, "%s*keyboardDlg.y: %d\n", bufr, y);
- write (fd, bufr, strlen(bufr));
+ if(-1 == write (fd, bufr, strlen(bufr))) {
+ perror(strerror(errno));
+ }
}
}
#include <X11/Xlib.h>
#include <Xm/MwmUtil.h>
#include <signal.h>
+#include <errno.h>
#include <Xm/Xm.h>
#include <Xm/XmP.h>
XtManageChild (componentWidget);
XtAddCallback(componentWidget, XmNcallback, activateCB, string);
XtAddCallback(componentWidget, XmNhelpCallback,
- (XtCallbackProc)HelpRequestCB, (XtPointer)helpTag);
+ (XtCallbackProc)HelpRequestCB, (XtPointer) (intptr_t) helpTag);
XmStringFree(cmp_string);
XtFree(dtIcon);
sprintf(bufr, "%s*mainWindow.x: %d\n", bufr, x);
sprintf(bufr, "%s*mainWindow.y: %d\n", bufr, y);
- write (fd, bufr, strlen(bufr));
+ if(-1 == write (fd, bufr, strlen(bufr))) {
+ perror(strerror(errno));
+ }
}
}
/*$XConsortium: Mouse.c /main/5 1996/07/19 13:45:42 pascale $*/
#include <X11/Xlib.h>
+#include <errno.h>
#include <Xm/Xm.h>
#include <Xm/Form.h>
XtUnmanageChild (XmMessageBoxGetChild(midwarnDialog, XmDIALOG_HELP_BUTTON));
- if ((Boolean)client_data == TRANSFER)
+ if ((intptr_t)client_data == TRANSFER)
{
warnstring = CMPSTR(MID_WARN_MSG_T);
XtVaSetValues(midwarnDialog, XmNmessageString, warnstring, NULL); n++;
Boolean set;
Boolean toggle;
- toggle = (Boolean) client_data;
+ toggle = (Boolean) (intptr_t) client_data;
if(mouse.type == POINTER3B)
{
Boolean set;
Boolean toggle;
- toggle = (Boolean) client_data;
+ toggle = (Boolean) (intptr_t) client_data;
if (toggle == ADJUST)
{
sprintf(bufr, "%s*Mouse.x: %d\n", bufr, x);
sprintf(bufr, "%s*Mouse.y: %d\n", bufr, y);
- write (fd, bufr, strlen(bufr));
+ if(-1 == write (fd, bufr, strlen(bufr))) {
+ perror(strerror(errno));
+ }
}
}
XtIntervalId *id)
{
Atom aWS;
- int count = (int) client_data;
+ intptr_t count = (intptr_t) client_data;
if (DtWsmGetCurrentWorkspace (style.display, style.root, &aWS)
== Success)
#include <stdio.h>
#include <signal.h>
+#include <errno.h>
#include <X11/Intrinsic.h>
#include <X11/Xutil.h>
sprintf(bufr, "%s*Screen.x: %d\n", bufr, x);
sprintf(bufr, "%s*Screen.y: %d\n", bufr, y);
- write (fd, bufr, strlen(bufr));
+ if(-1 == write (fd, bufr, strlen(bufr))) {
+ perror(strerror(errno));
+ }
}
}
#include <X11/Xlib.h>
#include <Xm/MwmUtil.h>
+#include <errno.h>
#include <Xm/Xm.h>
#include <Xm/XmP.h>
sprintf(bufr, "%s*startupDlg.x: %d\n", bufr, x);
sprintf(bufr, "%s*startupDlg.y: %d\n", bufr, y);
- write (fd, bufr, strlen(bufr));
+ if(-1 == write (fd, bufr, strlen(bufr))) {
+ perror(strerror(errno));
+ }
}
}