*** xc32/Makefile	Sat Feb 26 16:58:43 1994
--- xc32.linux/Makefile	Fri Feb 25 23:38:51 1994
***************
*** 35,41 ****
  SHELL = /bin/sh
  
  # to enable debugging output
! DEBUG = -DDEBUG
  
  # to disallow shell escapes
  # NOSHELL = -DNOSHELL
--- 35,41 ----
  SHELL = /bin/sh
  
  # to enable debugging output
! # DEBUG = -DDEBUG
  
  # to disallow shell escapes
  # NOSHELL = -DNOSHELL
***************
*** 54,60 ****
  # By tsq for SunOS 4.1.2 with Japanese Support
  # CFLAGS	= -O $(DEBUG) $(NOSHELL)
  # By Cypher for NEWS-OS 4.1
! CFLAGS	= -O -DNEWS $(DEBUG) $(NOSHELL)
  
  # For SCO Xenix
  # LDFLAGS = -ltermcap 
--- 54,62 ----
  # By tsq for SunOS 4.1.2 with Japanese Support
  # CFLAGS	= -O $(DEBUG) $(NOSHELL)
  # By Cypher for NEWS-OS 4.1
! # CFLAGS	= -O -DNEWS $(DEBUG) $(NOSHELL)
! # by Peter for Linux Japanese
! CFLAGS	= -O -DLINUX $(DEBUG) $(NOSHELL)
  
  # For SCO Xenix
  # LDFLAGS = -ltermcap 
***************
*** 66,78 ****
  LDFLAGS = -ltermcap
  
  # choose a nice home for XC
! INSDIR		=/pub/jpr/bin
  OWNER		=uucp
  GROUP		=uucp
  BINMODE		=4711
  MANDIR		=/usr/man/man
  CATMANDIR	=/usr/man/cat
! MANEXT		=.L
  MANOWN		=bin
  MANGRP		=bin
  MANMODE		=0444
--- 68,80 ----
  LDFLAGS = -ltermcap
  
  # choose a nice home for XC
! INSDIR		=/usr/local/bin
  OWNER		=uucp
  GROUP		=uucp
  BINMODE		=4711
  MANDIR		=/usr/man/man
  CATMANDIR	=/usr/man/cat
! # MANEXT		=.L
  MANOWN		=bin
  MANGRP		=bin
  MANMODE		=0444
*** xc32/xcport.c	Sat Feb 26 16:58:38 1994
--- xc32.linux/xcport.c	Sat Feb 26 15:12:02 1994
***************
*** 16,23 ****
  extern int errno;
  #endif
  
! /*# define LOCKDIR "/usr/spool/uucp"*/	/* system-dependent */
! # define LOCKDIR "/usr/spool/locks"	/* system-dependent */
  
  #ifdef DIDO
  # define DIDOPORT
--- 16,23 ----
  extern int errno;
  #endif
  
! # define LOCKDIR "/usr/spool/uucp"	/* system-dependent */
! /*# define LOCKDIR "/usr/spool/locks"*/	/* system-dependent */
  
  #ifdef DIDO
  # define DIDOPORT
***************
*** 50,59 ****
--- 50,79 ----
  short flowflag;				/* modem port i/o data mask */
  static int mfd = -1,		/* modem port file descriptor */
  		 pid;
+ #ifdef LINUX
+ static struct termios pmode;	/* modified for serial port flow control */
+ #else
  static struct termio pmode;	/* modem device control string */
+ #endif
  static char port[SM_BUFF],	/* modem port device file string */
  		lckname[SM_BUFF];	/* lockfile string */
  
+ #ifdef LINUX
+ /*	Serial port flow control.
+ 	Necessary for stabilizing B-Plus file transfer (sending to the host.)
+ */
+ void rtscts_flow(flow)
+ short flow;
+ {
+ 	if (flow)
+ 		pmode.c_cflag |= CRTSCTS;
+ 	else
+ 		pmode.c_cflag &= ~CRTSCTS;
+ 
+ 	ioctl(mfd, TCSETS, &pmode);
+ }
+ #endif /* LINUX */
+ 
  void xc_setflow(flow)
  short flow;
  {
***************
*** 63,69 ****
  	else
  		pmode.c_iflag &= ~(IXON | IXOFF | IXANY);
  
! 	ioctl(mfd, TCSETA, &pmode);
  }
  
  char *mport(s) /* get/set port string */
--- 83,89 ----
  	else
  		pmode.c_iflag &= ~(IXON | IXOFF | IXANY);
  
! 	ioctl(mfd, TCSETS, &pmode);
  }
  
  char *mport(s) /* get/set port string */
***************
*** 122,128 ****
  		pmode.c_cflag &= ~CBAUD;
  		pmode.c_cflag |= cbaud;
  
! 		ioctl(mfd, TCSETA, &pmode);
  	}
  
  	switch (pmode.c_cflag & CBAUD){
--- 142,148 ----
  		pmode.c_cflag &= ~CBAUD;
  		pmode.c_cflag |= cbaud;
  
! 		ioctl(mfd, TCSETS, &pmode);
  	}
  
  	switch (pmode.c_cflag & CBAUD){
***************
*** 160,172 ****
  #if DTR_DROPS_CARRIER
  	pmode.c_cflag &= ~CBAUD;
  	pmode.c_cflag |= B0;		/* set cbaud 0 (drop DTR) */
! 	ioctl(mfd, TCSETA, &pmode);
  
  	sleep(1);					/* wait a second */
  
  	pmode.c_cflag &= ~CBAUD;	/* reset bps */
  	pmode.c_cflag |= cbaud;
! 	ioctl(mfd, TCSETA, &pmode);
  #else /* use Hayes command */
  	sleep(2);					/* Allow for "escape guard time" */
  	send_string(ATTEN);			/* Send modem escape command */
--- 180,192 ----
  #if DTR_DROPS_CARRIER
  	pmode.c_cflag &= ~CBAUD;
  	pmode.c_cflag |= B0;		/* set cbaud 0 (drop DTR) */
! 	ioctl(mfd, TCSETS, &pmode);
  
  	sleep(1);					/* wait a second */
  
  	pmode.c_cflag &= ~CBAUD;	/* reset bps */
  	pmode.c_cflag |= cbaud;
! 	ioctl(mfd, TCSETS, &pmode);
  #else /* use Hayes command */
  	sleep(2);					/* Allow for "escape guard time" */
  	send_string(ATTEN);			/* Send modem escape command */
***************
*** 406,412 ****
  
  	pmode.c_cflag &= ~CLOCAL;
  	pmode.c_cflag |= B0 | HUPCL;
! 	ioctl(mfd, TCSETA, &pmode);
  	close(mfd);
  
  	setuid((int)geteuid());
--- 426,432 ----
  
  	pmode.c_cflag &= ~CLOCAL;
  	pmode.c_cflag |= B0 | HUPCL;
! 	ioctl(mfd, TCSETS, &pmode);
  	close(mfd);
  
  	setuid((int)geteuid());
***************
*** 504,510 ****
  		exit(5);
  	}
  
! 	ioctl(mfd, TCGETA, &pmode);
  
  	pmode.c_cflag &= ~(CBAUD | HUPCL);
  	pmode.c_cflag |= CLOCAL | cbaud;
--- 524,530 ----
  		exit(5);
  	}
  
! 	ioctl(mfd, TCGETS, &pmode);
  
  	pmode.c_cflag &= ~(CBAUD | HUPCL);
  	pmode.c_cflag |= CLOCAL | cbaud;
***************
*** 535,542 ****
  */
  purge2()
  {
  	struct	termio	tempterm;
! 
  	ioctl( mfd, TCFLSH,  TCIFLUSH );
  
  } 
--- 555,565 ----
  */
  purge2()
  {
+ #ifdef LINUX
+ 	struct	termios	tempterm;
+ #else
  	struct	termio	tempterm;
! #endif
  	ioctl( mfd, TCFLSH,  TCIFLUSH );
  
  } 
*** xc32/xckconv.c	Sat Feb 26 16:58:43 1994
--- xc32.linux/xckconv.c	Fri Feb 25 23:32:13 1994
***************
*** 1,8 ****
  /* xckconv.c */
  
- #define sjis2euc(c) (sjis2jis(c) | 0x8080)
- #define euc2sjis(c) (jis2sjis((c) & 0x7f7f))
- 
  unsigned short sjis2jis(c)
  unsigned short	c;
  {
--- 1,5 ----
*** xc32/xc.h	Sat Feb 26 16:58:43 1994
--- xc32.linux/xc.h	Sat Feb 26 16:01:13 1994
***************
*** 40,46 ****
  		3rd) in your HOME directory, if HOME is an environment variable,
  		4th) in LIBDIR.
  */
! #define LIBDIR "/pub/jpr/comm"	/* System wide storage of dot-files */
  
  /*	PHFILE
  	This is the default name given to the dialing directory.
--- 40,46 ----
  		3rd) in your HOME directory, if HOME is an environment variable,
  		4th) in LIBDIR.
  */
! #define LIBDIR "/etc/skel"	/* System wide storage of dot-files */
  
  /*	PHFILE
  	This is the default name given to the dialing directory.
***************
*** 173,181 ****
  extern void	cls(), cur_on(), cur_off(), do_script(), drawline(), exit(),
  			free(), getline(), getword(), isig(), lc_word(), msecs(),
  			purge(), send_mbyte(), send_string(), sendbyte(), show(),
! 			show_abort(), ttgoto(), xc_setflow();
  extern FILE *tfp,			/* the local terminal */
  			*openfile(), *QueryCreate();
  extern struct termio newmode, sigmode;
  
  #define HZ	60
--- 173,184 ----
  extern void	cls(), cur_on(), cur_off(), do_script(), drawline(), exit(),
  			free(), getline(), getword(), isig(), lc_word(), msecs(),
  			purge(), send_mbyte(), send_string(), sendbyte(), show(),
! 			show_abort(), ttgoto(), xc_setflow(), rtscts_flow();
  extern FILE *tfp,			/* the local terminal */
  			*openfile(), *QueryCreate();
  extern struct termio newmode, sigmode;
  
  #define HZ	60
+ 
+ #define sjis2euc(c) (sjis2jis(c) | 0x8080)
+ #define euc2sjis(c) (jis2sjis((c) & 0x7f7f))
*** xc32/xcscrpt.c	Fri Aug 23 13:16:15 1991
--- xc32.linux/xcscrpt.c	Fri Feb 25 23:32:13 1994
***************
*** 17,22 ****
--- 17,27 ----
  
  #define	MAX_LINE	128
  
+ #ifdef NULLS
+ #undef NULLS
+ #endif
+ #define NULLS ((unsigned char *)0)
+ 
  jmp_buf here;
  extern FILE *cfp;
  short ttyflag, debugflag, linkflag, scriptflag,
***************
*** 24,30 ****
  	mrbcount;			/* ring buffer counter */
  extern short eofflag;
  extern int	redial(), s_exit(), xmitbrk();
! char mringbuf[LG_BUFF];	/* ring buffer for modem input */
  static S_abort();
  static void unsetall(), S_bombout(), S_call();
  extern void divert(), set_onoff(), xcdial();
--- 29,35 ----
  	mrbcount;			/* ring buffer counter */
  extern short eofflag;
  extern int	redial(), s_exit(), xmitbrk();
! unsigned char mringbuf[LG_BUFF];	/* ring buffer for modem input */
  static S_abort();
  static void unsetall(), S_bombout(), S_call();
  extern void divert(), set_onoff(), xcdial();
***************
*** 40,46 ****
  }
  
  void do_script(file)
! char *file;
  {
  	void (*oldvec)();
  
--- 45,51 ----
  }
  
  void do_script(file)
! unsigned char *file;
  {
  	void (*oldvec)();
  
***************
*** 65,74 ****
  
  static k_seen(bytes,fword)
  long int bytes;
! char *fword;
  {
  	int i, j, k;
! 	char *cptr;
  
  	cptr = fword;
  
--- 70,79 ----
  
  static k_seen(bytes,fword)
  long int bytes;
! unsigned char *fword;
  {
  	int i, j, k;
! 	unsigned char *cptr;
  
  	cptr = fword;
  
***************
*** 98,108 ****
  
  k_waitfor(interval,fword)
  long interval;
! char *fword;
  {
  	register c, i = -1 ;
  	register long limit, waitfor_msec = 0;
! 	char *ptr = NULLS;
  	struct tms tbuf;
  
  	mrbstart = mrbcount = 0;
--- 103,113 ----
  
  k_waitfor(interval,fword)
  long interval;
! unsigned char *fword;
  {
  	register c, i = -1 ;
  	register long limit, waitfor_msec = 0;
! 	unsigned char *ptr = NULLS;
  	struct tms tbuf;
  
  	mrbstart = mrbcount = 0;
***************
*** 144,153 ****
  			mrbstart = mrbstart % LG_BUFF;
  		}
  
! 		if (ttyflag)
  			fputc(c,tfp);
  
! 		if (capture && c != '\r')
  			fputc(c,cfp);
  
  		if (tolower(c) != *ptr){
--- 149,158 ----
  			mrbstart = mrbstart % LG_BUFF;
  		}
  
! 		if (ttyflag && c != 0)
  			fputc(c,tfp);
  
! 		if (capture && c != '\r' && c != 0)
  			fputc(c,cfp);
  
  		if (tolower(c) != *ptr){
***************
*** 163,169 ****
  
  static k_transmit(junk,fword)
  long int junk;
! char *fword;
  {
  	sprintf(line,"\"%s\"",fword);
  	lptr = line;
--- 168,174 ----
  
  static k_transmit(junk,fword)
  long int junk;
! unsigned char *fword;
  {
  	sprintf(line,"\"%s\"",fword);
  	lptr = line;
***************
*** 178,184 ****
  
  static k_pause(pause_time,junk)
  long int pause_time;
! char *junk;
  {
  	pause_time = pause_time ? pause_time : 5;
  	sleep((unsigned)pause_time);
--- 183,189 ----
  
  static k_pause(pause_time,junk)
  long int pause_time;
! unsigned char *junk;
  {
  	pause_time = pause_time ? pause_time : 5;
  	sleep((unsigned)pause_time);
***************
*** 187,193 ****
  
  static k_dial(junk,fword)
  long int junk;
! char *fword;
  {
  	sprintf(line,"%s",fword);
  	lptr = line;
--- 192,198 ----
  
  static k_dial(junk,fword)
  long int junk;
! unsigned char *fword;
  {
  	sprintf(line,"%s",fword);
  	lptr = line;
***************
*** 202,208 ****
  
  static k_capture(junk,fword)
  long int junk;
! char *fword;
  {
  	int val = capture;
  
--- 207,213 ----
  
  static k_capture(junk,fword)
  long int junk;
! unsigned char *fword;
  {
  	int val = capture;
  
***************
*** 230,236 ****
  
  static k_debug(junk,fword)
  long int junk;
! char *fword;
  {
  	sprintf(word,"debug");
  	sprintf(line,"%s",fword);
--- 235,241 ----
  
  static k_debug(junk,fword)
  long int junk;
! unsigned char *fword;
  {
  	sprintf(word,"debug");
  	sprintf(line,"%s",fword);
***************
*** 241,247 ****
  
  static k_tty(junk,fword)
  long int junk;
! char *fword;
  {
  	sprintf(word,"tty");
  	sprintf(line,"%s",fword);
--- 246,252 ----
  
  static k_tty(junk,fword)
  long int junk;
! unsigned char *fword;
  {
  	sprintf(word,"tty");
  	sprintf(line,"%s",fword);
***************
*** 252,258 ****
  
  static k_type(junk,fword)
  long int junk;
! char *fword;
  {
  	sprintf(line,"%s",fword);
  	lptr = line;
--- 257,263 ----
  
  static k_type(junk,fword)
  long int junk;
! unsigned char *fword;
  {
  	sprintf(line,"%s",fword);
  	lptr = line;
***************
*** 284,294 ****
  
  /* Variable structure */
  typedef struct var {
! 	char name[VNAMELEN+1];	/* variable name */
  	struct var	*next;		/* ptr to next structure in var_list */
  	char type;				/* variable type */
  	union {					/* pointer to CHAR or NUM/DATE */
! 		char str[VMAXSIZE+1];
  		long num;
  	} u;
  } VAR;
--- 289,299 ----
  
  /* Variable structure */
  typedef struct var {
! 	unsigned char name[VNAMELEN+1];	/* variable name */
  	struct var	*next;		/* ptr to next structure in var_list */
  	char type;				/* variable type */
  	union {					/* pointer to CHAR or NUM/DATE */
! 		unsigned char str[VMAXSIZE+1];
  		long num;
  	} u;
  } VAR;
***************
*** 318,324 ****
  	Variable contents in vp->u.[str|num]
  */
  static VAR *findvar(name)
! char *name;
  {
  	static	VAR *vp;	/* pointer to output structure */
  
--- 323,329 ----
  	Variable contents in vp->u.[str|num]
  */
  static VAR *findvar(name)
! unsigned char *name;
  {
  	static	VAR *vp;	/* pointer to output structure */
  
***************
*** 336,342 ****
  	If variable doesn't exist, no error is returned
  */
  static void unsetvar(name)
! char *name;
  {
  	VAR *p;
  	VAR *lastp;
--- 341,347 ----
  	If variable doesn't exist, no error is returned
  */
  static void unsetvar(name)
! unsigned char *name;
  {
  	VAR *p;
  	VAR *lastp;
***************
*** 366,373 ****
  	Returns: FAILURE or SUCCESS
  */
  static setvar(name, val, type)
! char *name, *val;
! char type;
  {
  	VAR *vp;
  	short i;
--- 371,378 ----
  	Returns: FAILURE or SUCCESS
  */
  static setvar(name, val, type)
! unsigned char *name, *val;
! unsigned char type;
  {
  	VAR *vp;
  	short i;
***************
*** 426,432 ****
  
  /*	Action Primitives */
  static struct s_acts {
! 	char *name;
  	/*ACT_TYPE token;*/
  	int (*funcptr)();
  } s_acttab[] = {
--- 431,437 ----
  
  /*	Action Primitives */
  static struct s_acts {
! 	unsigned char *name;
  	/*ACT_TYPE token;*/
  	int (*funcptr)();
  } s_acttab[] = {
***************
*** 498,504 ****
  
  /*	token table */
  static struct s_token {
! 	char *name;
  	TOK_TYPE token;
  } s_toktab[] = {
  	{"NULLTOK",		NULLTOK},
--- 503,509 ----
  
  /*	token table */
  static struct s_token {
! 	unsigned char *name;
  	TOK_TYPE token;
  } s_toktab[] = {
  	{"NULLTOK",		NULLTOK},
***************
*** 558,564 ****
   */
  static union {
  	long numval;		/* numbers */
! 	char *strptr;		/* for literal strings (points to initial '"') */
  	int (*funcptr)();	/* vector for primitives */
  	VAR *varptr;		/* for variables */
  } tok_value;
--- 563,569 ----
   */
  static union {
  	long numval;		/* numbers */
! 	unsigned char *strptr;		/* for literal strings (points to initial '"') */
  	int (*funcptr)();	/* vector for primitives */
  	VAR *varptr;		/* for variables */
  } tok_value;
***************
*** 569,581 ****
  	called repeatedly by the language parser, S_parse().
  */
  static TOK_TYPE lexan(pcptr)
! char **pcptr;		/* address of script program counter */
  {
  	long nvalue, negpos = 1;
  	VAR *varptr;
  	FILE *bqpipe;
  	int i, c;				/* really a char, but 'int' to spot EOF */
! 	static char *cptr, *lasttok,
  				latoken[VNAMELEN+1], temp[VMAXSIZE+1], bqcmd[VMAXSIZE+1];
  	extern FILE *popen();
  
--- 574,586 ----
  	called repeatedly by the language parser, S_parse().
  */
  static TOK_TYPE lexan(pcptr)
! unsigned char **pcptr;		/* address of script program counter */
  {
  	long nvalue, negpos = 1;
  	VAR *varptr;
  	FILE *bqpipe;
  	int i, c;				/* really a char, but 'int' to spot EOF */
! 	static unsigned char *cptr, *lasttok,
  				latoken[VNAMELEN+1], temp[VMAXSIZE+1], bqcmd[VMAXSIZE+1];
  	extern FILE *popen();
  
***************
*** 797,803 ****
  */
  static S_affirm()
  {
! 	char c, junk;
  
  	c = fgetc(stdin);
  	fputc(c,tfp);
--- 802,808 ----
  */
  static S_affirm()
  {
! 	unsigned char c, junk;
  
  	c = fgetc(stdin);
  	fputc(c,tfp);
***************
*** 836,846 ****
  	shorter. Double-quote marks escaped with a backslash are included
  	in the returned string and the backslash is excised.
  */
! static char *S_qstrip(strptr)
! char *strptr;
  {
  	int i;
! 	static char strbuf[VMAXSIZE+2];
  
  	if (*strptr=='"')
  		++strptr;
--- 841,851 ----
  	shorter. Double-quote marks escaped with a backslash are included
  	in the returned string and the backslash is excised.
  */
! static unsigned char *S_qstrip(strptr)
! unsigned char *strptr;
  {
  	int i;
! 	static unsigned char strbuf[VMAXSIZE+2];
  
  	if (*strptr=='"')
  		++strptr;
***************
*** 860,870 ****
  	entry, the 'read' token has been parsed, but that's all.
  */
  static S_read(pcptr)
! char **pcptr;				/* S_parse()'s program counter (p_pc) */
  {
  	int i;
  	VAR *varptr1;
! 	static char strbuf[VMAXSIZE+2];
  
  	if (lexan(pcptr)!=VARNAME)
  		S_abort();
--- 865,875 ----
  	entry, the 'read' token has been parsed, but that's all.
  */
  static S_read(pcptr)
! unsigned char **pcptr;				/* S_parse()'s program counter (p_pc) */
  {
  	int i;
  	VAR *varptr1;
! 	static unsigned char strbuf[VMAXSIZE+2];
  
  	if (lexan(pcptr)!=VARNAME)
  		S_abort();
***************
*** 893,902 ****
  	token has been parsed.
  */
  static S_perform(pcptr)
! char **pcptr;
  {
  	int (*fptr)();
! 	char *cptr;
  	VAR *varptr1;
  	long n = -1;
  
--- 898,907 ----
  	token has been parsed.
  */
  static S_perform(pcptr)
! unsigned char **pcptr;
  {
  	int (*fptr)();
! 	unsigned char *cptr;
  	VAR *varptr1;
  	long n = -1;
  
***************
*** 939,949 ****
  	the directive containing it.
  */
  static S_set(pcptr)
! char **pcptr;				/* S_parse()'s program counter (p_pc) */
  {
  	TOK_TYPE nexttype;
  	VAR *varptr1, *varptr2;
! 	char *setstr;
  
  	if ((nexttype=lexan(pcptr))!=VARNAME)
  		S_abort();
--- 944,954 ----
  	the directive containing it.
  */
  static S_set(pcptr)
! unsigned char **pcptr;				/* S_parse()'s program counter (p_pc) */
  {
  	TOK_TYPE nexttype;
  	VAR *varptr1, *varptr2;
! 	unsigned char *setstr;
  
  	if ((nexttype=lexan(pcptr))!=VARNAME)
  		S_abort();
***************
*** 983,994 ****
  */
  static S_varcmp(varptr1,pcptr)
  VAR *varptr1;
! char **pcptr;					/* S_parse()'s program counter (p_pc) */
  {
  	TOK_TYPE compmode;
  	long testnum;
! 	static char strbuf[VMAXSIZE+1];
! 	char *cmpstr;
  	int status, numvar;
  	VAR *varptr2;
  
--- 988,999 ----
  */
  static S_varcmp(varptr1,pcptr)
  VAR *varptr1;
! unsigned char **pcptr;					/* S_parse()'s program counter (p_pc) */
  {
  	TOK_TYPE compmode;
  	long testnum;
! 	static unsigned char strbuf[VMAXSIZE+1];
! 	unsigned char *cmpstr;
  	int status, numvar;
  	VAR *varptr2;
  
***************
*** 1066,1076 ****
  		return(status<0);
  }
  
! static char *S_construct(pcptr)
! char **pcptr;
  {
! 	char *cptr;
! 	static char newstring[VMAXSIZE+10];
  	TOK_TYPE nexttype;
  
  	newstring[0] = '\0';
--- 1071,1081 ----
  		return(status<0);
  }
  
! static unsigned char *S_construct(pcptr)
! unsigned char **pcptr;
  {
! 	unsigned char *cptr;
! 	static unsigned char newstring[VMAXSIZE+10];
  	TOK_TYPE nexttype;
  
  	newstring[0] = '\0';
***************
*** 1119,1125 ****
  #define CMDNEST		8		/* max number of nested scripts */
  #define PARSNEST	50		/* max number of nested calls to parser */
  
! static char *areas[CMDNEST];
  
  #define DNP		--nest_parse
  #define BCCHK(x) if(x==SBREAK||x==SCONTNUE){DNP;return(nest_while?x:S_abort());}
--- 1124,1130 ----
  #define CMDNEST		8		/* max number of nested scripts */
  #define PARSNEST	50		/* max number of nested calls to parser */
  
! static unsigned char *areas[CMDNEST];
  
  #define DNP		--nest_parse
  #define BCCHK(x) if(x==SBREAK||x==SCONTNUE){DNP;return(nest_while?x:S_abort());}
***************
*** 1140,1150 ****
  }
  
  /*	S_parse() */
! static char *intercom;		/* last previous value of S_parse program ctr */
! static char *tvector;		/* trap vector */
  static FILE *savetfp;		/* to stash tfp when tfp redirected */
  static S_parse(p_pc, t_invoke)
! char *p_pc;
  TOK_TYPE t_invoke;
  {
  	long n;					/* "leading" number for primitives */
--- 1145,1155 ----
  }
  
  /*	S_parse() */
! static unsigned char *intercom;		/* last previous value of S_parse program ctr */
! static unsigned char *tvector;		/* trap vector */
  static FILE *savetfp;		/* to stash tfp when tfp redirected */
  static S_parse(p_pc, t_invoke)
! unsigned char *p_pc;
  TOK_TYPE t_invoke;
  {
  	long n;					/* "leading" number for primitives */
***************
*** 1156,1162 ****
  		w_status,			/* used to correct nest_parse in 'while' */
  		counter,			/* for WHILE and IF, to track keywords */
  		negating;			/* ! operator in effect for comparisons */
! 	char *cptr, *S_WHILE, *S_DO, *S_DONE;
  	TOK_TYPE nexttype;
  	VAR *varptr1;
  
--- 1161,1167 ----
  		w_status,			/* used to correct nest_parse in 'while' */
  		counter,			/* for WHILE and IF, to track keywords */
  		negating;			/* ! operator in effect for comparisons */
! 	unsigned char *cptr, *S_WHILE, *S_DO, *S_DONE;
  	TOK_TYPE nexttype;
  	VAR *varptr1;
  
***************
*** 1524,1534 ****
  
  /*	S_call() */
  static void S_call(scriptname)	/* load a script and call S_parse to run it */
! char *scriptname;
  {
  	int i, quiet=0;
  	jmp_buf senv;
! 	char *oldtvec, *newptr, *oldptr;
  	long int filesize;
  	FILE *scriptfp;
  	static struct stat statbuf;
--- 1529,1539 ----
  
  /*	S_call() */
  static void S_call(scriptname)	/* load a script and call S_parse to run it */
! unsigned char *scriptname;
  {
  	int i, quiet=0;
  	jmp_buf senv;
! 	unsigned char *oldtvec, *newptr, *oldptr;
  	long int filesize;
  	FILE *scriptfp;
  	static struct stat statbuf;
***************
*** 1552,1558 ****
  	filesize = statbuf.st_size;
  
  	areas[nest_cmd - 1] = NULLS;
! 	if ((areas[nest_cmd-1]=(char*)calloc((unsigned)filesize+10,1))==NULLS){
  		sprintf(Msg,"%s: allocation error",scriptname);
  		S2(Msg);
  		fclose(scriptfp);
--- 1557,1563 ----
  	filesize = statbuf.st_size;
  
  	areas[nest_cmd - 1] = NULLS;
! 	if ((areas[nest_cmd-1]=(unsigned char*)calloc((unsigned)filesize+10,1))==NULLS){
  		sprintf(Msg,"%s: allocation error",scriptname);
  		S2(Msg);
  		fclose(scriptfp);
***************
*** 1572,1579 ****
  
  	oldtvec = tvector;
  	tvector = NULLS;
! 	newptr = (char *)senv;
! 	oldptr = (char *)env;
  	for (i=0; i<sizeof(env); ++i)
  		*(newptr++) = *(oldptr++);
  	if ((i=setjmp(env))==0)
--- 1577,1584 ----
  
  	oldtvec = tvector;
  	tvector = NULLS;
! 	newptr = (unsigned char *)senv;
! 	oldptr = (unsigned char *)env;
  	for (i=0; i<sizeof(env); ++i)
  		*(newptr++) = *(oldptr++);
  	if ((i=setjmp(env))==0)
***************
*** 1586,1593 ****
  		S2("Script encountered 'exit'");
  
  	tvector = oldtvec;
! 	newptr = (char *)env;
! 	oldptr = (char *)senv;
  	for (i=0; i<sizeof(env); ++i)
  		*(newptr++) = *(oldptr++);
  	--nest_cmd;
--- 1591,1598 ----
  		S2("Script encountered 'exit'");
  
  	tvector = oldtvec;
! 	newptr = (unsigned char *)env;
! 	oldptr = (unsigned char *)senv;
  	for (i=0; i<sizeof(env); ++i)
  		*(newptr++) = *(oldptr++);
  	--nest_cmd;
***************
*** 1602,1608 ****
  /*	S_abort */
  static S_abort()
  {
! 	char *cptr;
  
  	if (*Msg)
  		S2(Msg);
--- 1607,1613 ----
  /*	S_abort */
  static S_abort()
  {
! 	unsigned char *cptr;
  
  	if (*Msg)
  		S2(Msg);
*** xc32/xcterm.c	Sat Feb 26 16:58:43 1994
--- xc32.linux/xcterm.c	Fri Feb 25 23:32:13 1994
***************
*** 261,267 ****
  						}
  						in_code_conv = 0;
  					}	
! 					else{ /* ASCII Char. */
  						fputc( c, tfp );
  						fflush( tfp );
  						if (capture && c != '\r'){
--- 261,267 ----
  						}
  						in_code_conv = 0;
  					}	
! 					else if (c > 0) { /* ASCII Char. */
  						fputc( c, tfp );
  						fflush( tfp );
  						if (capture && c != '\r'){
***************
*** 284,290 ****
  					in_code_conv = 0;
  				}
  			}			
! 			else{ /* Non Conversion mode */
  				fputc(c,tfp);
  				fflush( tfp );
  				in_code_conv = 0;
--- 284,290 ----
  					in_code_conv = 0;
  				}
  			}			
! 			else if (c > 0) { /* Non Conversion mode */
  				fputc(c,tfp);
  				fflush( tfp );
  				in_code_conv = 0;
*** xc32/xcmain.c	Sat Feb 26 16:58:43 1994
--- xc32.linux/xcmain.c	Mon Feb 28 18:25:58 1994
***************
*** 348,357 ****
--- 348,363 ----
  {
  	xc_setflow(FALSE);
  	isig(TRUE);
+ #ifdef LINUX
+ 	rtscts_flow(TRUE);
+ #endif
  
  	B_Transfer();
  	reterm = TRUE;
  
+ #ifdef LINUX
+ 	rtscts_flow(FALSE);
+ #endif
  	isig(FALSE);
  	xc_setflow(flowflag);
  }
