(Message inbox:5) Replied: Fri, 23 Jul 1993 11:02:47 +0800 Replied: bfriesen@iphase.com (Bob Friesenhahn) Return-Path: root Return-Path: Received: by tartarus (Smail3.1.28.1 #3) id m0oJDNa-0000rQC; Fri, 23 Jul 93 11:01 WST Received: from iphase.com (iphase.com [157.175.3.200]) by tartarus (8.1C/8.1) with SMTP id LAA02528; Fri, 23 Jul 1993 11:04:44 +0800 Received: from wildcat.iphase.com by iphase.com (4.1/1.34) id AA15483; Thu, 22 Jul 93 22:04:22 CDT Received: by wildcat.iphase.com (4.1/SMI-4.1) id AA01293; Thu, 22 Jul 93 22:04:20 CDT From: bfriesen@iphase.com (Bob Friesenhahn) Message-Id: <9307230304.AA01293@wildcat.iphase.com> Subject: xgopher 1.3 patches for term To: oreillym@tartarus.uwa.edu.au Date: Thu, 22 Jul 1993 22:04:20 -0500 (CDT) X-Mailer: ELM [version 2.4 PL21] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 4051 Michael, I derived patches from a xgopher 1.2 term version I found on another host. I fixed version 1.3 with them and it appears to be working just fine. The only oddity I noticed is that if txconn is running, it gets aborted by xgopher. You might want to put these patches on your FTP server. Thanks, Bob ----------------------------< cut here >------------------------- diff -C 3 xgopher.1.3/Imakefile xgopher.1.3+term/Imakefile *** xgopher.1.3/Imakefile Wed May 12 09:55:04 1993 --- xgopher.1.3+term/Imakefile Wed Jul 21 11:21:58 1993 *************** *** 1,5 **** --- 1,18 ---- XGOPHERDIR = $(LIBDIR)/xgopher + /* + * Change following to point to term source directory on your system + * Make sure -DTERM is included in LOCAL_DEFINES to get term support + * + */ + TERMDIR = /usr/local/eng/src/net/term_107 + + /* + * "Standard" LOCAL_DEFINES, see below for Solaris + * + */ + LOCAL_DEFINES = -DTERM -I$(TERMDIR) + /* You may add -O to the next line if you'd like. There will not be too much difference for most machines. */ *************** *** 26,32 **** ** include them a second time). ** *************************************************************************/ /* ! LOCAL_DEFINES = -DSYSV -DSVR4 */ /************************************************************************* --- 39,45 ---- ** include them a second time). ** *************************************************************************/ /* ! LOCAL_DEFINES = -DSYSV -DSVR4 -DTERM -I$(TERMDIR) */ /************************************************************************* *************** *** 40,46 **** DEFINES = $(RESOURCE_DEFINES) $(LOCAL_DEFINES) DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) ! LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) SRCS = xgopher.c item.c itemList.c dir.c dirList.c markList.c \ util.c misc.c net.c \ gui.c resources.c help.c status.c jobs.c \ --- 53,59 ---- DEFINES = $(RESOURCE_DEFINES) $(LOCAL_DEFINES) DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) ! LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(TERMDIR)/client.a SRCS = xgopher.c item.c itemList.c dir.c dirList.c markList.c \ util.c misc.c net.c \ gui.c resources.c help.c status.c jobs.c \ diff -C 3 xgopher.1.3/net.c xgopher.1.3+term/net.c *** xgopher.1.3/net.c Thu Apr 8 11:01:50 1993 --- xgopher.1.3+term/net.c Wed Jul 21 10:58:10 1993 *************** *** 22,27 **** --- 22,32 ---- #include + #ifdef TERM + #include + #include + #endif + #ifndef IS_BSD #include #endif *************** *** 83,92 **** char *host; int port; { /* Host can be a hostname or ip-address. If 'host' is null, the local host is assumed. */ - int iSock = 0; char hostName[MAXHOSTNAMELEN]; LOG(logFP, "Connecting to \'%s\' at port %d\n", host, port); --- 88,113 ---- char *host; int port; { + int iSock = 0; + int lcompression = 1; + int rcompression =1; + + #ifdef TERM + + /* printf ("Opening term connection to %s:%d.\n",host,port); */ + + if ((iSock = connect_server(0)) < 0) { + perror("couldn't connect to term server"); + exit(-1); + } + + send_command(iSock, C_PORT, 0, "%s:%d", host, port); + send_command(iSock, C_DUMB, 1, 0); + + #else /* TERM */ /* Host can be a hostname or ip-address. If 'host' is null, the local host is assumed. */ char hostName[MAXHOSTNAMELEN]; LOG(logFP, "Connecting to \'%s\' at port %d\n", host, port); *************** *** 124,129 **** --- 145,151 ---- close(iSock); return (-4); } + #endif /* TERM */ return(iSock); } ----------------------------< cut here >------------------------- --- Bob Friesenhahn, Interphase bfriesen@iphase.com