Modifications and bug-fixes to make Mosaic compile and run under UNICOS. (part 2)
The changes mostly revolve around: - Type changes and casts to make the picky C-compiler happy - Fixed bug in XmxExtractToken where it would not zero out bits 16-31 on a non-32-bit system - Added back old getline implementation as its missing on UNICOS - Added some missing typedefs and conditional directives to turn on the relevant code pieces for UNICOS
This commit is contained in:

committed by
Robert Clausecker

parent
075b2e4911
commit
8baf5f2e62
16
libXmx/Xmx.c
16
libXmx/Xmx.c
@@ -52,7 +52,9 @@
|
||||
* mosaic-x@ncsa.uiuc.edu. *
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _UNICOS
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include <Xm/RepType.h>
|
||||
|
||||
@@ -131,7 +133,9 @@ XmxExtractToken (int cd)
|
||||
{
|
||||
/* Pull the low 16 bits, if uniqid has been set. */
|
||||
if (Xmx_uniqid_has_been_set)
|
||||
return ((cd << 16) >> 16);
|
||||
/* This doesn't work on a non-32-bit system */
|
||||
/*return ((cd << 16) >> 16);*/
|
||||
return cd & 0xffff;
|
||||
else
|
||||
return cd;
|
||||
}
|
||||
@@ -1641,7 +1645,7 @@ int XmxModalYesOrNo (Widget parent, XtAppContext app,
|
||||
title = XmStringCreateLtoR ("Prompt", XmSTRING_DEFAULT_CHARSET);
|
||||
|
||||
XmxSetArg (XmNdialogTitle, (XtArgVal)title);
|
||||
XmxSetArg (XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL);
|
||||
XmxSetArg (XmNdialogStyle, (XtArgVal)XmDIALOG_FULL_APPLICATION_MODAL);
|
||||
XmxSetArg (XmNmessageString, (XtArgVal)question);
|
||||
XmxSetArg (XmNokLabelString, (XtArgVal)yes);
|
||||
XmxSetArg (XmNcancelLabelString, (XtArgVal)no);
|
||||
@@ -1718,7 +1722,7 @@ void XmxMakeInfoDialogWait (Widget parent, XtAppContext app,
|
||||
title = XmStringCreateLtoR (titlestr, XmSTRING_DEFAULT_CHARSET);
|
||||
|
||||
XmxSetArg (XmNdialogTitle, (XtArgVal)title);
|
||||
XmxSetArg (XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL);
|
||||
XmxSetArg (XmNdialogStyle, (XtArgVal)XmDIALOG_FULL_APPLICATION_MODAL);
|
||||
XmxSetArg (XmNmessageString, (XtArgVal)info);
|
||||
XmxSetArg (XmNokLabelString, (XtArgVal)yes);
|
||||
XmxSetArg (XmNsymbolPixmap, (XtArgVal)dialogInformation);
|
||||
@@ -1767,7 +1771,7 @@ void XmxMakeErrorDialogWait (Widget parent, XtAppContext app,
|
||||
title = XmStringCreateLtoR (titlestr, XmSTRING_DEFAULT_CHARSET);
|
||||
|
||||
XmxSetArg (XmNdialogTitle, (XtArgVal)title);
|
||||
XmxSetArg (XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL);
|
||||
XmxSetArg (XmNdialogStyle, (XtArgVal)XmDIALOG_FULL_APPLICATION_MODAL);
|
||||
XmxSetArg (XmNmessageString, (XtArgVal)info);
|
||||
XmxSetArg (XmNokLabelString, (XtArgVal)yes);
|
||||
XmxSetArg (XmNsymbolPixmap, (XtArgVal)dialogError);
|
||||
@@ -1818,7 +1822,7 @@ char *XmxModalPromptForString (Widget parent, XtAppContext app,
|
||||
title = XmStringCreateLtoR ("Prompt", XmSTRING_DEFAULT_CHARSET);
|
||||
|
||||
XmxSetArg (XmNdialogTitle, (XtArgVal)title);
|
||||
XmxSetArg (XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL);
|
||||
XmxSetArg (XmNdialogStyle, (XtArgVal)XmDIALOG_FULL_APPLICATION_MODAL);
|
||||
XmxSetArg (XmNselectionLabelString, (XtArgVal)question);
|
||||
XmxSetArg (XmNokLabelString, (XtArgVal)yes);
|
||||
XmxSetArg (XmNcancelLabelString, (XtArgVal)no);
|
||||
@@ -1984,7 +1988,7 @@ char *XmxModalPromptForPassword (Widget parent, XtAppContext app,
|
||||
title = XmStringCreateLtoR ("Prompt", XmSTRING_DEFAULT_CHARSET);
|
||||
|
||||
XmxSetArg (XmNdialogTitle, (XtArgVal)title);
|
||||
XmxSetArg (XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL);
|
||||
XmxSetArg (XmNdialogStyle, (XtArgVal)XmDIALOG_FULL_APPLICATION_MODAL);
|
||||
XmxSetArg (XmNselectionLabelString, (XtArgVal)question);
|
||||
XmxSetArg (XmNokLabelString, (XtArgVal)yes);
|
||||
XmxSetArg (XmNcancelLabelString, (XtArgVal)no);
|
||||
|
@@ -56,8 +56,11 @@
|
||||
#define __XMXP_H__
|
||||
|
||||
/* System includes. */
|
||||
|
||||
#ifndef _UNICOS
|
||||
#include <stdint.h>
|
||||
#else
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
|
||||
/* Here are some nasty ifdef's to make SGI's weird header files happy -DXP */
|
||||
|
||||
|
Reference in New Issue
Block a user