(Message inbox:108)
Return-Path: root
Return-Path: <root>
Received: by tartarus (Smail3.1.28.1 #3)
	id m0oMnXC-0000rTC; Mon, 2 Aug 93 08:13 WST
Received: from iphase.com (iphase.com [157.175.3.200]) by tartarus (8.1C/8.1) with SMTP id DAA24791; Mon, 2 Aug 1993 03:28:15 +0800
Received: from fuzzylog.UUCP by iphase.com (4.1/1.34)
	id AA17078; Sun, 1 Aug 93 14:28:03 CDT
Received: by simple.sat.tx.us (5.0/SMI-SVR4)
	id AA17002; Sun, 1 Aug 93 14:24:07 CDT
Date: Sun, 1 Aug 93 14:24:07 CDT
From: bob@simple.sat.tx.us (Bob Friesenhahn)
Message-Id: <9308011924.AA17002@simple.sat.tx.us>
To: oreillym@tartarus.uwa.edu.au
Subject: Tin 1.21 Patches for Term
X-Sun-Charset: US-ASCII
Content-Length: 8081

Michael,

I now have Tin (a NNTP compatable Netnews reader) modified for term.
I am sending the patches in the hope that you will make them available
on your FTP archive server.  The performance of the reader is very
good over a V.32 (9600 baud) connection with the exception of initial
startup (reading active & newsgroups data) which takes a minute or
two.  I am sure that the patches will be very useful to other people
too.

Thanks,

Bob

-----------------------------------< cut here >-------------------------
This set of patches provides support for NNTP to a remote NNTP server via
"term", a user-space SLIP/PPP substitute. The primary distribution site
for term is "tartarus.uwa.edu.au" in the directory "/pub/oreillym/term".
This term solution is ideal for situations where term is already installed
(or you can install yourself) on the remote machine and you have a regular
dial-up login account but no SLIP or PPP connection.  It allows you to
read News remotely by accessing the NNTP server on the remote net.

diff -C 3 --new-file tin-1.21/Makefile tin-1.21+term/Makefile
*** tin-1.21/Makefile	Wed Jul 14 04:36:11 1993
--- tin-1.21+term/Makefile	Sun Aug  1 13:39:36 1993
***************
*** 1,9 ****
  # Makefile for tin - for tin compiler flag options read INSTALL and README.
  #
  # Options that may need changing. For advanced options read the INSTALL file.
! # 
  CC	= cc
! COPTS	= -c -O
  #CC	= gcc
  #COPTS	= -c -O -Wall
  # LD has to be changed to ln for AmigaDOS
--- 1,19 ----
  # Makefile for tin - for tin compiler flag options read INSTALL and README.
  #
+ # Modified to support "term" by Bob Friesenhahn, bob@simple.sat.tx.us
+ #
  # Options that may need changing. For advanced options read the INSTALL file.
! #
! # Change following to pick up your term distribution directory.  Term should
! # be compiled prior to buiding Tin.  Comment out all three definitions if
! # you don't want term support to be compiled in.
! # Term can be obtained from the directory tartarus.uwa.edu.au:/pub/oreillym/term
! TERMDIR = ../term-107
! TERMINC = -I$(TERMDIR) -DTERM
! TERMLIB = $(TERMDIR)/client.a
! 
  CC	= cc
! COPTS	= -c -O -DNNTP_ONLY -DDONT_HAVE_NNTP_EXTS -DNNTP_INEWS -DSTDC_HEADERS
  #CC	= gcc
  #COPTS	= -c -O -Wall
  # LD has to be changed to ln for AmigaDOS
***************
*** 12,20 ****
  #YACC = bison -y
  #DEBUG	=
  DEBUG	= -g -DDEBUG
! INSBINDIR	= /usr/local/bin
! INSMANDIR	= /usr/local/man/man
! INSMANEXT	= 1
  
  LIBDIR	= /usr/lib/news
  SPOOLDIR= /usr/spool/news
--- 22,30 ----
  #YACC = bison -y
  #DEBUG	=
  DEBUG	= -g -DDEBUG
! BINDIR	= /usr/local/bin
! MANDIR	= /usr/local/man/man
! MANEXT	= 1
  
  LIBDIR	= /usr/lib/news
  SPOOLDIR= /usr/spool/news
***************
*** 33,39 ****
  MAKE	= make
  SHELL	= /bin/sh
  STRIP	= strip
! STRIP2	= mcs -d
  ROFF	= nroff -man 
  ROFF	= groff -Tascii -man 
  BASE_VER= 1.20
--- 43,49 ----
  MAKE	= make
  SHELL	= /bin/sh
  STRIP	= strip
! STRIP2	= echo #mcs -d
  ROFF	= nroff -man 
  ROFF	= groff -Tascii -man 
  BASE_VER= 1.20
***************
*** 92,98 ****
  	@echo " "
  
  .c.o:
! 	$(CC) $(CFLAGS) $*.c
  
  # Uncomment for COHERENT os
  #.c.y:
--- 102,108 ----
  	@echo " "
  
  .c.o:
! 	$(CC) $(CFLAGS) $(TERMINC) $*.c
  
  # Uncomment for COHERENT os
  #.c.y:
***************
*** 292,298 ****
  			-DLIBDIR=\"$(LIBDIR)\" \
  			-DSPOOLDIR=\"$(SPOOLDIR)\" \
  			-DNOVROOTDIR=\"$(NOVROOTDIR)\"' \
! 			LIBS="-lcurses -ltermcap" \
  			EXE=tin linkit
  
  # For NCR Tower
--- 302,308 ----
  			-DLIBDIR=\"$(LIBDIR)\" \
  			-DSPOOLDIR=\"$(SPOOLDIR)\" \
  			-DNOVROOTDIR=\"$(NOVROOTDIR)\"' \
! 			LIBS="-lcurses -ltermcap -lnsl -lsocket" \
  			EXE=tin linkit
  
  # For NCR Tower
***************
*** 440,446 ****
  
  linkit: $(OFILES)
  	@echo "Linking $(EXE) v$(VER)..."
! 	$(LD) $(LFLAGS) -o $(EXE) $(OFILES) $(NNTPLIB) $(NETLIBS) $(LIBS) 
  	@ls -l $(EXE)
  
  install:
--- 450,456 ----
  
  linkit: $(OFILES)
  	@echo "Linking $(EXE) v$(VER)..."
! 	$(LD) $(LFLAGS) -o $(EXE) $(OFILES) $(NNTPLIB) $(NETLIBS) $(TERMLIB) $(LIBS) 
  	@ls -l $(EXE)
  
  install:
diff -C 3 --new-file tin-1.21/README.TERM tin-1.21+term/README.TERM
*** tin-1.21/README.TERM
--- tin-1.21+term/README.TERM	Sun Aug  1 13:54:17 1993
***************
*** 0 ****
--- 1,35 ----
+ This set of patches provides support for NNTP to a remote NNTP server via
+ "term", a user-space SLIP/PPP substitute. The primary distribution site
+ for term is "tartarus.uwa.edu.au" in the directory "/pub/oreillym/term".
+ This term solution is ideal for situations where term is already installed
+ (or you can install yourself) on the remote machine and you have a regular
+ dial-up login account but no SLIP or PPP connection.  It allows you to
+ read News remotely by accessing the NNTP server on the remote net.
+ 
+ First retrieve, test, and install the term package. Obtain a copy of Tin
+ version 1.21 and extract in the parent directory of where term is
+ located. Apply these patches using Larry Wall's patch utility
+ ("patch < patchfile"). Tailor according to the instructions provided with
+ Tin for an NNTP-only configuration. Compile, and you should be ready to go.
+ 
+ Under Solaris and possibly other SVR4 systems, there is a conflict
+ between a symbol in the curses library and the term client library. I
+ added the line:
+ 
+ #define term_errno tterm_errno
+ 
+ to term's config.h to resolve this problem. Any programs that use term
+ and reference term_errno will be effected but usage of this variable in
+ client programs seems a bit doubtful.
+ 
+ If you have questions or comments, please feel free to mail to me at the
+ following addresses:
+ 
+ bob@simple.sat.tx.us	(home)
+ thefuzz@bix.com		(BIX)
+ bfriesen@iphase.com	(work)
+ 
+ Thanks,
+ 
+ Bob Friesenhahn
+ 
diff -C 3 --new-file tin-1.21/config.h tin-1.21+term/config.h
*** tin-1.21/config.h	Wed Jul 14 04:36:13 1993
--- tin-1.21+term/config.h	Sun Aug  1 12:52:50 1993
***************
*** 12,17 ****
--- 12,25 ----
   *              right notice, and it must be included in any copy made
   */
  
+ /* Gcc defines sun & __svr4__ under Solaris. */
+ #if defined(sun) && (defined(__svr4__) || defined(SVR4))
+ #	if !defined(SVR4)
+ #		define SVR4
+ #	endif /* !SVR4 */
+ #	define HAVE_TERMIO_H
+ #endif
+ 
  #if !defined(M_AMIGA) && !defined(M_OS2) && !defined(M_UNIX)
  #	define	M_UNIX
  #endif
diff -C 3 --new-file tin-1.21/extern.h tin-1.21+term/extern.h
*** tin-1.21/extern.h	Wed Jul 14 04:36:14 1993
--- tin-1.21+term/extern.h	Wed Jul 28 22:09:37 1993
***************
*** 16,22 ****
   * Library prototypes
   */
  
! #if defined(__GNUC__) && defined(DEBUG)
  
  extern unsigned int alarm (unsigned int seconds);
  extern int close (int fildes);
--- 16,22 ----
   * Library prototypes
   */
  
! #if (defined(__GNUC__) && defined(DEBUG)) && !defined(STDC_HEADERS)
  
  extern unsigned int alarm (unsigned int seconds);
  extern int close (int fildes);
diff -C 3 --new-file tin-1.21/nntplib.c tin-1.21+term/nntplib.c
*** tin-1.21/nntplib.c	Wed Jul 14 04:36:20 1993
--- tin-1.21+term/nntplib.c	Sat Jul 31 11:20:30 1993
***************
*** 16,21 ****
--- 16,25 ----
  
  #include "tin.h"
  
+ #ifdef TERM
+ #include <client.h>
+ #endif
+ 
  #ifdef NNTP_ONLY
  #	ifndef NNTP_ABLE
  #		define	NNTP_ABLE
***************
*** 225,230 ****
--- 229,248 ----
  {
  #ifdef NNTP_ABLE
  	int	s = -1;
+ #ifdef TERM
+   printf ("\nOpening term connection to %s:%d.\n",machine,port);
+ 
+   if ((s = connect_server(0)) < 0) {
+     perror("couldn't connect to term server");
+     exit(-1);
+   }
+  
+   /* Open a connection to port %d on the host %s. */ 
+   send_command(s, C_PORT, 0, "%s:%d", machine, port);
+   /* Ignore any further commands on this connection*/
+   send_command(s, C_DUMB, 1, 0);
+ 
+ #else /* !TERM */
  	struct	sockaddr_in sin;
  #ifdef TLI 
  	struct	hostent *gethostbyname (), *hp;
***************
*** 425,430 ****
--- 443,449 ----
  #endif /* !EXCELAN */
  #endif /* !h_addr */
  #endif /* !TLI */
+ #endif /* !TERM */
  	return (s);
  #else
  	return (-1);

-----------------------------------< cut here >-------------------------

