From @cannon.ecf.toronto.edu:steve@ecf.toronto.edu Thu May 12 16:05:13 1994
Received: from cannon.ecf.toronto.edu by vidda.cso.uiuc.edu (AIX 3.2/UCB 5.64/4.03)
          id AA13150; Thu, 12 May 1994 16:05:11 -0500
Received: by cannon.ecf.toronto.edu id <13497>; Thu, 12 May 1994 17:04:03 -0400
Newsgroups: comp.infosystems.gopher,comp.windows.x.apps,comp.windows.x
Organization: University of Toronto, Engineering Computing Facility
From: Steve Kotsopoulos <steve@ecf.toronto.edu>
To: tuchman@vidda.cso.uiuc.edu
Subject: patch to build xgopher under X11R6
Message-Id: <94May12.170403edt.13497@cannon.ecf.toronto.edu>
Date: 	Thu, 12 May 1994 17:03:50 -0400
Status: RO

I could not build xgopher-1.3.2 under X11R6 because the file KeyWSink.c
was giving me compiler errors. I contacted the author, Allan Tuchman
<tuchman@vidda.cso.uiuc.edu>. He told me KeyWSink.c is a superclass of
the Athena Text Sink widget, and is dependent on the superclass's
data. He also suggested I try disabling the widget, since it is only
used to highlight the index search words in a text display.

The following patch changes 2 files (Imakefile and text.c) so that
xgopher can compile under X11R6.

To apply the patch, cd to your xgopher1.3 source, and run patch < this-file

====================== cut here ================================

*** orig/Imakefile	Mon Jun  7 14:39:13 1993
--- Imakefile	Thu May 12 16:41:16 1994
***************
*** 36,41 ****
--- 36,49 ----
   **	$(HELP_FILE) is path to help file; usually /usr/lib/X11/Xgopher **
   *************************************************************************/
  
+ #if ProjectX < 6
+ KEYSOURCE = KeyWSink.c
+ KEYOBJECT = KeyWSink.o
+ #else
+ KEYSOURCE = 
+ KEYOBJECT =
+ #endif
+ 
  RESOURCE_DEFINES= -DHELP_FILE=\"$(XGOPHERDIR)/xgopher.help\"
          DEFINES = $(RESOURCE_DEFINES) $(LOCAL_DEFINES)
  
***************
*** 50,56 ****
  		  sc_dir.c sc_index.c sc_telnet.c sc_tn3270.c \
  		  sc_cso.c sc_image.c sc_sound.c sc_text.c sc_binary.c \
  		  sc_extend.c \
!                   KeyWSink.c
  
             OBJS = xgopher.o item.o itemList.o dir.o dirList.o markList.o \
                    util.o misc.o net.o \
--- 58,64 ----
  		  sc_dir.c sc_index.c sc_telnet.c sc_tn3270.c \
  		  sc_cso.c sc_image.c sc_sound.c sc_text.c sc_binary.c \
  		  sc_extend.c \
! 		  $(KEYSOURCE)
  
             OBJS = xgopher.o item.o itemList.o dir.o dirList.o markList.o \
                    util.o misc.o net.o \
***************
*** 61,67 ****
  		  sc_dir.o sc_index.o sc_telnet.o sc_tn3270.o \
  		  sc_cso.o sc_image.o sc_sound.o sc_text.o sc_binary.o \
  		  sc_extend.o \
!         	  KeyWSink.o
  
  ComplexProgramTarget(xgopher)
  
--- 69,75 ----
  		  sc_dir.o sc_index.o sc_telnet.o sc_tn3270.o \
  		  sc_cso.o sc_image.o sc_sound.o sc_text.o sc_binary.o \
  		  sc_extend.o \
! 		  $(KEYOBJECT)
  
  ComplexProgramTarget(xgopher)
  
*** orig/text.c	Mon Jun  7 14:27:54 1993
--- text.c	Thu May 12 16:33:43 1994
***************
*** 32,43 ****
  #include <X11/Xaw/Viewport.h>
  #include <X11/Shell.h>
  
! #include "KeyWSink.h"
  
  #include "conf.h"
  #include "osdep.h"
  #include "appres.h"
- #include "compatR4.h"
  #include "xglobals.h"
  #include "text.h"
  #include "misc.h"
--- 32,48 ----
  #include <X11/Xaw/Viewport.h>
  #include <X11/Shell.h>
  
! #include "compatR4.h"
! 
! #if XtSpecificationRelease > 5
! #define XGOPHER_X11R6		/* KeySink widget won't compile under R6 yet */
! #else
! #include "KeyWSink.h"		/* KeySink works fine for R4 & R5 */
! #endif
  
  #include "conf.h"
  #include "osdep.h"
  #include "appres.h"
  #include "xglobals.h"
  #include "text.h"
  #include "misc.h"
***************
*** 477,482 ****
--- 482,488 ----
  					textForm, args, n);
  		setTextWidgetSize(tep->textDisplay, 80, 24);
  
+ #ifndef XGOPHER_X11R6
  		/* add the key word sink */
  		{
  #define			TAB_COUNT	32	/* same as in AsciiText.c */
***************
*** 495,500 ****
--- 501,507 ----
  			XtSetArg(args[n], XtNtextSink, kwSink);  n++;
  			XtSetValues(tep->textDisplay, args, n);
  		}
+ #endif
  
  
  	/* create DONE button */
***************
*** 682,687 ****
--- 689,695 ----
  	tep->stringValue = NULL;
  	saveItemInfo(&(tep->origFields), gi, title);
  
+ #ifndef XGOPHER_X11R6
  	/* set keyword resource in text sink */
  
  	n = 0;
***************
*** 691,696 ****
--- 699,705 ----
  	n = 0;
  	XtSetArg(args[n], XtNwordList, NULL);  n++;
  	XtSetValues(kwSink, args, n);
+ #endif
  
  	/* set title and file name */
  
***************
*** 746,751 ****
--- 755,761 ----
  	saveItemInfo(&(tep->origFields), gi, title);
  
  
+ #ifndef XGOPHER_X11R6
  	/* set keyword resource in text sink */
  
  	n = 0;
***************
*** 761,766 ****
--- 771,777 ----
  		XtSetArg(args[n], XtNwordList, tep->wordList);  n++;
  	}
  	XtSetValues(kwSink, args, n);
+ #endif
  
  	/* set title and file name */
  
***************
*** 808,813 ****
--- 819,825 ----
  	tep->stringValue   = string;
  	saveItemInfo(&(tep->origFields), gi, title);
  
+ #ifndef XGOPHER_X11R6
  	/* set keyword resource in text sink */
  
  	n = 0;
***************
*** 817,822 ****
--- 829,835 ----
  	n = 0;
  	XtSetArg(args[n], XtNwordList, NULL);  n++;
  	XtSetValues(kwSink, args, n);
+ #endif
  
  	/* set title and file name */
  

