Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!agate!labrea!shelby!decwrl!eda!jim From: jim@eda.com (Jim Budler) Newsgroups: comp.windows.x Subject: Re: X11R3 on Pyramid Message-ID: <499@eda.com> Date: 6 May 89 22:41:31 GMT References: <8905051503.AA07259@expo.lcs.mit.edu> Reply-To: jim@eda.com (Jim Budler) Organization: EDA Systems,Inc. Santa Clara, CA Lines: 109 In article <8905051503.AA07259@expo.lcs.mit.edu> S.Davey@CS.UCL.AC.UK writes: # I'm currently trying to compile X11R3 for our Pyramid # (running OSx4.2) but am having problems with the # Athena Widget Library (Xaw) so I sent the following # message to mark@nz.ac.vuw.comp but the message was # undelivered, if anyone has a solution to compiling Xaw # I'd be gratetful for any response. # # Steve Davey [...] # Xawlib.a to compile. The compiler fails on # AsciiSink.c and complains that line 58 of TextSrcP.h has # a missing semi-colon but on investigation there is no # missing semi-colon. [...] # Steve Davey # Systems Group # Dept Computer Science # University College London There is a conflict between the global Display and the struct member _XtTextSink->Display. The problem is actually due to the compiler. I solved it (hacked it) by renaming the member to xDisplay in lib/Xaw/{AsciiSink.c,Text.c,TextSrcP.h} as follows: *** AsciiSink.c.orig Sat May 6 14:44:37 1989 --- AsciiSink.c Sat May 6 14:43:59 1989 *************** *** 411,417 if (!buf) buf = XtMalloc(bufferSize); sink = XtNew(XtTextSinkRec); ! sink->Display = AsciiDisplayText; sink->InsertCursor = AsciiInsertCursor; sink->ClearToBackground = AsciiClearToBackground; sink->FindPosition = AsciiFindPosition; --- 411,417 ----- if (!buf) buf = XtMalloc(bufferSize); sink = XtNew(XtTextSinkRec); ! sink->xDisplay = AsciiDisplayText; sink->InsertCursor = AsciiInsertCursor; sink->ClearToBackground = AsciiClearToBackground; sink->FindPosition = AsciiFindPosition; *** Text.c.orig Sat May 6 15:16:16 1989 --- Text.c Sat May 6 14:44:00 1989 *************** *** 1091,1097 (*ctx->text.sink->ClearToBackground) (w, 0, y, ctx->text.leftmargin, height); if (startPos >= ctx->text.s.right || endPos <= ctx->text.s.left) { ! (*ctx->text.sink->Display) (w, x, y, startPos, endPos, FALSE); } else if (startPos >= ctx->text.s.left && endPos <= ctx->text.s.right) { (*ctx->text.sink->Display) (w, x, y, startPos, endPos, TRUE); } else { --- 1091,1097 ----- (*ctx->text.sink->ClearToBackground) (w, 0, y, ctx->text.leftmargin, height); if (startPos >= ctx->text.s.right || endPos <= ctx->text.s.left) { ! (*ctx->text.sink->xDisplay) (w, x, y, startPos, endPos, FALSE); } else if (startPos >= ctx->text.s.left && endPos <= ctx->text.s.right) { (*ctx->text.sink->xDisplay) (w, x, y, startPos, endPos, TRUE); } else { *************** *** 1093,1099 if (startPos >= ctx->text.s.right || endPos <= ctx->text.s.left) { (*ctx->text.sink->Display) (w, x, y, startPos, endPos, FALSE); } else if (startPos >= ctx->text.s.left && endPos <= ctx->text.s.right) { ! (*ctx->text.sink->Display) (w, x, y, startPos, endPos, TRUE); } else { DisplayText(w, startPos, ctx->text.s.left); DisplayText(w, max(startPos, ctx->text.s.left), --- 1093,1099 ----- if (startPos >= ctx->text.s.right || endPos <= ctx->text.s.left) { (*ctx->text.sink->xDisplay) (w, x, y, startPos, endPos, FALSE); } else if (startPos >= ctx->text.s.left && endPos <= ctx->text.s.right) { ! (*ctx->text.sink->xDisplay) (w, x, y, startPos, endPos, TRUE); } else { DisplayText(w, startPos, ctx->text.s.left); DisplayText(w, max(startPos, ctx->text.s.left), *** TextSrcP.h.orig Sat May 6 15:16:25 1989 --- TextSrcP.h Sat May 6 14:44:00 1989 *************** *** 55,61 typedef struct _XtTextSink { XFontStruct *font; int foreground; ! int (*Display)(); int (*InsertCursor)(); int (*ClearToBackground)(); int (*FindPosition)(); --- 55,61 ----- typedef struct _XtTextSink { XFontStruct *font; int foreground; ! int (*xDisplay)(); int (*InsertCursor)(); int (*ClearToBackground)(); int (*FindPosition)(); -- Jim Budler address = uucp: ...!{decwrl,uunet}!eda!jim domain: jim@eda.com voice = +1 408 986-9585 fax = +1 408 748-1032