xmtoolbox is a mwm-utils app that emulates the old IRIX toolbox. I'm porting it back to IRIX because it being FOSS gives us a great opportunity.
There's three files:
tbmain.c, tbparse.c and tbparse.h that are core for compilation when you remove the session management crap.
Code:
% c99 -c tbmain.c -woff 1196,3970,3604,1174
cc-1515 c99: ERROR File = tbmain.c, Line = 179
A value of type "int" cannot be assigned to an entity of type "Widget".
wframe=XmVaCreateManagedFrame(wshell,"mainFrame",
^
cc-1515 c99: ERROR File = tbmain.c, Line = 182
A value of type "int" cannot be assigned to an entity of type "Widget".
wmain=XmVaCreateManagedRowColumn(wframe,"main",
^
cc-1515 c99: ERROR File = tbmain.c, Line = 410
A value of type "int" cannot be assigned to an entity of type "Widget".
wmenu=XmVaCreateManagedRowColumn(wmain,"menu",
^
cc-1020 c99: ERROR File = tbmain.c, Line = 706
The identifier "XmCHARSET_TEXT" is undefined.
XmCHARSET_TEXT,NULL,0,XmOUTPUT_ALL);
^
cc-1020 c99: ERROR File = tbmain.c, Line = 706
The identifier "XmOUTPUT_ALL" is undefined.
XmCHARSET_TEXT,NULL,0,XmOUTPUT_ALL);
^
5 errors detected in the compilation of "tbmain.c".
These errors are what stands between this and a potentially compilable object (In practice this is likely the beginning, as those woff flags suppress errors related to implicit declarations and more.
These are new functions related to Motif 2.3.8, which doesn't compile out of the box on IRIX and I'm not interested in -- let's backport this to IRIX instead?
https://github.com/alx210/mwm-utils/blob...c/tbmain.c -- reference file, other than the ifdefs I removed (I don't have this code public yet)
The first two errors are caused by this section:
Code:
wframe=XmVaCreateManagedFrame(wshell,"mainFrame",
XmNshadowThickness,2,XmNshadowType,XmSHADOW_OUT,NULL);
wmain=XmVaCreateManagedRowColumn(wframe,"main",
XmNmarginWidth,0,XmNmarginHeight,0,XmNspacing,0,
XmNorientation,XmVERTICAL,NULL);
In my code (the ifdefs of SESSIONMGR are removed) this is at line 179
There's no direct successor of functions for this in older motif that I can see and documentation of new motif stuff is rare at best. How do we rewrite this for old motif?
Same issue for line 410.
The final two are caused by this callback:
Code:
static void user_input_cb(Widget w, XtPointer client_data, XtPointer call_data)
{
XmSelectionBoxCallbackStruct *cbs=
(XmSelectionBoxCallbackStruct*)call_data;
char **result=(char**)client_data;
if(cbs->reason==XmCR_CANCEL)
*result="\0";
else
*result=(char*)XmStringUnparse(cbs->value,NULL,0,
XmCHARSET_TEXT,NULL,0,XmOUTPUT_ALL);
}
XmStringUnparse confuses me, as does the doc here for it:
https://linux.die.net/man/3/xmstringunparse
Is it possible to change this to something that is supported in Motif 2.1.x?
I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast.
https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently.
https://codeberg.org/SolusRaion -- Code repos I control
Technical problems should be sent my way.