Thread View: news.software.readers
1 messages
1 total messages
Started by Bob Friesenhahn
Fri, 20 Aug 1993 04:50
Tin 1.21 patches to work with term
Author: Bob Friesenhahn
Date: Fri, 20 Aug 1993 04:50
Date: Fri, 20 Aug 1993 04:50
280 lines
9026 bytes
9026 bytes
Hi, I am distributing these patches because I am told that term
will be replaced by an improved (but incompatable) version called
"slap" before long and these patches won't be of much use. I
figure I might was well post them while they still have some value.
These patches are being posted via this modified version of tin.
Thanks,
Bob
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 Wed Aug 4 07:55:17 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,252 ----
{
#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. */
+ if (send_command(s, C_PORT, 0, "%s:%d", machine, port) < 0) {
+ fprintf(stderr, "Open failed: %s.\n", command_result);
+ exit(2);
+ }
+
+ /* 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 ****
--- 447,453 ----
#endif /* !EXCELAN */
#endif /* !h_addr */
#endif /* !TLI */
+ #endif /* !TERM */
return (s);
#else
return (-1);
--
Bob Friesenhahn
bfriesen@iphase.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads