This patch to the Xaw3d-0.6 sources should allow for it to be compiled against R4. They were contributed by Jake Vogelaar. I haven't tried them myself. If they don't work, tell Jake, not me! Jake says: PS: This was tested on SCO XENIX System V, running X386 1.1b .. I compiled and tested the Xaw examples that came with the mit R4 distribution. //////////////////////////////////-------\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Jake Vogelaar: jxv3790@hertz.njit.edu, jake@maple.njit.edu Computer Vision R&D, Warner-Lambert Manufacturing Development Laboratory New Jersey Institute of Technology -------------------------------- cut -------------------------------- *** AsciiSrc.c.in Mon Mar 8 22:29:35 1993 --- AsciiSrc.c Tue Mar 9 22:00:06 1993 *************** *** 36,42 **** --- 36,44 ---- #include #include #include + #ifndef XAW3DR4 #include + #endif #include #include #include *************** *** 46,51 **** --- 48,57 ---- # include /* for Widget Classes. */ #endif + #ifdef XAW3DR4 + #define XPointer caddr_t + #define XrmPermStringToQuark XrmStringToQuark + #endif /**************************************************************** * *** Command.c.in Tue Mar 9 00:26:18 1993 --- Command.c Tue Mar 9 22:00:26 1993 *************** static XtActionsRec actionsList[] = { *** 93,98 **** --- 93,102 ---- {"unhighlight", Unhighlight} }; + #ifdef XAW3DR4 + XtActionList xaw_command_actions_list = actionsList; + #endif + #define SuperClass ((LabelWidgetClass)&labelClassRec) CommandClassRec commandClassRec = { *** Form.c.in Mon Mar 8 22:51:02 1993 --- Form.c Tue Mar 9 22:01:32 1993 *************** SOFTWARE. *** 32,37 **** --- 32,40 ---- #include #include + #ifdef XAW3DR4 + #define XrmPermStringToQuark XrmStringToQuark + #endif /* Private Definitions */ *************** static void ClassInitialize() *** 205,213 **** --- 208,218 ---- XtAddConverter( XtRString, XtREdgeType, _CvtStringToEdgeType, (XtConvertArgList)NULL, 0 ); + #ifndef XAW3DR4 XtSetTypeConverter (XtRString, XtRWidget, XmuNewCvtStringToWidget, parentCvtArgs, XtNumber(parentCvtArgs), XtCacheNone, (XtDestructor)NULL); + #endif } static void ClassPartInitialize(class) *** Simple.c.in Tue Mar 9 21:07:01 1993 --- Simple.c Tue Mar 9 22:02:01 1993 *************** SOFTWARE. *** 30,35 **** --- 30,38 ---- #include #include #include + #ifdef XAW3DR4 + #define XPointer caddr_t + #endif #define offset(field) XtOffsetOf(SimpleRec, simple.field) *************** SimpleClassRec simpleClassRec = { *** 92,97 **** --- 95,176 ---- WidgetClass simpleWidgetClass = (WidgetClass)&simpleClassRec; + #ifdef XAW3DR4 + #define new_done(type, value) \ + { \ + if (toVal->addr != NULL) { \ + if (toVal->size < sizeof(type)) { \ + toVal->size = sizeof(type); \ + return False; \ + } \ + *(type*)(toVal->addr) = (value); \ + } \ + else { \ + static type static_val; \ + static_val = (value); \ + toVal->addr = (XPointer)&static_val; \ + } \ + toVal->size = sizeof(type); \ + return True; \ + } + + /* Function Name: XmuCvtStringToColorCursor + * Description: Converts a string into a colored cursor. + * Arguments: dpy + * args - an argument list (see below). + * num_args - number of elements in the argument list. + * fromVal - value to convert from. + * toVal - value to convert to. + * data + * Returns: True or False + */ + + /*ARGSUSED*/ + Boolean + XmuCvtStringToColorCursor(dpy, args, num_args, fromVal, toVal, converter_data) + Display *dpy; + XrmValuePtr args; + Cardinal *num_args; + XrmValuePtr fromVal; + XrmValuePtr toVal; + XtPointer *converter_data; /* unused */ + { + Cursor cursor; + Pixel fg, bg; + Colormap c_map; + XColor colors[2]; + Cardinal number; + XrmValue ret_val; + + if (*num_args != 4) { + XtAppWarningMsg(XtDisplayToApplicationContext(dpy), + "wrongParameters","cvtStringToColorCursor","XmuError", + "String to color cursor conversion needs four arguments", + (String *)NULL, (Cardinal *)NULL); + return False; + } + + fg = *((Pixel *) args[1].addr); + bg = *((Pixel *) args[2].addr); + c_map = *((Colormap *) args[3].addr); + + number = 1; + XmuCvtStringToCursor(args, &number, fromVal, &ret_val); + + cursor = *((Cursor *) ret_val.addr); + + if (cursor == None) + new_done(Cursor, cursor); + + colors[0].pixel = fg; + colors[1].pixel = bg; + + XQueryColors (dpy, c_map, colors, 2); + XRecolorCursor(dpy, cursor, colors, colors + 1); + new_done(Cursor, cursor); + } + #endif + static void ClassInitialize() { static XtConvertArgRec convertArg[] = { *** Simple.h.in Tue Mar 9 21:01:06 1993 --- Simple.h Tue Mar 9 22:06:23 1993 *************** SOFTWARE. *** 57,62 **** --- 57,67 ---- */ + #ifdef XAW3DR4 + #define XtNpointerColor "pointerColor" + #define XtNpointerColorBackground "pointerColorBackground" + #define XtRColorCursor "ColorCursor" + #endif #define XtNcursor "cursor" #define XtNcursorName "cursorName" #define XtNinsensitiveBorder "insensitiveBorder" *** StripChart.c.in Mon Mar 8 22:29:42 1993 --- StripChart.c Tue Mar 9 22:02:28 1993 *************** SOFTWARE. *** 29,35 **** --- 29,37 ---- #include #include #include + #ifndef XAW3DR4 #include + #endif #define MS_PER_SEC 1000 *** Text.c.in Mon Mar 8 22:29:49 1993 --- Text.c Tue Mar 9 22:03:13 1993 *************** SOFTWARE. *** 41,47 **** --- 41,49 ---- #include #include + #ifndef XAW3DR4 #include + #endif unsigned long FMT8BIT = 0L; *************** unsigned long FMT8BIT = 0L; *** 53,58 **** --- 55,63 ---- #define SrcSearch XawTextSourceSearch #define SrcCvtSel XawTextSourceConvertSelection #define SrcSetSelection XawTextSourceSetSelection + #ifdef XAW3DR4 + #define XrmPermStringToQuark XrmStringToQuark + #endif #define BIGNUM ((Dimension)32023) #define MULTI_CLICK_TIME 500L *** Text.h.in Tue Mar 9 00:35:41 1993 --- Text.h Tue Mar 9 22:03:33 1993 *************** SOFTWARE. *** 58,64 **** --- 58,66 ---- */ + #ifndef XAW3DR4 typedef long XawTextPosition; + #endif typedef enum { XawtextScrollNever, XawtextScrollWhenNeeded, XawtextScrollAlways} XawTextScrollMode; *** TextSrc.c.in Tue Mar 9 00:00:31 1993 --- TextSrc.c Tue Mar 9 22:03:57 1993 *************** *** 37,42 **** --- 37,45 ---- #include #include #include + #ifdef XAW3DR4 + #define XrmPermStringToQuark XrmStringToQuark + #endif /**************************************************************** * *** Toggle.c.in Mon Mar 8 23:07:53 1993 --- Toggle.c Tue Mar 9 22:04:40 1993 *************** *** 41,46 **** --- 41,49 ---- #include #include #include + #ifdef XAW3DR4 + extern XtActionList xaw_command_actions_list; + #endif /**************************************************************** * *************** ClassInit() *** 169,182 **** --- 172,191 ---- }; XawInitializeWidgetSet(); + #ifndef XAW3DR4 XtSetTypeConverter(XtRString, XtRWidget, XmuNewCvtStringToWidget, parentCvtArgs, XtNumber(parentCvtArgs), XtCacheNone, (XtDestructor)NULL); + #endif /* * Find the set and unset actions in the command widget's action table. */ + #ifndef XAW3DR4 XtGetActionList(commandWidgetClass, &actions, &num_actions); + #else + actions = xaw_command_actions_list; + #endif for (i = 0 ; i < num_actions ; i++) { if (streq(actions[i].string, "set")) *** Tree.c.in Mon Mar 8 23:46:44 1993 --- Tree.c Tue Mar 9 22:05:01 1993 *************** static void check_gravity (tw, grav) *** 298,305 **** --- 298,307 ---- static void ClassInitialize () { XawInitializeWidgetSet(); + #ifndef XAW3DR4 XtAddConverter (XtRString, XtRGravity, XmuCvtStringToGravity, (XtConvertArgList) NULL, (Cardinal) 0); + #endif } *** Tree.h.in Tue Mar 9 20:58:15 1993 --- Tree.h Tue Mar 9 22:05:35 1993 *************** *** 70,75 **** --- 70,79 ---- #define XtCVSpace "VSpace" #endif + #ifdef XAW3DR4 + typedef int XtGravity; + #define XtRGravity "Gravity" + #endif #define XtNautoReconfigure "autoReconfigure" #define XtNlineWidth "lineWidth" #define XtNtreeGC "treeGC" *** Vendor.c.in Mon Mar 8 23:48:35 1993 --- Vendor.c Tue Mar 9 22:06:07 1993 *************** SOFTWARE. *** 41,47 **** --- 41,49 ---- #include #include #include + #ifndef XAW3DR4 #include + #endif static XtResource resources[] = { {XtNinput, XtCInput, XtRBool, sizeof(Bool), *************** static void XawVendorShellInitialize(req *** 144,151 **** --- 146,155 ---- ArgList args; Cardinal *num_args; { + #ifndef XAW3DR4 XtAddEventHandler(new, (EventMask) 0, TRUE, _XEditResCheckMessages, (XtPointer)NULL); + #endif } static void ChangeManaged(wid) *** /dev/null Tue Mar 9 20:24:00 1993 --- X11/Xosdefs.h Tue Mar 9 21:09:41 1993 *************** *** 0 **** --- 1,95 ---- + /* + * O/S-dependent (mis)feature macro definitions + * + * $XConsortium: Xosdefs.h,v 1.7 91/07/19 23:22:19 rws Exp $ + * + * Copyright 1991 Massachusetts Institute of Technology + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of M.I.T. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. M.I.T. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + + #ifndef _XOSDEFS_H_ + #define _XOSDEFS_H_ + + /* + * X_NOT_STDC_ENV means does not have ANSI C header files. Lack of this + * symbol does NOT mean that the system has stdarg.h. + * + * X_NOT_POSIX means does not have POSIX header files. Lack of this + * symbol does NOT mean that the POSIX environment is the default. + * You may still have to define _POSIX_SOURCE to get it. + */ + + #ifdef NOSTDHDRS + #define X_NOT_POSIX + #define X_NOT_STDC_ENV + #endif + + #ifdef sony + #ifndef SYSTYPE_SYSV + #define X_NOT_POSIX + #endif + #endif + + #ifdef UTEK + #define X_NOT_POSIX + #define X_NOT_STDC_ENV + #endif + + #ifdef CRAY + #define X_NOT_POSIX + #endif + + #ifdef vax + #ifndef ultrix /* assume vanilla BSD */ + #define X_NOT_POSIX + #define X_NOT_STDC_ENV + #endif + #endif + + #ifdef luna + #define X_NOT_POSIX + #define X_NOT_STDC_ENV + #endif + + #ifdef Mips + #define X_NOT_POSIX + #define X_NOT_STDC_ENV + #endif + + #ifdef USL + #ifdef SYSV /* (release 3.2) */ + #define X_NOT_POSIX + #define X_NOT_STDC_ENV + #endif + #endif + + #ifdef SYSV386 + #ifdef SYSV + #define X_NOT_POSIX + #define X_NOT_STDC_ENV + #endif + #endif + + #ifdef MOTOROLA + #ifdef SYSV + #define X_NOT_STDC_ENV + #endif + #endif + + #endif /* _XOSDEFS_H_ */ *** /dev/null Tue Mar 9 20:24:00 1993 --- X11/Xfuncproto.h Tue Mar 9 21:09:52 1993 *************** *** 0 **** --- 1,76 ---- + /* $XConsortium: Xfuncproto.h,v 1.7 91/05/13 20:49:21 rws Exp $ */ + /* + * Copyright 1989, 1991 by the Massachusetts Institute of Technology + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of M.I.T. not be used in advertising + * or publicity pertaining to distribution of the software without specific, + * written prior permission. M.I.T. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + */ + + /* Definitions to make function prototypes manageable */ + + #ifndef _XFUNCPROTO_H_ + #define _XFUNCPROTO_H_ + + #ifndef NeedFunctionPrototypes + #if defined(FUNCPROTO) || __STDC__ || defined(__cplusplus) || defined(c_plusplus) + #define NeedFunctionPrototypes 1 + #else + #define NeedFunctionPrototypes 0 + #endif + #endif /* NeedFunctionPrototypes */ + + #ifndef NeedVarargsPrototypes + #if __STDC__ || defined(__cplusplus) || defined(c_plusplus) || (FUNCPROTO&2) + #define NeedVarargsPrototypes 1 + #else + #define NeedVarargsPrototypes 0 + #endif + #endif /* NeedVarargsPrototypes */ + + #if NeedFunctionPrototypes + + #ifndef NeedNestedPrototypes + #if __STDC__ || defined(__cplusplus) || defined(c_plusplus) || (FUNCPROTO&8) + #define NeedNestedPrototypes 1 + #else + #define NeedNestedPrototypes 0 + #endif + #endif /* NeedNestedPrototypes */ + + #ifndef _Xconst + #if __STDC__ || defined(__cplusplus) || defined(c_plusplus) || (FUNCPROTO&4) + #define _Xconst const + #else + #define _Xconst + #endif + #endif /* _Xconst */ + + #ifndef NeedWidePrototypes + #ifdef NARROWPROTO + #define NeedWidePrototypes 0 + #else + #define NeedWidePrototypes 1 /* default to make interropt. easier */ + #endif + #endif /* NeedWidePrototypes */ + + #endif /* NeedFunctionPrototypes */ + + #ifndef _XFUNCPROTOBEGIN + #ifdef __cplusplus /* for C++ V2.0 */ + #define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */ + #define _XFUNCPROTOEND } + #else + #define _XFUNCPROTOBEGIN + #define _XFUNCPROTOEND + #endif + #endif /* _XFUNCPROTOBEGIN */ + + #endif /* _XFUNCPROTO_H_ */