Thread View: news.software.readers
1 messages
1 total messages
Started by Mike Glendinning
Wed, 26 May 1993 15:32
TIN 1.2 PL0 patches for use with INN client library.
Author: Mike Glendinning
Date: Wed, 26 May 1993 15:32
Date: Wed, 26 May 1993 15:32
289 lines
8638 bytes
8638 bytes
Here are a few patches to 'tin' 1.2 Pl0 to make it use the client routines
supplied with INN 1.4. There is one minor bug fix to 'sigfile.c' also.
I did these so that all our newsreaders here use the same 'inn.conf'
settings and postings appear the same whatever version of 'inews'
you are running. Given that I've already gone to the trouble of
installing the INN stuff on my newsreading clients, I wanted 'tin' to
actually use it!
You will need the files 'getconfig.o' and 'getfqdn.o' from the INN
distribution.
The specific changes made are:
- Makefile defines: NNTP_ONLY, DONT_HAVE_NNTP_EXTS
- inews.c: Use INN compatible "Path:" and "From:" headers
- init.c: Use INN compatible "Organization:" and INN 'inews' by default
- nntplib.c: Use INN compatible NNTP server
- sigfile.c: BUG FIX: don't append '.signature' if using external 'inews'
- tin.1: Change description of 'use_builtin_inews'
- Changed on a whim, for almost no reason whatsoever: NNTP_SERVER_FILE,
DONT_LOG_USER, SPOOLDIR, LIBDIR
Its all a bit of a nasty hack, but it does work. Tidier support for INN would
be nice, but I don't have time at the moment. Use or discard the code as
you see fit.
-Mike Glendinning, Ingres UK (mikeg@ingres.co.uk).
----------------------
*** Makefile.orig Tue May 25 16:09:50 1993
--- Makefile Wed May 26 14:15:11 1993
***************
*** 3,9 ****
# Options that may need changing. For advanced options read the INSTALL file.
#
CC = cc
! COPTS = -c -O
#CC = gcc
#COPTS = -c -O -Wall
#COPTS = -c -O -Wall -DNNTP_ABLE
--- 3,9 ----
# Options that may need changing. For advanced options read the INSTALL file.
#
CC = cc
! COPTS = -c -O -DNNTP_ONLY -DDONT_HAVE_NNTP_EXTS -DUSE_INN_CLIENTLIB -DNNTP_SERVER_FILE=\"/usr/local/lib/rn/server\" -DDONT_LOG_USER
#CC = gcc
#COPTS = -c -O -Wall
#COPTS = -c -O -Wall -DNNTP_ABLE
***************
*** 16,23 ****
BINDIR = /usr/local/bin
MANDIR = /usr/local/man/man
MANEXT = 1
! LIBDIR = /usr/lib/news
! SPOOLDIR= /usr/spool/news
AMIGA_COPTS=-so -wc -m0s -DAMIGA -DSYSV -DDONT_REREAD_ACTIVE_FILE \
-DSMALL_MEMORY_MODEL -DNO_SHELL_ESCAPE -DNO_PIPING \
-DSLOW_SCREEN_UPDATE -DAMIGA_BBS -DLIBDIR=""uulib:"" \
--- 16,23 ----
BINDIR = /usr/local/bin
MANDIR = /usr/local/man/man
MANEXT = 1
! LIBDIR = /usr/local/news
! SPOOLDIR= /var/spool/news
AMIGA_COPTS=-so -wc -m0s -DAMIGA -DSYSV -DDONT_REREAD_ACTIVE_FILE \
-DSMALL_MEMORY_MODEL -DNO_SHELL_ESCAPE -DNO_PIPING \
-DSLOW_SCREEN_UPDATE -DAMIGA_BBS -DLIBDIR=""uulib:"" \
***************
*** 25,30 ****
--- 25,31 ----
ANL_INEWS_GATEWAY= #.erlm.siemens.de
NNTP_INEWS_GATEWAY=
NNTP_INEWS_DOMAIN=
+ NETLIBS = getconfig.o getfqdn.o
# Define if you want the multi SPOOLDIR extensions & library
CDROM = -DCDROM_ABLE
***************
*** 329,337 ****
install:
@echo "Installing $(EXE) v$(VER)..."
! @$(STRIP) $(EXE)
! @-$(STRIP2) $(EXE)
! @-mv $(EXE) $(BINDIR)
@-rm $(BINDIR)/r$(EXE)
@ln $(BINDIR)/$(EXE) $(BINDIR)/r$(EXE)
@chmod 755 $(BINDIR)/$(EXE)
--- 330,336 ----
install:
@echo "Installing $(EXE) v$(VER)..."
! @-cp $(EXE) $(BINDIR)
@-rm $(BINDIR)/r$(EXE)
@ln $(BINDIR)/$(EXE) $(BINDIR)/r$(EXE)
@chmod 755 $(BINDIR)/$(EXE)
*** inews.c.orig Tue May 25 16:10:57 1993
--- inews.c Wed May 26 15:58:23 1993
***************
*** 61,66 ****
--- 61,70 ----
get_host_name (host_name);
get_user_info (user_name, full_name);
get_from_name (user_name, host_name, full_name, from_name);
+
+ #ifdef USE_INN_CLIENTLIB
+ strcpy (user_name, "not-for-mail");
+ #endif
/*
* Send Path: and From: article headers
***************
*** 171,176 ****
--- 175,190 ----
strcpy (host_name, nntp_inews_gateway);
}
} else {
+ # ifdef USE_INN_CLIENTLIB
+ {
+ extern char *GetFQDN ();
+ char *p;
+
+ if ((p = GetFQDN ()) == NULL)
+ p = "PROBLEM_WITH_GETFQDN";
+ my_strncpy (host, p, sizeof (host));
+ }
+ # else
# ifdef HAVE_GETHOSTBYNAME
{
struct hostent *host_entry;
***************
*** 191,196 ****
--- 205,211 ----
}
# endif
# endif
+ # endif
strcpy (host_name, host);
}
***************
*** 271,276 ****
--- 286,302 ----
#ifdef NNTP_INEWS_DOMAIN
if (*(NNTP_INEWS_DOMAIN)) {
strcpy (nntp_inews_domain, NNTP_INEWS_DOMAIN);
+ }
+ #endif
+
+ #ifdef USE_INN_CLIENTLIB
+ if (! nntp_inews_domain[0]) {
+ extern char *GetConfigValue ();
+ char *p;
+
+ if ((p = GetConfigValue ("fromhost")) == NULL)
+ p = "PROBLEM_WITH_GETCONFIGVALUE";
+ my_strncpy (nntp_inews_domain, p, sizeof (nntp_inews_domain));
}
#endif
*** init.c.orig Tue May 25 16:10:58 1993
--- init.c Wed May 26 16:12:10 1993
***************
*** 163,168 ****
--- 163,171 ----
char *p;
FILE *fp;
struct stat sb;
+ #ifdef USE_INN_CLIENTLIB
+ char *GetConfigValue ();
+ #endif /* USE_INN_CLIENTLIB */
#ifdef AMIGA
/*
***************
*** 298,304 ****
--- 301,311 ----
update = FALSE;
#endif
unread_art_mark = UNREAD_ART_MARK;
+ #ifdef USE_INN_CLIENTLIB
+ use_builtin_inews = FALSE;
+ #else
use_builtin_inews = TRUE;
+ #endif
use_keypad = FALSE;
newsrc[0] = '\0';
***************
*** 457,462 ****
--- 464,478 ----
*/
joinpath (nam, rcdir, "organization");
fp = fopen (nam, "r");
+
+ #ifdef USE_INN_CLIENTLIB
+ if (fp == NULL) {
+ if ((p = GetConfigValue ("organization")) != NULL) {
+ my_strncpy (default_organization, p, sizeof (default_organization));
+ goto got_org;
+ }
+ }
+ #endif /* USE_INN_CLIENTLIB */
/*
* check LIBDIR/organization for system wide organization
*** nntplib.c.orig Tue May 25 16:11:06 1993
--- nntplib.c Tue May 25 19:07:47 1993
***************
*** 92,101 ****
char *file;
{
#ifdef NNTP_ABLE
- register FILE *fp;
register char *cp;
static char buf[256];
if ((cp = (char *) getenv ("NNTPSERVER"))) {
(void) strcpy (buf, cp);
return (buf);
--- 92,109 ----
char *file;
{
#ifdef NNTP_ABLE
register char *cp;
static char buf[256];
+ #ifdef USE_INN_CLIENTLIB
+ extern char *GetConfigValue ();
+ if ((cp = GetConfigValue ("server")) != NULL) {
+ (void) strcpy (buf, cp);
+ return (buf);
+ }
+ #else
+ register FILE *fp;
+
if ((cp = (char *) getenv ("NNTPSERVER"))) {
(void) strcpy (buf, cp);
return (buf);
***************
*** 120,125 ****
--- 128,134 ----
}
(void) fclose (fp);
+ #endif /* USE_INN_CLIENTLIB */
#endif /* NNTP_ABLE */
return (NULL); /* No entry */
}
*** sigfile.c.orig Tue May 25 16:11:30 1993
--- sigfile.c Wed May 26 14:23:52 1993
***************
*** 45,51 ****
int i;
#ifdef NNTP_INEWS
! if (read_news_via_nntp) {
flag = TRUE;
}
#endif
--- 45,51 ----
int i;
#ifdef NNTP_INEWS
! if (read_news_via_nntp && use_builtin_inews) {
flag = TRUE;
}
#endif
*** tin.1.orig Tue May 25 16:10:23 1993
--- tin.1 Wed May 26 13:58:44 1993
***************
*** 1109,1115 ****
The character used to show that an article has not been read. Default is '+'.
.TP 4
\fBuse_builtin_inews\fP
! Allows the builtin NNTP inews to be enabled/disabled. Default is ON (enabled).
.TP 4
\fBuse_keypad\fP
Allows the scroll keys on the keypad to be enabled/disabled on supported
--- 1109,1115 ----
The character used to show that an article has not been read. Default is '+'.
.TP 4
\fBuse_builtin_inews\fP
! Allows the builtin NNTP inews to be enabled/disabled. Default is OFF (disabled).
.TP 4
\fBuse_keypad\fP
Allows the scroll keys on the keypad to be enabled/disabled on supported
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