Only in .: Apollo-patches
Only in .: Apply-patch
Only in .: Apply-patch.bak
Only in .: Changes.apollo
Only in .: Cnews-patch
Only in .: Cnews-patch.bak
Only in .: Diff.apollo
Only in .: ISO-patch
Only in .: Log
Only in .: Log.bak
Only in .: Makefile
Only in ../src.dist: Makefile.dst
Only in .: Old.03.26
Only in .: apollo.c
Only in .: apollo.o
diff -cb ../src.dist/batch.c ./batch.c
No differences encountered
Only in .: caesar
Only in .: check.art
Only in .: checkgroups
Only in .: checkgroups.11.09
diff -cb ../src.dist/checkgroups.sh ./checkgroups.sh
*** ../src.dist/checkgroups.sh	Fri Nov  6 16:33:23 1987
--- ./checkgroups.sh	Mon Nov  9 17:18:47 1987
***************
*** 128,139 ****
  if test -s /tmp/$$out
  then
  	(echo	"Subject: Problems with your active file"
  	echo ""
  	cat /tmp/$$out
  	) | if test $# -gt 0
  		then
  			PATH=/bin:$PATH
! 			mail $1
  		else
  			cat
  		fi	
--- 128,140 ----
  if test -s /tmp/$$out
  then
  	(echo	"Subject: Problems with your active file"
+ 	echo "To: $1"
  	echo ""
  	cat /tmp/$$out
  	) | if test $# -gt 0
  		then
  			PATH=/bin:$PATH
! 			/news/lib/recmail
  		else
  			cat
  		fi	
diff -cb ../src.dist/checknews.c ./checknews.c
No differences encountered
diff -cb ../src.dist/compress.c ./compress.c
No differences encountered
diff -cb ../src.dist/control.c ./control.c
*** ../src.dist/control.c	Mon Nov 30 10:00:17 1987
--- ./control.c	Thu Jan 14 18:07:58 1988
***************
*** 365,371 ****
--- 365,373 ----
  		return 1;
  	}
  
+ #ifndef apollo
  	lock();
+ #endif
  	/* see if it already exists */
  	(void) rewind(actfp); clearerr(actfp);
  	while(fgets(abuf, BUFLEN, actfp) != NULL) {
***************
*** 380,392 ****
--- 382,398 ----
  			p -= 3;
  			if (argc > 2 && STRCMP(argv[2], "moderated") == 0) {
  				if (*p == 'm') {
+ #ifndef apollo
  					unlock();
+ #endif
  					return 0;
  				}
  				*p = 'm';
  			} else {
  				if (*p != 'm') {
+ #ifndef apollo
  					unlock();
+ #endif
  					return 0;
  				}
  				*p = 'y';
***************
*** 434,440 ****
--- 440,448 ----
  			 * No permission to change
  			 */
  			if(!can_change) {
+ #ifndef apollo
  				unlock();
+ #endif
  				return 0;
  			}
  # endif /* NONEWGROUPS */
***************
*** 442,447 ****
--- 450,458 ----
  			 * group. Rewrite the active file
  			 */
  			(void) fseek(actfp, -2L, 1); /* back up 2 characters */
+ #ifdef apollo
+ 			lock();
+ #endif
  			putc(*p, actfp);
  			fflush(actfp);
  			if (*p != 'm')
***************
*** 460,465 ****
--- 471,479 ----
  	if(can_change) {
  		didcreate++;
  		(void) fseek(actfp, 0L, 2); clearerr(actfp);
+ #ifdef apollo
+ 		lock();
+ #endif
  		fprintf(actfp, "%s 00000 00001 %c\n", argv[1],
  			(argc > 2 && STRCMP(argv[2], "moderated") == 0)
  				? 'm' : 'y');
***************
*** 480,485 ****
--- 494,502 ----
  		actfp->_flag |= _IOWRT;
  #endif /* USG */
  		fflush(actfp);
+ #ifdef apollo
+ 		unlock();
+ #endif
  	}
  
  # ifdef NOTIFY
***************
*** 514,520 ****
--- 531,539 ----
  		(void) mclose(fd);
  	}
  # endif /* NOTIFY */
+ #ifndef apollo
  	unlock();
+ #endif
  	return 0;
  }
  
***************
*** 626,631 ****
--- 645,653 ----
  		struct tm *tm;
  		log("Can't cancel %s:  non-existent", argv[1]);
  		(void) time(&t);
+ #ifdef CHIST
+ 		sprintf(bfr, "%s\t%ld~-\tcancelled", argv[1], t);
+ #else
  		tm = localtime(&t);
  #ifdef USG
  		sprintf(bfr,"%s\t%2.2d/%2.2d/%d %2.2d:%2.2d\tcancelled",
***************
*** 634,639 ****
--- 656,662 ----
  #endif /* !USG */
  		   argv[1], tm->tm_mon+1, tm->tm_mday, tm->tm_year, tm->tm_hour,
  		   tm->tm_min);
+ #endif /* CHIST */
  		savehist(bfr);
  		return -1;
  	}
***************
*** 657,663 ****
  #endif /* ORGDISTRIB */
  		STRCMP(header.distribution, "local") == 0))
  		su = 1;
! 	while (*p) {
  		q = index(p, ' ');
  		if (q)
  			*q = '\0';
--- 680,686 ----
  #endif /* ORGDISTRIB */
  		STRCMP(header.distribution, "local") == 0))
  		su = 1;
! 	while (q && *p) {
  		q = index(p, ' ');
  		if (q)
  			*q = '\0';
***************
*** 769,774 ****
--- 792,798 ----
  char **argv;
  {
  	int rc;
+ 	FILE *actfopen();
  
  	(void) setuid(geteuid());
  	/* dont change the cat %s| to < %s, it breaks some "unix" systems */
***************
*** 778,784 ****
--- 802,814 ----
  #else /* !NOTIFY */
  		NEWSUSR);
  #endif /* !NOTIFY */
+ #ifdef apollo
+ 	fclose(actfp);
+ #endif
  	rc = system(bfr);
+ #ifdef apollo
+ 	actfp = actfopen(ACTIVE);
+ #endif
  	log("system(%s) status %d", bfr, rc);
  	return 0;
  }
***************
*** 865,870 ****
--- 895,903 ----
  		(void) close(hisside);
  		(void) setgid(gid);
  		(void) setuid(uid);
+ #ifdef apollo
+ 		execl("/news/lib/recmail", "recmail", sendto, (char *)NULL);
+ #endif
  #ifdef SENDMAIL
  		execl(SENDMAIL, "sendmail", "-oi", "-oeq", sendto, (char *)NULL);
  #endif /* SENDMAIL */
Only in .: control.c.bak
Only in .: control.o
Only in .: dbm.c
Only in .: dbm.h
Only in .: dbm.o
diff -cb ../src.dist/defs.dist ./defs.dist
No differences encountered
Only in .: defs.h
Only in .: defs.h.bak
Only in .: digest.o
Only in .: dpat.out
Only in .: epathinit.o
Only in .: expire
Only in .: expire.c.11.12
Only in .: expire.o
Only in .: findart
Only in .: findart.c
Only in .: findart.c.bak
Only in .: follow
Only in .: follow.c
Only in .: follow.o
Only in .: fullname.o
diff -cb ../src.dist/funcs.c ./funcs.c
*** ../src.dist/funcs.c	Mon Nov 30 10:00:23 1987
--- ./funcs.c	Mon Nov 30 10:00:32 1987
***************
*** 198,204 ****
--- 198,206 ----
  	register FILE *fp;
  	char	*fname;
  	extern int errno;
+ 	int ntries = 20;
  
+ again:
  	if ((fp = fopen(name, fmode)) == NULL) {
  #ifdef IHCC
  		/*
***************
*** 209,214 ****
--- 211,222 ----
  #else
  		fname = name;
  #endif
+ #ifdef apollo
+ 		if (errno == ETXTBSY && ntries-- > 0) {
+ 			sleep(2);
+ 			goto again;
+ 		}
+ #endif apollo
  		xerror("Cannot open %s (%s): %s", fname, fmode, errmsg(errno));
  	}
  	/* kludge for setuid not being honored for root */
Only in .: funcs.o
diff -cb ../src.dist/funcs2.c ./funcs2.c
*** ../src.dist/funcs2.c	Fri Nov  6 16:33:42 1987
--- ./funcs2.c	Thu Dec 10 15:53:25 1987
***************
*** 310,316 ****
  	*q++ = *p++; *q++ = *p++; *q++ = ' ';
  
  	p = &ud[11];		/* 01:03:52 */
! 	for (i = 8; i > 0; i--)
  		*q++ = *p++;
  
  	*q++ = ' ';
--- 310,316 ----
  	*q++ = *p++; *q++ = *p++; *q++ = ' ';
  
  	p = &ud[11];		/* 01:03:52 */
! 	for (i = 5; i > 0; i--)
  		*q++ = *p++;
  
  	*q++ = ' ';
***************
*** 343,348 ****
--- 343,349 ----
  		ptr = hptr->replyto;
  #endif	/* !INTERNET */
  	(void) strcpy(tbuf, ptr);
+ #ifndef apollo
  	ptr = index(tbuf, '(');
  	if (ptr) {
  		while (ptr[-1] == ' ')
***************
*** 349,354 ****
--- 350,356 ----
  			ptr--;
  		*ptr = 0;
  	}
+ #endif
  #ifndef SERVER
  #ifdef	SunIII
  	if (ptr = rindex(tbuf, '.')) {
***************
*** 556,561 ****
--- 558,566 ----
  	lhs.dptr = oidbuf;
  	lhs.dsize = strlen(lhs.dptr) + 1;
  	rhs = fetch(lhs);
+ #ifdef apollo
+ 	closedbm();
+ #endif
  	if (rhs.dptr == NULL)
  		return NULL;
  	hfp = xfopen(ARTFILE, "r");
***************
*** 576,584 ****
  			*(lbuf + strlen(lbuf) - 1) = 0;	/* zap the \n */
  			return lbuf;
  		}
- #ifdef DBM
- 		break;
- #endif /* DBM */
  	}
  	(void) fclose(hfp);
  	return NULL;
--- 581,586 ----
***************
*** 654,662 ****
--- 656,685 ----
  /*
  ** Avoid problems of multiple dbminit calls.
  */
+ #ifdef apollo
  initdbm(name)
  char *name;
  {
+ 	extern int pagf, dirf;
+ 
+ 	if (pagf <= 0)
+ 		dbminit(name);
+ }
+ 
+ closedbm()
+ {
+ 	extern int pagf, dirf;
+ 
+ 	if (pagf > 0)
+ 		close(pagf);
+ 	if (dirf > 0)
+ 		close(dirf);
+ 	pagf = dirf = -1;
+ }
+ #else
+ initdbm(name)
+ char *name;
+ {
  	static int called = 0;
  
  	if (called != 0)
***************
*** 664,669 ****
--- 687,693 ----
  	called = 1;
  	(void) dbminit(name);
  }
+ #endif
  # endif /* DBM */
  #endif	/* !SERVER */
  
Only in .: funcs2.c.bak
Only in .: funcs2.o
Only in .: genvers
Only in .: genvers.c
Only in .: getcia
Only in .: getcia.c
Only in .: getcia.o
Only in .: getdate.o
diff -cb ../src.dist/getdate.y ./getdate.y
*** ../src.dist/getdate.y	Fri Oct  9 15:06:08 1987
--- ./getdate.y	Thu Nov 12 08:44:01 1987
***************
*** 337,342 ****
--- 337,343 ----
  
  	{"gmt", ZONE, 0 HRS},
  	{"g.m.t.", ZONE, 0 HRS},
+ 	{"utc", ZONE, 0 HRS},
  	{"bst", DAYZONE, 0 HRS},		/* British Summer Time */
  	{"b.s.t.", DAYZONE, 0 HRS},
  	{"eet", ZONE, 0 HRS},		/* European Eastern Time */
Only in .: getdate.y.bak
Only in .: gieb
Only in .: hdup
Only in .: hdup.c
Only in .: hdup.c.bak
Only in .: hdup.o
diff -cb ../src.dist/header.c ./header.c
*** ../src.dist/header.c	Fri Oct  9 15:13:24 1987
--- ./header.c	Fri Oct  9 15:37:21 1987
***************
*** 26,32 ****
  
  char *hfgets();
  
! char *news_version = NEWS_VERSION;
  
  /*
   * Read header from file fp into *hp.  If wholething is FALSE,
--- 26,32 ----
  
  char *hfgets();
  
! /* char *news_version = NEWS_VERSION; */
  
  /*
   * Read header from file fp into *hp.  If wholething is FALSE,
***************
*** 261,267 ****
  					(void) nstrip(hp->unrec[unreccnt]);
  					unreccnt++;
  				} else
! 					xerror("frmread: out of memory");
  			}
  			break;
  		}
--- 261,267 ----
  					(void) nstrip(hp->unrec[unreccnt]);
  					unreccnt++;
  				} else
! 					logerr("frmread out of memory (%d)", strlen(bfr) + 1);
  			}
  			break;
  		}
Only in .: header.c.08.12
Only in .: header.h.08.12
Only in .: header.o
diff -cb ../src.dist/help ./help
*** ../src.dist/help	Mon Feb  9 10:48:22 1987
--- ./help	Mon Dec 22 13:47:23 1986
***************
*** 1,18 ****
  Command		Meaning
  
  y		Yes.  (Or just hit return.)  Prints this article and goes on.
  n		No.  Goes on to next article without printing current one.
! d		Digest.  Breaks a digest article up into seperate articles.
  q		Quit.  Update .newsrc if -l or -x not used.
  U		Unsubscribe.  You won't be shown this newsgroup anymore.
  c		Cancel an article you posted.
  r		Reply.  Reply to article's author via mail.
  f [title]	Submit a follow up article.
  N [newsgroup]	Go to next newsgroup or named newsgroup.
  s [file]	Save.  Article is appended to file (default is "Articles").
  s |program	Run program with article as standard input.
  e		Erase.  Forget that an article was read.
! h		Print verbose header.  Use H for extremely verbose header.
  !		Shell escape.
  <number>	Go to message #<number> in this newsgroup.
  -		Go back to last article.
--- 1,21 ----
+ 
  Command		Meaning
  
  y		Yes.  (Or just hit return.)  Prints this article and goes on.
  n		No.  Goes on to next article without printing current one.
! d		Digest.  Breaks a digest article up into separate articles.
  q		Quit.  Update .newsrc if -l or -x not used.
  U		Unsubscribe.  You won't be shown this newsgroup anymore.
  c		Cancel an article you posted.
  r		Reply.  Reply to article's author via mail.
  f [title]	Submit a follow up article.
+ P [newsgroup]	Go to previous newsgroup or named newsgroup.
  N [newsgroup]	Go to next newsgroup or named newsgroup.
  s [file]	Save.  Article is appended to file (default is "Articles").
  s |program	Run program with article as standard input.
  e		Erase.  Forget that an article was read.
! h		Print verbose header.
! H		Print extremely verbose header.
  !		Shell escape.
  <number>	Go to message #<number> in this newsgroup.
  -		Go back to last article.
***************
*** 20,25 ****
  K		Mark the rest of the articles in current group as read.
  x		Exit.  Don't update .newsrc.
  v		Version.  Print current news version number.
  l		List unread articles in newsgroup.
  L		List all articles in newsgroup.
! c, f, r, e, h, and s can be followed by -'s to refer to the previous article
--- 23,37 ----
  K		Mark the rest of the articles in current group as read.
  x		Exit.  Don't update .newsrc.
  v		Version.  Print current news version number.
+ D		Decrypt an encrypted joke.
+ #		Display current article number and newsgroup name.
  l		List unread articles in newsgroup.
  L		List all articles in newsgroup.
! X		Transmit article.  For wizards only.
! ?		Help.  Prints this message.
! 
! c, f, r, e, h, and s can be followed by -'s to refer to the previous article.
! 
! You can enter a number to print that article number in the current newsgroup.
! 
! For more information, please read the file /usr/lib/news/doc/howto.
Only in .: iextern.o
diff -cb ../src.dist/ifuncs.c ./ifuncs.c
*** ../src.dist/ifuncs.c	Thu Dec 10 14:34:36 1987
--- ./ifuncs.c	Mon Dec 21 17:31:52 1987
***************
*** 229,235 ****
  	contin:;
  	}
  	if (nsent)
! 		log(sentbuf);
  	s_close();
  }
  
--- 229,235 ----
  	contin:;
  	}
  	if (nsent)
! 		log("%s", sentbuf);
  	s_close();
  }
  
***************
*** 643,648 ****
--- 643,651 ----
  	rhs.dptr = (char *)&fpos;
  	rhs.dsize = sizeof fpos;
  	store(lhs, rhs);
+ #ifdef apollo
+ 	closedbm();
+ #endif
  	}
  #endif /* DBM */
  	idunlock();
***************
*** 701,706 ****
--- 704,711 ----
  	}
  }
  
+ #ifndef apollo
+ 
  #define LOCKSIZE	128
  char lockname[LOCKSIZE];
  
***************
*** 791,796 ****
--- 796,802 ----
  	unlock();
  	(void) sprintf(hp->ident, "<%ld@%s>", seqn, LOCALSYSNAME);
  }
+ #endif apollo
  
  /*
   * Check that header.nbuf contains only valid newsgroup names;
***************
*** 1267,1272 ****
--- 1273,1288 ----
  			continue;	/* look for the #! rnews */
  		} else if (strncmp(cmd, "#! rnews ", 9) == 0 ||
  			strncmp(cmd, "! rnews ", 8) == 0) {
+ #ifdef apollo
+ 			if (fileno(infp) != 0) {
+ 				dup2(fileno(infp), 0);
+ 				close(fileno(infp));
+ 			}
+ 			lseek(0, 0L, 0);
+ 			fclose(actfp);
+ 			execl("/usr/lib/uucp/bin/unbatch", "unbatch", NULL);
+ 			exit(1);
+ #else
  			/* instead of execing unbatch do it ourselves */
  			register int fd, rc, wc;
  			int piped[2];
***************
*** 1387,1395 ****
--- 1403,1414 ----
  				(void) unlink(tfilename);
  			} while (fgets(cmd, BUFLEN, infp) != NULL);
  			exit(0);/* all done */
+ #endif
  
  		} else {
+ #ifndef apollo
  			docmd(cmd);
+ #endif
  			xxit(0);
  		}
  	}			/* while a batch */
***************
*** 1514,1520 ****
  {
  	(void) unlink(INFILE);
  	(void) unlink(ARTICLE);
! 	while (lockcount > 0)
  		unlock();
  	idunlock();
  	exit(status);
--- 1533,1539 ----
  {
  	(void) unlink(INFILE);
  	(void) unlink(ARTICLE);
! 	lockcount = 1;
  	unlock();
  	idunlock();
  	exit(status);
***************
*** 1546,1551 ****
--- 1565,1571 ----
  
  int	lockcount = 0;			/* no. of times we've called lock */
  
+ #ifndef apollo
  #ifdef	VMS
  
  #define	SUBLOCK	"/tmp/netnews.lck.1"
***************
*** 1639,1644 ****
--- 1659,1665 ----
  }
  #endif /* !BSD4_2 */
  #endif /* !VMS */
+ #endif /* apollo */
  
  #ifdef NFSCLIENT
  #define PROC 0004
Only in .: ifuncs.c.bak
Only in ../src.dist: ifuncs.c.orig
diff -cb ../src.dist/inews.c ./inews.c
*** ../src.dist/inews.c	Mon Nov 30 10:00:38 1987
--- ./inews.c	Mon Mar 28 10:27:57 1988
***************
*** 125,130 ****
--- 125,133 ----
  	struct group	*gp;	/* struct for group lookup		*/
  	register int	i;
  	FILE	*mfd;		/* mail file file-descriptor		*/
+ #ifdef apollo
+ 	FILE *actfopen();
+ #endif
  
  	/* uuxqt doesn't close all its files */
  	for (i = 3; !close(i); i++)
***************
*** 137,142 ****
--- 140,148 ----
  	ptr = rindex(*argv, '/');
  	if (!ptr)
  		ptr = *argv - 1;
+ #ifdef apollo
+ 	actfp = actfopen(ACTIVE);
+ #else
  	actfp = xfopen(ACTIVE, "r+");
  #ifndef NFSCLIENT
  #ifdef	LOCKF
***************
*** 193,198 ****
--- 199,205 ----
  		/* NOT REACHED */
  	}
  #endif /* !NFSCLIENT */
+ #endif apollo
  
  	if (!STRNCMP(ptr+1, "rnews", 5)) {
  #ifndef NFSCLIENT
***************
*** 226,231 ****
--- 233,239 ----
  	state = OPTION;
  	header.title[0] = header.nbuf[0] = filename[0] = '\0';
  
+ #ifndef apollo
  	/* check for existence of special files */
  #ifdef DBM
  	chkfile(ARTFILE);
***************
*** 233,238 ****
--- 241,247 ----
  	chkdir(ARTFILE);
  #endif /* DBM */
  	chkfile(ACTIVE);
+ #endif apollo
  	SigTrap = FALSE;	/* true if a signal has been caught */
  	if (mode != PROC) {
  		(void) signal(SIGHUP, onsig);
***************
*** 403,409 ****
--- 412,420 ----
  			(void) hread(&header, infp, FALSE);
  			/* there are certain fields we won't let him specify. */
  			if (header.from[0]) {
+ #ifndef apollo
  				(void) fixfrom(&header);
+ #endif
  				if (Sflag && !Mflag && !header.approved[0] &
  					!header.sender[0]) {
  					register char *p;
***************
*** 459,465 ****
--- 470,481 ----
  			strncpy(header.organization, MYORG, BUFLEN);
  			if (STRNCMP(header.organization, "Frobozz", 7) == 0)
  				header.organization[0] = '\0';
+ #ifdef apollo
+ 			/* On Apollo, ORGANIZATION isn't what you want */
+ 			if (ptr = getenv("NEWSORG"))
+ #else
  			if (ptr = getenv("ORGANIZATION"))
+ #endif
  				strncpy(header.organization, ptr, BUFLEN);
  			/*
  			 * Note that the organization can also be turned off by
***************
*** 548,555 ****
  	/* Determine input. */
  	if (mode != PROC)
  		input(FALSE);
! 	if (header.intnumlines == 0 && !is_ctl)
  		error("%s rejected: no text lines", header.ident);
  
  	dates(&header);
  
--- 564,577 ----
  	/* Determine input. */
  	if (mode != PROC)
  		input(FALSE);
! 	if (header.intnumlines == 0 && !is_ctl) {
! #ifdef apollo
! 		logerr("%s rejected: no text lines", header.ident);
! 		xxit(0);
! #else
  		error("%s rejected: no text lines", header.ident);
+ #endif
+ 	}
  
  	dates(&header);
  
***************
*** 558,563 ****
--- 580,586 ----
  	/* NOTREACHED */
  }
  
+ #ifndef apollo
  /* check for existence of file */
  static chkfile(f)
  char *f;
***************
*** 660,665 ****
--- 683,689 ----
  	return -1;
  }
  #endif /* DBM */
+ #endif
  
  #ifndef NFSCLIENT
  dospool(batchcmd, dolhwrite)
***************
*** 765,770 ****
--- 789,795 ----
  	}
  	printf("%s\n", bfr);
  	(void) fflush(stdout);
+ 	fclose(actfp);
  	(void) system(bfr);
  	exit(0);
  	/*NOTREACHED*/
***************
*** 838,843 ****
--- 863,876 ----
  		if (link(ARTICLE, bfr) == 0)
  			break;
  #endif /* !VMS */
+ #ifdef apollo
+ 		/* I hate this, but what else can I do? */
+ 		if (errno == ENOENT) {
+ 			force_unlock_dir(bfr);
+ 			if (link(ARTICLE, bfr) == 0)
+ 				break;
+ 		}
+ #endif apollo
  		e = errno;	/* keep log from clobbering it */
  		log("Cannot install article as %s: %s", bfr, errmsg(errno));
  		if (e != EEXIST) {
***************
*** 902,907 ****
--- 935,941 ----
  	int is_invalid = FALSE;
  	int exitcode = 0;
  	long now;
+ 	char expbuf[80];
  #ifdef DOXREFS
  	register char *nextref = header.xref;
  #endif /* DOXREFS */
***************
*** 916,931 ****
  	}
  
  	(void) time(&now);
! 	tm = gmtime(&now);
  	if (header.expdate[0])
  		addhist(" ");
! #ifdef USG
! 	sprintf(bfr,"%2.2d/%2.2d/%d %2.2d:%2.2d\t",
! #else /* !USG */
! 	sprintf(bfr,"%02d/%02d/%d %02d:%02d\t",
! #endif /* !USG */
! 		tm->tm_mon+1, tm->tm_mday, tm->tm_year,tm->tm_hour, tm->tm_min);
! 	addhist(bfr);
  	log("%s %s ng %s subj '%s' from %s", spool_news != DONT_SPOOL
  		? "queued" : (mode==PROC ? "received" : "posted"),
  		header.ident, header.nbuf, header.title, header.from);
--- 950,964 ----
  	}
  
  	(void) time(&now);
! #ifdef CHIST
! 	sprintf(expbuf, "%ld~%s\t", now, (header.expdate[0] ? header.expdate : "-"));
! 	addhist(expbuf);
! #else
  	if (header.expdate[0])
  		addhist(" ");
! 	addhist(arpadate(&now));
! 	addhist("\t");
! #endif
  	log("%s %s ng %s subj '%s' from %s", spool_news != DONT_SPOOL
  		? "queued" : (mode==PROC ? "received" : "posted"),
  		header.ident, header.nbuf, header.title, header.from);
***************
*** 952,957 ****
--- 985,991 ----
  	}
  #endif	/* ZAPNOTES */
  
+ #ifndef apollo
  	if (time((time_t *)0) > (cgtdate(header.subdate) + HISTEXP) ){
  		logerr("Article too old, moved to junk");
  		if (localize("junk"))
***************
*** 959,964 ****
--- 993,999 ----
  		exitcode = 1;
  		goto writeout;
  	}
+ #endif
  #endif /* !NFSCLIENT */
  
  	if (is_mod[0] != '\0' 	/* one of the groups is moderated */
***************
*** 1072,1087 ****
  #endif /* DOXREFS */
  
  writeout:
- 	/* Part 1 of kludge to get around article truncation problem */
- 	if ( (c=getc(infp)) != EOF) {
- 		ungetc(c, infp);
- 		if (c == ' ' || c == '\t') {
- 			header.intnumlines++;
- 			(void) sprintf(header.numlines, "%d",
- 				header.intnumlines);
- 		}
- 	}
- 	/* End of part 1 */
  	if (header.expdate[0] != '\0' && mode != PROC) {
  		/* Make sure it's fully qualified */
  		long t = cgtdate(header.expdate);
--- 1107,1112 ----
***************
*** 1089,1105 ****
  	}
  
  	lhwrite(&header, tfp);
- 	if ((c = getc(infp)) != EOF) {
- 		/* Part 2 of kludge to get around article truncation problem */
- 		if (c == ' ' || c == '\t' )
- 			putc('\n', tfp);
- 		/* End of part 2 */
- 		ungetc(c, infp);
  		while (fgets(bfr, BUFLEN, infp) != NULL)
  			fputs(bfr, tfp);
  		if (bfr[strlen(bfr)-1] != '\n')
  			putc('\n',tfp);
- 	}
  	if (ferror(tfp))
  		xerror("Write failed for temp file");
  	(void) fclose(tfp);
--- 1114,1123 ----
***************
*** 1129,1134 ****
--- 1147,1155 ----
  			av[1] = header.supersedes;
  			c_cancel(2, av);
  		}
+ #ifdef apollo
+ 		fclose(actfp);
+ #endif
  		broadcast(mode==PROC);
  #else /* NFSCLIENT */
  			int status;
***************
*** 1141,1148 ****
--- 1162,1173 ----
  		}
  #endif /* NFSCLIENT */
  	}
+ #ifdef apollo
+ 	xxit(0);
+ #else
  	xxit((mode == PROC && filename[0] == '\0') ? 0 :
  		(exitcode < 0 ? 0 : exitcode));
+ #endif
  }
  
  input(usegunk)
***************
*** 1205,1216 ****
--- 1230,1246 ----
  #endif /* !NFSCLIENT */
  		if (mode != PROC && tty && STRCMP(bfr, ".\n") == 0)
  			break;
+ #define islatin1(c)	((unsigned)(c)>=0xa0)
  		for (cp = bfr; c = toascii(*cp); cp++) {
+ 			if (islatin1(*cp))
+ 				putc(*cp, tmpfp);
+ 			else {
  				if (isprint(c) || isspace(c) || c == '\b')
  					putc(c, tmpfp);
  				if (c == '\n')
  					linecount++;
  			}
+ 		}
  		if (bfr[0] == '>')
  			linserted++;
  		if (bfr[0] == '<') /* kludge to allow diff's to be posted */
***************
*** 1219,1228 ****
--- 1249,1260 ----
  	}
  	if (*filename)
  		(void) fclose(infp);
+ #ifndef apollo
  	if (mode != PROC &&
  		linecount > LNCNT && linserted > (linecount-linserted))
  		error("Article rejected: %s included more text than new text",
  			username);
+ #endif
  
  	if (mode != PROC && !is_ctl && header.sender[0] == '\0' && !Sflag) {
  		int siglines = 0;
Only in .: inews.c.08.12
Only in .: inews.c.bak
Only in .: inews.o
diff -cb ../src.dist/install.sh ./install.sh
No differences encountered
Only in ../src.dist: installit
Only in .: ipathinit.o
Only in ../src.dist: localize.client
Only in ../src.dist: localize.nntp
Only in ../src.dist: localize.sh
Only in ../src.dist: localize.xenix
Only in .: locktest
Only in .: locktest.c
Only in .: locktest.o
diff -cb ../src.dist/makeactive.sh ./makeactive.sh
No differences encountered
Only in .: mkactive
Only in .: mkactive.c
Only in .: mkactive.c.bak
Only in .: mkactive.o
Only in .: mkhist
Only in .: mkhist.c
Only in .: mkhist.o
diff -cb ../src.dist/ndir.c ./ndir.c
No differences encountered
Only in .: ndir.o
Only in ../src.dist: nntp.c
Only in .: patch.apollo
diff -cb ../src.dist/patchlevel.h ./patchlevel.h
*** ../src.dist/patchlevel.h	Mon Nov 30 10:01:08 1987
--- ./patchlevel.h	Mon Nov 30 10:12:08 1987
***************
*** 1,3 ****
  #define	PATCHLEVEL	13
! 
! #define NEWS_VERSION   "B 2.11 11/19/87"
--- 1,4 ----
  #define	PATCHLEVEL	13
! /*#define NEWS_VERSION   "B 2.11 12/17/86"*/
! #define NEWS_VERSION	news_version
! extern char *news_version;	/* we define it in genvers.c */
diff -cb ../src.dist/pathinit.c ./pathinit.c
*** ../src.dist/pathinit.c	Mon Nov 30 10:00:55 1987
--- ./pathinit.c	Wed Jan  6 16:50:40 1988
***************
*** 129,135 ****
--- 129,142 ----
  	char buf[BUFLEN];
  	extern char *mydomain();
  #endif /* CHKN */
+ #ifdef apollo
+ 	extern char pm_$unix_env;
+ #endif
  
+ #ifdef apollo
+ 	/* Turn on the unix environment flag to get filename mapping.  */
+ 	pm_$unix_env = 0xff;
+ #endif
  #ifdef HOME
  	/* Relative to the home directory of user HOME */
  	(void) sprintf(bfr, "%s/%s", logdir(HOME), SPOOLDIR);
Only in .: pathinit.c.bak
diff -cb ../src.dist/postnews.c ./postnews.c
No differences encountered
diff -cb ../src.dist/process.c ./process.c
*** ../src.dist/process.c	Mon Nov 30 10:01:01 1987
--- ./process.c	Mon Nov 30 10:41:48 1987
***************
*** 38,44 ****
  's',   NGDELIM,	FALSE,	STRING,	ANY,		UNKNOWN,header.nbuf,
  'x',	'\0',	FALSE,	OPTION,	ANY,		UNKNOWN,(char *)NULL,
  'h',	'\0',	FALSE,	OPTION,	ANY,		UNKNOWN,(char *)NULL,
- 'A',	'\0',	FALSE,	OPTION, UNKNOWN,	UNKNOWN,(char *)NULL,
  #ifdef TMAIL
  'M',	'\0',	FALSE,	OPTION,	UNKNOWN,	MAIL,	(char *)NULL,
  #else /* !TMAIL */
--- 38,43 ----
Only in .: process.c.bak
Only in .: process.o
Only in .: readnews
diff -cb ../src.dist/readnews.c ./readnews.c
*** ../src.dist/readnews.c	Wed Oct 21 17:12:14 1987
--- ./readnews.c	Wed Oct 21 17:31:00 1987
***************
*** 93,99 ****
  	}
  
  	if (!(MAILER = getenv("MAILER")))
! 		MAILER = "mail";	/* was /bin/mail */
  
  #ifdef PAGE
  	if (myrc = getenv("PAGER"))
--- 93,99 ----
  	}
  
  	if (!(MAILER = getenv("MAILER")))
! 		MAILER = "/news/lib/recmail";
  
  #ifdef PAGE
  	if (myrc = getenv("PAGER"))
***************
*** 319,325 ****
  writeoutrc()
  {
  	FILE *wrcfp;
! 	char aline[BUFLEN];
  	register int i;
  
  	/* NEVER write it out if xflag */
--- 319,325 ----
  writeoutrc()
  {
  	FILE *wrcfp;
! 	char aline[BUFLEN], rcbak[80];
  	register int i;
  
  	/* NEVER write it out if xflag */
***************
*** 344,349 ****
--- 344,354 ----
  
  #ifdef VMS
  	(void) vmsdelete(newsrc);
+ #endif
+ #ifdef apollo
+ 	/* Guard against ring failures wiping out newsrc */
+ 	sprintf(rcbak, "%s.bak", newsrc);
+ 	rename(newsrc, rcbak);
  #endif
  	if (rename(aline, newsrc) < 0)
  		xerror("Cannot rename %s to %s", aline, newsrc);
Only in .: readnews.o
diff -cb ../src.dist/readr.c ./readr.c
*** ../src.dist/readr.c	Fri Nov  6 16:34:10 1987
--- ./readr.c	Mon Nov  9 17:11:45 1987
***************
*** 579,590 ****
  			tfilename = ofilename1;
  		else
  			tfilename = filename;
! #ifdef SERVER
! 		(void) sprintf(bfr,"%s/%s %s/%s/%ld", BIN, "postnews", 
! 				SPOOL,groupdir,bit);
! #else	/* !SERVER */
  		(void) sprintf(bfr,"%s/%s %s", BIN, "postnews", tfilename);
! #endif	/* !SERVER */
  		(void) system(bfr);
  		break;
  
--- 579,589 ----
  			tfilename = ofilename1;
  		else
  			tfilename = filename;
! #ifdef apollo
! 		sprintf(bfr, "%s/%s %s", BIN, "follow", tfilename);
! #else
  		(void) sprintf(bfr,"%s/%s %s", BIN, "postnews", tfilename);
! #endif
  		(void) system(bfr);
  		break;
  
***************
*** 814,820 ****
--- 813,823 ----
  		}
  		fprintf(ofp,"Sending reply.\n");
  		(void) fflush(stdout);
+ #ifdef apollo
+ 		if (fork() == 0) {
+ #else
  		if (vfork() == 0) {
+ #endif
  			(void) system(rcbuf);
  			(void) unlink(tf);
  			_exit(0);
***************
*** 1068,1073 ****
--- 1071,1097 ----
  #endif	/* DEBUG */
  	/* Decide if we want to show this article. */
   	if (bit <= 0 || (fp = art_open(filename, "r")) == NULL) {
+ #ifdef apollo
+ 		/* Make sure we can still get at the spool directory */
+ 		struct stat stbuf;
+ 
+ 		if (stat(SPOOL, &stbuf) < 0) {
+ 			if (pflag || lflag || eflag)
+ 				/* Not interactive; error exit */
+ 				xerror("Can't get at spool directory");
+ 			fprintf(stderr, "Net failure has made news temporarily unavailable.\n");
+ 			fprintf(stderr, "Do you want to quit (q) or try again (<RET>)? ");
+ 			gets(bfr);
+ 			if (*bfr == 'q') {
+ 				updaterc();
+ 				writeoutrc();
+ 				xxit(0);
+ 			} else if (*bfr == 'x') {
+ 				xxit(0);
+ 			} else
+ 				goto nextart2;
+ 		}
+ #endif
  		/* don't show the header if the article was specifically
  		 * requested and it isn't there
  		 */
Only in .: readr.o
diff -cb ../src.dist/recmail.c ./recmail.c
No differences encountered
diff -cb ../src.dist/recnews.c ./recnews.c
No differences encountered
Only in .: rextern.o
diff -cb ../src.dist/rfuncs.c ./rfuncs.c
*** ../src.dist/rfuncs.c	Fri Nov  6 16:34:20 1987
--- ./rfuncs.c	Mon Nov  9 17:12:01 1987
***************
*** 632,641 ****
  	/* make a new sorted copy of ACTIVE */
  	nfp = fopen(mktemp(newactivename), "w");
  	(void) chmod(newactivename, 0600);
! 	if (nfp == NULL) {
! 		perror(newactivename);
! 		return;
! 	}
  
  	/* look up all the lines in ACTIVE, finding their positions in .newsrc */
  	p = ACTIVE;
--- 632,639 ----
  	/* make a new sorted copy of ACTIVE */
  	nfp = fopen(mktemp(newactivename), "w");
  	(void) chmod(newactivename, 0600);
! 	if (nfp == NULL)
! 		xerror("Can't create %s", newactivename);
  
  	/* look up all the lines in ACTIVE, finding their positions in .newsrc */
  	p = ACTIVE;
Only in .: rfuncs.o
diff -cb ../src.dist/rfuncs2.c ./rfuncs2.c
*** ../src.dist/rfuncs2.c	Thu Mar 26 12:08:54 1987
--- ./rfuncs2.c	Thu Mar 26 13:31:03 1987
***************
*** 189,194 ****
--- 189,195 ----
  		(void) sprintf(buf1, "%s/%ld", bfr, bit);
  		(void) sprintf(buf2, "%-20s %s", buf1, hp->title);
  		fprintf(ofp, "%.76s\n", buf2);
+ 		fflush(ofp);
  		return;
  	}
  
Only in .: rfuncs2.o
Only in .: rmgroup
Only in .: rnews
Only in .: rpathinit.o
Only in .: sendbatch
diff -cb ../src.dist/sendbatch.sh ./sendbatch.sh
No differences encountered
Only in .: setuser
Only in .: setuser.c
Only in .: setuser.c.bak
Only in .: sorthist
Only in .: sorthist.c
Only in .: sorthist.c.bak
Only in .: src
Only in .: t.c
diff -cb ../src.dist/uname.c ./uname.c
*** ../src.dist/uname.c	Mon Nov 30 10:01:06 1987
--- ./uname.c	Wed Jan  6 14:42:33 1988
***************
*** 75,80 ****
--- 75,89 ----
  #define DONE
  #endif /* UUNAME */
  
+ #ifdef apollo
+ uname(uptr)
+ struct utsname *uptr;
+ {
+ 	strcpy(uptr->nodename, "apollo");
+ }
+ #define DONE
+ #endif
+ 
  #ifndef DONE
  #define	HDRFILE "/usr/include/whoami.h"
  
Only in .: uname.c.bak
Only in .: uname.o
diff -cb ../src.dist/unbatch.c ./unbatch.c
No differences encountered
Only in .: vers.c
Only in .: vers.o
diff -cb ../src.dist/visual.c ./visual.c
No differences encountered
Only in .: x
Only in .: x2
