Unofficial patch to XBBS 7.91

Christian Seyb root at gold.UUCP
Tue May 1 21:21:06 AEST 1990


I have made several changes to Sany Zelkowitz's recent posting
of XBBS Version 7.91

I hope Sandy reads this news group. I wanted to mail this directly
to him, but mails between Europe and the US are not very reliable.

It is now possible to specify how the contents of an archive
is displayed in an external file. It is no longer necessary to
modify the XBBS source to add the support for a new compression
method. A sample 'extens.bbs' file comes with this patch.

*** Please read the file 'changes' before you apply the patch ***

Enjoy and have fun

Christian

---- Cut Here and unpack ----
#!/bin/sh
# This is a shell archive (shar 3.21)
# made 05/01/1990 11:15 UTC by root at gold
# Source directory /usr2/bbssrc
#
# existing files WILL be overwritten
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#   3174 -rw-r--r-- changes
#    869 -rw-r--r-- extens.bbs
#  17569 -rw-r--r-- xbbs.p01u
#
if touch 2>&1 | fgrep '[-amc]' > /dev/null
 then TOUCH=touch
 else TOUCH=true
fi
# ============= changes ==============
echo "x - extracting changes (Text)"
sed 's/^X//' << 'SHAR_EOF' > changes &&
XI recently installed XBBS Version 7.91, after it got posted to
Xalt.sources. I was previously running an earlier Version of XBBS
Xand had made several changes to it. I applied these changes also
Xto Version 7.91 of XBBS.
X
XThe changes do work for me on my ISC 2.0.2 system. I compiled the
Xwhole system with gcc 1.37.1.
X
XI hope that Sandy will incorporate some (or all?) of the changes to
Xnext versions of XBBS. I also would like to see patches to newer
Xversions being posted to alt.sources.
X
XMany thanks to Sandy for providing this nice piece of software!
X
XThe following is a description of what the changes are:
X
Xbbsc1.c
X-------
X
X1. Changed names of variables TAR, ZCAT and ARC to MAILER, MAILADR
X   and EXTENS. The old names are no longer necessary, due to the
X   new method of displaying the contents of an archive.
X
X2. Casted some signal definitions with (int) to stop my compiler from
X   complaining all the time.
X
X3. Rewrote the file_c routine completely. This routine now uses an external
X   file to determine how to display the contents of an archive. It is now
X   possible to support a new compression method without recompiling XBBS.
X   To make downloads easy with DOS machines I use the extension .taz instead
X   of .tar.Z. Zcat doesn't like to decompress files not ending with .Z. The
X   new extens.bbs file allows those kind of things to be handled very
X   easily, e.g. cat | uncompress | tar -tvf -
X
X   A sample extens.bbs is provided with this patch.
X
X4. Files uploaded to the SYSOP only are now stored in a temp directory
X   named 'temp'. Don't forget to create the directory 'ORGPATH/temp'.
X
X5. Added code to savemsg() to send all messages to my normal Unix mail
X   address. I find it easier to read messages with elm. Still needs work
X   - specify which mail to get, etc.
X
X   I am currently working on a daemon to feed replies made with a Unix
X   mailer back to XBBS.
X
X6. Changed the usenet stuff to better suit my environment. I use a changed
X   version of vnews (has a -R flag for read only), to allow all users to
X   read usenet news on my system. I don't allow XBBS users to post news.
X
X   The usenet part - in my opinion - still needs lots of work. I would like
X   to allow some users to read and post (with their real name), etc, etc...
X
Xbbsc2.c
X-------
X
X1. The daily log files now go into the subdirectory 'daylogs'. Don't
X   forget to create the directory 'ORGPATH/daylogs'
X
Xbbscconf.c
X----------
X
X1. I had to take out the opendir and closedir defines and had to remove
X   the readdir stuff. After I had done this, the code worked on ISC Unix.
X
X2. Replaced lines 236+237 (the ones with ORGPATH and lastcall.bbs) with
X   a single line using LASTCALL (I didn't find any other place to use
X   this variable :-))
X
Xbbscport.c
X----------
X
X1. The input buffers are now flushed before XBBS waits for user input.
X   I find this useful for noisy telephone lines.
X
Xbbsc12.h
X--------
X
X1. Had to add a line: char *get_ext();
X
Xbbscdef.h
X---------
X
X1. It is currently not used, but I added an #ifdef SYSV to have
X   BBSMAIL defined to /usr/mail/bbsuser in SYSV.
X
X2. Had to change the names of TAR, ZCAT and ARC to MAILER, MAILADR
X   and EXTENS.
X
X
XHave fun
X
XChristian
SHAR_EOF
$TOUCH -am 0501111590 changes &&
chmod 0644 changes ||
echo "restore of changes failed"
set `wc -c changes`;Wc_c=$1
if test "$Wc_c" != "3174"; then
	echo original size 3174, current size $Wc_c
fi
# ============= extens.bbs ==============
echo "x - extracting extens.bbs (Text)"
sed 's/^X//' << 'SHAR_EOF' > extens.bbs &&
X# Allows to assign a program for every extension you would like
X# to support for your system with the C)ontents * option
X#
X# A * in col 1 indicates a continuation line. The output of the
X# previous line will be piped into the continuation command.
X#
X# A # in col 1 indicates a comment line. The total line will be
X# ignored.
X#
X# Extensions start at column 1 and Commands start at column 11.
X#
X# Extens. Command
X.arc      /usr/local/bin/arc -v
X.ARC      /usr/local/bin/arc -v
X.tar      /usr/bin/tar -tvf
X.tar.Z    /bin/cat
X*         /usr/local/bin/uncompress
X*         /usr/bin/tar -tvf -
X.taz      /bin/cat
X*         /usr/local/bin/uncompress
X*         /usr/bin/tar -tvf -
X.zip      /usr/local/bin/unzip -v
X.ZIP      /usr/local/bin/unzip -v
X.zoo      /usr/local/bin/zoo v
X.ZOO      /usr/local/bin/zoo v
X.lzh      /usr/local/bin/lharc v
X.LZH      /usr/local/bin/lharc v
SHAR_EOF
$TOUCH -am 0501093590 extens.bbs &&
chmod 0644 extens.bbs ||
echo "restore of extens.bbs failed"
set `wc -c extens.bbs`;Wc_c=$1
if test "$Wc_c" != "869"; then
	echo original size 869, current size $Wc_c
fi
# ============= xbbs.p01u ==============
echo "x - extracting xbbs.p01u (Text)"
sed 's/^X//' << 'SHAR_EOF' > xbbs.p01u &&
X*** /u/news/xbbs/bbsc1.c	Wed Mar 21 23:28:02 1990
X--- bbsc1.c	Sun Apr 29 23:17:19 1990
X***************
X*** 185,199 ****
X  		error_config();
X  	strip(buf128);
X  	MAXKBYTE = atoi(buf128);
X! 	if ((fgets(TAR, 49, inbuf) == NULL))
X  		error_config();
X! 	strip(TAR);
X! 	if ((fgets(ZCAT, 49, inbuf) == NULL))
X  		error_config();
X! 	strip(ZCAT);
X! 	if ((fgets(ARC, 49, inbuf) == NULL))
X  		error_config();
X! 	strip(ARC);
X  	if ((fgets(ZIP, 49, inbuf) == NULL))
X  		error_config();
X  	strip(ZIP);
X--- 185,199 ----
X  		error_config();
X  	strip(buf128);
X  	MAXKBYTE = atoi(buf128);
X! 	if ((fgets(MAILER, 49, inbuf) == NULL))
X  		error_config();
X! 	strip(MAILER);
X! 	if ((fgets(MAILADR, 49, inbuf) == NULL))
X  		error_config();
X! 	strip(MAILADR);
X! 	if ((fgets(EXTENS, 49, inbuf) == NULL))
X  		error_config();
X! 	strip(EXTENS);
X  	if ((fgets(ZIP, 49, inbuf) == NULL))
X  		error_config();
X  	strip(ZIP);
X***************
X*** 544,560 ****
X  	which_timer = 1;
X  	alarm(sec);
X  
X! 	if (signal(SIGALRM, timer) == (int (*) ()) -1)
X  		exit(1);
X! 	if (signal(SIGUSR1, mon_toggle) == (int (*) ()) -1)
X  		exit(1);
X! 	if (signal(SIGUSR2, sys_toggle) == (int (*) ()) -1)
X! 		exit(1);
X! 	if (signal(SIGPIPE, chat) == (int (*) ()) -1)
X! 		exit(1);
X! 	if (signal(SIGINT, STOP) == (int (*) ()) -1)
X  		exit(1);
X! 	if (signal(SIGHUP, hanged) == (int (*) ()) -1)
X  		exit(1);
X  
X  
X--- 544,560 ----
X  	which_timer = 1;
X  	alarm(sec);
X  
X! 	if ((int) signal(SIGALRM, timer) == (int (*) ()) -1)
X  		exit(1);
X! 	if ((int) signal(SIGUSR1, mon_toggle) == (int (*) ()) -1)
X  		exit(1);
X! 	if ((int) signal(SIGUSR2, sys_toggle) == (int (*) ()) -1)
X! 		exit(1);
X! 	if ((int) signal(SIGPIPE, chat) == (int (*) ()) -1)
X! 		exit(1);
X! 	if ((int) signal(SIGINT, STOP) == (int (*) ()) -1)
X  		exit(1);
X! 	if ((int) signal(SIGHUP, hanged) == (int (*) ()) -1)
X  		exit(1);
X  
X  
X***************
X*** 1565,1576 ****
X  		goto ffile;
X  	}
X  }
X  file_c()
X  {
X! 	int             result, zcat;
X! 	char           *ptr, temp[16];
X! 	zcat = 0;
X! 	portsout("\n\r\n\rArchive Contents Listing Option for .tar(.Z), .zip  or .arc files\n\r\n\r");
X  	portsout("Input archive file name to list ====> ");
X  	portsin(x_filename, 15);
X  	portsout(CRLF);
X--- 1565,1578 ----
X  		goto ffile;
X  	}
X  }
X+ 
X  file_c()
X  {
X! 	FILE	*fpt;
X! 	char	cmd_line[1024];
X! 	int	ext_flag, result;
X! 
X! 	portsout("\n\r\n\rList the Contents of an Archive\n\r\n\r");
X  	portsout("Input archive file name to list ====> ");
X  	portsin(x_filename, 15);
X  	portsout(CRLF);
X***************
X*** 1578,1668 ****
X  		return;
X  	strcpy(x_pathandfile, f_pathname);
X  	strcat(x_pathandfile, x_filename);
X! 	ptr = strrchr(x_pathandfile, '.');
X! 	if (ptr == NULL) {
X! 		portsout("\n\rImproper file extension\n\r");
X  		return;
X  	}
X! 	*ptr++;
X! 	strcpy(temp, ptr);
X! 	if (strcmp(temp, "Z") == 0) {
X! 		zcat = 1;
X! 		strcpy(buf128, x_pathandfile);
X! 		ptr = strrchr(buf128, '.');
X! 		if (ptr == NULL) {
X! 			portsout("\n\rImproper file extension\n\r");
X! 			return;
X! 		}
X! 		*ptr = '\0';
X! 		ptr = strrchr(buf128, '.');
X! 		if (ptr == NULL) {
X! 			portsout("\n\rImproper file extension\n\r");
X! 			return;
X! 		}
X! 		*ptr++;
X! 		strcpy(temp, ptr);
X! 	}
X! 	if ((strcmp(temp, "arc") == 0) || (strcmp(temp, "ARC") == 0) || (strcmp(temp, "tar") == 0) || (strcmp(temp,"zip") == 0) || (strcmp(temp,"ZIP") ==0)) {
X! 		result = stat(x_pathandfile, &statbuf);
X! 		if (result != 0) {
X! 			portsout("\n\r\n\rThe requested file was not found!\n\r\n\r");
X! 			return;
X! 		}
X! 		if ((strcmp(temp, "arc") == 0 || strcmp(temp, "ARC") == 0)) {
X! 			strcpy(buf128, ARC);
X! 			strcat(buf128, x_pathandfile);
X! 			strcat(buf128, " > ");
X! 			strcat(buf128, TMPFILE);
X! 			strcat(buf128, port_id);
X! 			(void) system(buf128);
X! 			portsout("\n\r\n\r");
X! 			strcpy(buf128, TMPFILE);
X! 			strcat(buf128, port_id);
X! 			cmd_p(buf128);
X! 			portsout("\n\r\n\r");
X! 			return;
X! 		}
X! 		if ((strcmp(temp, "zip") == 0 || strcmp(temp, "ZIP") == 0)) {
X! 			strcpy(buf128, ZIP);
X! 			strcat(buf128, x_pathandfile);
X! 			strcat(buf128, " > ");
X! 			strcat(buf128, TMPFILE);
X! 			strcat(buf128, port_id);
X! 			(void) system(buf128);
X! 			portsout("\n\r\n\r");
X! 			strcpy(buf128, TMPFILE);
X! 			strcat(buf128, port_id);
X! 			cmd_p(buf128);
X! 			portsout("\n\r\n\r");
X! 			return;
X! 		}
X! 		if (strcmp(temp, "tar") == 0) {
X! 			if (!zcat) {
X! 				strcpy(buf128, TAR);
X! 				strcat(buf128, x_pathandfile);
X! 			} else {
X! 				strcpy(buf128, ZCAT);
X! 				strcat(buf128, x_pathandfile);
X! 				strcat(buf128, " | ");
X! 				strcat(buf128, TAR);
X! 				strcat(buf128, "-");
X  			}
X  
X! 			strcat(buf128, " > ");
X! 			strcat(buf128, TMPFILE);
X! 			strcat(buf128, port_id);
X! 			portsout("\n\rOne moment please ....");
X! 			(void) system(buf128);
X! 			portsout("\n\r\n\r");
X! 			strcpy(buf128, TMPFILE);
X! 			strcat(buf128, port_id);
X! 			cmd_p(buf128);
X! 			portsout("\n\r\n\r");
X! 			return;
X  		}
X  	}
X! 	portsout("\n\r\n\rIllegal file extension!\n\r\n\r");
X  }
X  file_r()
X  {
X  	int             result;
X--- 1580,1687 ----
X  		return;
X  	strcpy(x_pathandfile, f_pathname);
X  	strcat(x_pathandfile, x_filename);
X! 
X! 	result=stat(x_pathandfile, &statbuf);
X! 	if(result != 0) {
X! 		portsout("\n\r\n\rThe requested file was not found!\n\r\n\r");
X  		return;
X  	}
X! 
X! 	strcpy(buf128, EXTENS);
X! 	if((fpt=fopen(buf128, "r")) == NULL) {
X! 		portsout("\n\r\n\rDescription File for Extensions missing: Notify Sysop\n\r\n\r");
X! 		return;
X! 	}
X! 
X! 	ext_flag=0;
X! 	while(1) {
X! 		if((fgets(buf128,80,fpt)==NULL)) {
X! 		   if(ext_flag==0) {
X! 			portsout("\n\r\n\rNot an Archive or Extension currently not supported\n\r\n\r");
X! 			portsout("If you have the C-Source of a Programm supporting this Archive\n\r");
X! 			portsout("under Unix - please upload it\n\r\n\r");
X! 			return;
X! 		   }
X! 		   else break;
X! 		}
X! 
X! 		if(buf128[0] == '#') /* Comment Line */
X! 			continue;
X! 
X! 		if(buf128[0] == '*') /* Continuation Line */
X! 			if(!ext_flag)
X! 				continue;
X! 			else {
X! 				strcat(cmd_line, " | ");
X! 				strcat(cmd_line, get_ext(&buf128[10],'\n'));
X! 				continue;
X  			}
X  
X! 		if(check_ext(buf128) == 0) { /* Line with Extension */
X! 			strcpy(cmd_line, get_ext(&buf128[10],'\n'));
X! 			strcat(cmd_line, " ");
X! 			strcat(cmd_line, x_pathandfile);
X! 			ext_flag=1;
X! 		} else {
X! 			if(ext_flag)
X! 				break;
X! 			else
X! 				continue;
X  		}
X  	}
X! 	fclose(fpt);
X! 	strcat(cmd_line, " > ");
X! 	strcat(cmd_line, TMPFILE);
X! 	strcat(cmd_line, port_id);
X! 	portsout("\n\rOne moment please ....");
X! 	(void) system(cmd_line);
X! 	portsout("\n\r\n\r");
X! 	strcpy(buf128, TMPFILE);
X! 	strcat(buf128, port_id);
X! 	cmd_p(buf128);
X! 	portsout("\n\r\n\r");
X! 	return;
X! }
X! 
X! check_ext(str)
X! char	*str;
X! {
X! 	int	i1, i2;
X! 	char	s2[80];
X! 
X! 	strcpy(s2,get_ext(str,' '));
X! 	i1=strlen(x_pathandfile);
X! 	i2=strlen(s2);
X! 
X! 	if(i1<=i2)
X! 		return (1);
X! 	if(strcmp(&x_pathandfile[i1-i2], s2) == 0) {
X! 		return(0);
X! 	}
X! 	return (1);
X! }
X! 
X! char *get_ext(str,delim)  /* Parameters: string and the ending delimiter */
X! char	*str, delim;
X! {
X! 	char	s2[80];
X! 	int	i;
X! 
X! 	i=0;
X! 	while(*str != '\0') {
X! 		s2[i]=*str;
X! 		if(*str == delim) {
X! 			s2[i]='\0';
X! 			return (s2);
X! 		}
X! 		str++;
X! 		i++;
X! 	}
X! 	s2[i]='\0';
X! 	return (s2);
X  }
X+ 
X+ 
X  file_r()
X  {
X  	int             result;
X***************
X*** 2504,2509 ****
X--- 2523,2529 ----
X  		}
X  		strcat(x_pathandfile, x_filename);
X  		strcpy(buf128, ORGPATH);
X+ 		strcat(buf128, "temp/");
X  		strcat(buf128, x_filename);
X  		code = link(x_pathandfile, buf128);
X  		if( code == -1) {
X***************
X*** 3265,3274 ****
X  
X  savemsg()
X  {				/* save a message */
X! 	int             fd;
X  
X  	portsout("Saving...\r\n");
X- 
X  	strcpy(msg_delete, pubpriv);	/* delete byte */
X  	strcpy(msg_date, mm);
X  	strcat(msg_date, "/");
X--- 3285,3295 ----
X  
X  savemsg()
X  {				/* save a message */
X! 	FILE		*fdm;
X! 	int             fd, no_uucp;
X! 	char		mail_file[128], m_date[128];
X  
X  	portsout("Saving...\r\n");
X  	strcpy(msg_delete, pubpriv);	/* delete byte */
X  	strcpy(msg_date, mm);
X  	strcat(msg_date, "/");
X***************
X*** 3306,3311 ****
X--- 3327,3357 ----
X  
X  	strcpy(h_date, msg_date);
X  	hdrwrt();		/* update the header file */
X+ 
X+ 	/* Write msg to another system via uucp */
X+ 
X+ 	strcpy(mail_file, "/tmp/mail_XXXXXX");
X+ 	mktemp(mail_file);
X+ 	if(!(fdm = fopen(mail_file, "w"))) {
X+ 		portsout(CRLF);
X+ 		portsout("Mail tempfile has problems writing");
X+ 		portsout(CRLF);
X+ 	}
X+ 	strcpy(m_date, msg_date);
X+ 	strcat(m_date, "  ");
X+ 	strcat(m_date, msg_time);
X+ 	fprintf(fdm, "XBBX_Date: %s\n", m_date);
X+ 	fprintf(fdm, "XBBS_From: %s\n", msg_from);
X+ 	fprintf(fdm, "XBBS_To: %s\n", msg_to);
X+ 	fprintf(fdm, "XBBS_Subject: %s\n\n", msg_subject);
X+ 	fprintf(fdm, "%s\n", msg_text);
X+ 	fclose(fdm);
X+ 	strcpy(m_date, MAILER);
X+ 	strcat(m_date, MAILADR);
X+ 	strcat(m_date, " <");
X+ 	strcat(m_date, mail_file);
X+ 	system(m_date);
X+ 	unlink(mail_file);
X  }
X  /* end of function               */
X  
X***************
X*** 3397,3413 ****
X  	char           *logname();
X  
X  	static char     shell[] = "SHELL=/bin/sh";
X! 	static char     home[150];
X! 	static char     logn[50];
X  	char            cmd[512];
X  	char            news[520];
X  	char            tmp[512];
X  	FILE           *newsf;
X! 	int             mask;
X  	char            term;
X  
X- 	strcpy(home, "HOME=");
X- 	strcpy(logn,"LOGNAME=");
X  	strcat(home, ORGPATH);
X  	strcat(home, "usenet/");
X  	strcat(home, u_fname);
X--- 3443,3457 ----
X  	char           *logname();
X  
X  	static char     shell[] = "SHELL=/bin/sh";
X! 	static char     home[150] = "HOME=";
X! 	static char     logn[50] = "LOGNAME=";
X  	char            cmd[512];
X  	char            news[520];
X  	char            tmp[512];
X  	FILE           *newsf;
X! 	int             mask, mode_dumb;
X  	char            term;
X  
X  	strcat(home, ORGPATH);
X  	strcat(home, "usenet/");
X  	strcat(home, u_fname);
X***************
X*** 3434,3452 ****
X  		umask(mask);
X  	}
X  menu:
X  	portsout("\n\rWhich type of terminal do you have:\n\r");
X  	portsout("1) Ansi Standard Monitor\n\r");
X! 	portsout("2) ANSI.SYS for MS-DOS\n\r");
X! 	portsout("3) VT100\n\r");
X! 	portsout("4) Macintosh MacTerm in VT-100 mode\n\r");
X! 	portsout("5) VT52 Terminal\n\r");
X! 	portsout("6) Televideo 925\n\r");
X! 	portsout("7) Televideo 910\n\r");
X! 	portsout("8) Tandy DT-100\n\r");
X! 	portsout("9) Dumb  - Use this when nothing else works correctly.\n\r");
X! 	portsout("           Instead of the normal \"- MORE -\" inbetween pages\n\r");
X! 	portsout("           You will see nothing, BUT you will hear a beep.\n\r");
X! 	portsout("           This is the same thing. \"?\" is for help\n\r");
X  	portsout("\n\rQ) Return to main menu\n\r");
X  	portsout("===> ");
X  	term = portin();
X--- 3478,3488 ----
X  		umask(mask);
X  	}
X  menu:
X+ 	mode_dumb=0;
X  	portsout("\n\rWhich type of terminal do you have:\n\r");
X  	portsout("1) Ansi Standard Monitor\n\r");
X! 	portsout("2) VT100\n\r");
X! 	portsout("3) Wyse 60\n\r");
X  	portsout("\n\rQ) Return to main menu\n\r");
X  	portsout("===> ");
X  	term = portin();
X***************
X*** 3456,3483 ****
X  		putenv("TERM=ansi");
X  		break;
X  	case ('2'):
X- 		putenv("TERM=dosansi");
X- 		break;
X- 	case ('3'):
X  		putenv("TERM=vt100");
X  		break;
X! 	case ('4'):
X! 		putenv("TERM=macterm");
X! 		break;
X! 	case ('5'):
X! 		putenv("TERM=vt52so");
X! 		break;
X! 	case ('6'):
X! 		putenv("TERM=tvi925co");
X! 		break;
X! 	case ('7'):
X! 		putenv("TERM=tvi910");
X! 		break;
X! 	case ('8'):
X! 		putenv("TERM=dt100");
X! 		break;
X! 	case ('9'):
X! 		putenv("TERM=dumb");
X  		break;
X  	case ('Q'):
X  	case ('q'):
X--- 3492,3501 ----
X  		putenv("TERM=ansi");
X  		break;
X  	case ('2'):
X  		putenv("TERM=vt100");
X  		break;
X! 	case ('3'):
X! 		putenv("TERM=wyse60");
X  		break;
X  	case ('Q'):
X  	case ('q'):
X***************
X*** 3493,3537 ****
X  	putenv(shell);
X  	putenv(home);
X  	putenv(logn);
X! choose:
X! 	portsout("\n\rDo you wish to:\n\r");
X! 	portsout("1) Readnews\n\r");
X! 	portsout("2) Postnews\n\r");
X! 	portsout("\n\rQ) Return to main menu\n\r");
X! 	portsout("===>");
X! 	term = portin();
X! 	portsout("\n\r");
X! 	switch (term) {
X! 	case ('1'):
X! 		restoremodes();
X! 		portrst();
X! 		STDerr = freopen("/dev/tty", "w+", stderr);
X! 		sprintf(cmd, "%s -n all",READN);
X! 		system(cmd);
X! 		break;
X! 	case ('2'):
X! 		restoremodes();
X! 		portrst();
X! 		STDerr = freopen("/dev/tty", "w+", stderr);
X! 		sprintf(cmd, "%s",POSTN);
X! 		system(cmd);
X! 		break;
X! 	case ('Q'):
X! 	case ('q'):
X! 		portsout("\n\r");
X! 		strcpy(home, "HOME=");
X! 		strcpy(logn, "LOGNAME=");
X! 		cmd[0] = '\0';
X! 		news[0] = '\0';
X! 		tmp[0] = '\0';
X! 		return (0);
X! 		break;
X! 	default:
X! 		portsout("Please try again\n\r");
X! 		goto choose;
X! 		break;
X! 	}
X! 
X  	strcpy(home, "HOME=");
X  	strcpy(logn, "LOGNAME=");
X  	cmd[0] = '\0';
X--- 3511,3521 ----
X  	putenv(shell);
X  	putenv(home);
X  	putenv(logn);
X! 	restoremodes();
X! 	portrst();
X! 	STDerr = freopen("/dev/tty", "w+", stderr);
X! 	sprintf(cmd, READN);
X! 	system(cmd);
X  	strcpy(home, "HOME=");
X  	strcpy(logn, "LOGNAME=");
X  	cmd[0] = '\0';
X***************
X*** 3550,3555 ****
X--- 3534,3540 ----
X  	signal(SIGPIPE, chat);
X  
X  }
X+ 
X  restoresig()
X  {
X  	signal(SIGALRM, timer);
X*** /u/news/xbbs/bbsc2.c	Mon Jul  3 14:28:08 1989
X--- bbsc2.c	Sun Apr 29 17:35:17 1990
X***************
X*** 1248,1253 ****
X--- 1248,1254 ----
X  	char            foo;
X  	int             result;
X  	strcpy(buf128, ORGPATH);
X+ 	strcat(buf128, "daylogs/");
X  	strcat(buf128, mnd);
X  	if ((inbuf = fopen(buf128, "r+")) == NULL) {
X  		portsout(CRLF);
X***************
X*** 1418,1423 ****
X--- 1419,1425 ----
X  {
X  	char            firstz[20], lastz[20], dsize[20];
X  	strcpy(buf128, ORGPATH);
X+ 	strcat(buf128, "daylogs/");
X  	strcat(buf128, mnd);
X  	if ((inbuf = fopen(buf128, "r")) == NULL) {
X  		fclose(inbuf);
X*** /u/news/xbbs/bbscconf.c	Thu Mar 15 23:26:42 1990
X--- bbscconf.c	Sun Apr 29 17:32:52 1990
X***************
X*** 19,43 ****
X  struct stat     thisstat;
X  char           *getlogin();
X  
X- #ifdef SYSV
X- #define	opendir(path) fopen (path, "r")
X- #define closedir(dirp) fclose (dirp)
X- struct dirent  *
X- readdir(dirp)
X-     DIR            *dirp;
X- {
X-     static struct dirent entry;
X-     if (dirp == NULL)
X- 	return (NULL);
X-     for (;;) {
X- 	if (fread(&entry, sizeof(struct dirent), 1, dirp) == 0)
X- 	    return (NULL);
X- 	if (entry.d_ino)
X- 	    return (&entry);
X-     }
X- }
X- #endif
X- 
X  conf()
X  {
X      int             mypid, loginpid, uid;
X--- 19,24 ----
X***************
X*** 233,240 ****
X  	    fclose(infile);
X  	    j = kill(i, 0);	/* see if it is a good pid */
X  	    if (!j) {
X! 		strcpy(buf128, ORGPATH);
X! 		strcat(buf128, "lastcall.bbs");
X  		ptr1 = who_am_i + 3;
X  		ptr2 = who_am_I;
X  		for (i = 3; i < 5; i++)
X--- 214,220 ----
X  	    fclose(infile);
X  	    j = kill(i, 0);	/* see if it is a good pid */
X  	    if (!j) {
X! 		strcpy(buf128, LASTCALL);
X  		ptr1 = who_am_i + 3;
X  		ptr2 = who_am_I;
X  		for (i = 3; i < 5; i++)
X*** /u/news/xbbs/bbscport.c	Mon Jul  3 14:28:26 1989
X--- bbscport.c	Sun Apr 29 22:03:14 1990
X***************
X*** 6,11 ****
X--- 6,12 ----
X  #include "bbscdef.h"
X  #include <string.h>
X  #include <ctype.h>
X+ #include <termio.h>
X  #include <sys/types.h>
X  #include <sys/locking.h>
X  extern int no_cntrl_k;
X***************
X*** 77,82 ****
X--- 78,84 ----
X  	int cnt, byte ; char bytex ;
X  	cnt = 0;
X  	byte = FALSE;
X+ 	ioctl(0, TCFLSH, 0); /* Flush input */
X  	while (++cnt <= max && byte != '\r')
X  		{
X  		while((byte = (int)portin()) < ' ' || byte > '}')
X***************
X*** 106,111 ****
X--- 108,114 ----
X  	int cnt, byte ; char bytex ;
X  	cnt = 0;
X  	byte = FALSE;
X+ 	ioctl(0, TCFLSH, 0); /* Flush input */
X  	while (++cnt <= max && byte != '\r')
X  		{
X  		while((byte = (int)portin()) < ' ' || byte > '}')
X***************
X*** 138,143 ****
X--- 141,147 ----
X  	cnt = 0;
X  	new_max = max;
X  	byte = FALSE;
X+ 	ioctl(0, TCFLSH, 0); /* Flush input */
X  	while (++cnt <= new_max && byte != '\r')
X  		{
X  		while((byte = (int)portin()) < ' ' || byte > '}')
X***************
X*** 180,185 ****
X--- 184,190 ----
X  	char *result;
X  	cnt = 0;
X  	byte = FALSE;
X+ 	ioctl(0, TCFLSH, 0); /* Flush input */
X  	while (++cnt <= max && byte != '\r')
X  		{
X  		while((byte = (int)portin()) < ' ' || byte > '}')
X*** /u/news/xbbs/bbsc12.h	Wed Mar 21 23:28:10 1990
X--- bbsc12.h	Sun Apr 29 15:17:30 1990
X***************
X*** 20,25 ****
X--- 20,26 ----
X  #define VERSION " 7.91 "
X  #define CONFIG ".config.bbs"
X  char           *ttyname();
X+ char           *get_ext();
X  char           *tty;
X  char           *this_ttyname;
X  static unsigned Xsec, Sec;
X*** /u/news/xbbs/bbscdef.h	Wed Mar 21 23:27:54 1990
X--- bbscdef.h	Sun Apr 29 21:53:36 1990
X***************
X*** 48,54 ****
X--- 48,60 ----
X  #define MESSAGES  "messages.bbs"        /* file name */
X  #define HEADER    "header.bbs"
X  #define MSGLOG    "messages.log"
X+ 
X+ #ifdef SYSV
X+ #define BBSMAIL   "/usr/mail/bbsuser"
X+ #else
X  #define BBSMAIL   "/usr/spool/mail/bbsuser"             /* group mail */
X+ #endif
X+ 
X  #define CROSSREF  "crossref.bbs"
X  #define FILES     "files.bbs"
X  #define TMPFILE   "/tmp/files"
X***************
X*** 56,64 ****
X  #define STDERR    "/tmp/error_out"
X  #define SYSTTY    "/tmp/ttydev"
X  char FOO[10];
X! char TAR[50];
X! char ZCAT[50];
X! char ARC[50];
X  char ZIP[50];
X  char MONITOR[30];               /* Monitor device */
X  char CONSOLE[30];               /* The main console */
X--- 62,70 ----
X  #define STDERR    "/tmp/error_out"
X  #define SYSTTY    "/tmp/ttydev"
X  char FOO[10];
X! char MAILER[50];
X! char MAILADR[50];
X! char EXTENS[50];
X  char ZIP[50];
X  char MONITOR[30];               /* Monitor device */
X  char CONSOLE[30];               /* The main console */
SHAR_EOF
$TOUCH -am 0430191890 xbbs.p01u &&
chmod 0644 xbbs.p01u ||
echo "restore of xbbs.p01u failed"
set `wc -c xbbs.p01u`;Wc_c=$1
if test "$Wc_c" != "17569"; then
	echo original size 17569, current size $Wc_c
fi
exit 0
-- 
Christian Seyb      |  Internet: cs at gold.stgt.sub.org       uucp login: nuucp 
Vogesenweg 4        |  Mailbox:  +49-711-776494   24h           300-19200 HST
7024 Filderstadt 4  |            +49-711-775126   0100-0600 CET 300-19200 PEP
-- Unix - 20 years of research made it stabl nn: Bus error -- Core dumped



More information about the Alt.sources mailing list