From:	SMTP%"wht@n4hgf.atl.ga.us" 20-FEB-1995 12:05:52.52
To:	USRC
CC:	
Subj:	v47i068: ecu - ECU Asynchronous Communications v3.30, Patch03b/4

Resent-Date: 18 Feb 1995 20:16:02 -0600
Path: decwrl!amd!amdahl.com!pacbell.com!well!nntp-ucb.barrnet.net!agate!howland.reston.ans.net!news.sprintlink.net!uunet!sparky!not-for-mail
From: wht@n4hgf.atl.ga.us (Warren Tucker)
Newsgroups: comp.sources.misc
Subject: v47i068: ecu - ECU Asynchronous Communications v3.30, Patch03b/4
Followup-To: comp.sources.d
Date: 18 Feb 1995 20:16:02 -0600
Organization: Sterling Software
Lines: 2148
Sender: kent@sparky.sterling.com
Approved: kent@sparky.sterling.com
Message-Id: <3i69l2$2bb@sparky.sterling.com>
References: <csm-v47i067=ecu.201430@sparky.sterling.com>
Nntp-Posting-Host: sparky.sterling.com
X-Md4-Signature: ad281781cdfb4cf8d9305ad738e854b1
To: unix-sources@pa.dec.com
Resent-Message-Id: <"DfNVi3.0.R-4.9tyHl"@ftp-gw-1.pa.dec.com>
Resent-From: unix-sources@pa.dec.com
X-Mailing-List: <unix-sources@pa.dec.com> archive/latest/493
X-Loop: unix-sources@pa.dec.com
Precedence: list
Resent-Sender: unix-sources-request@pa.dec.com

Submitted-by: wht@n4hgf.atl.ga.us (Warren Tucker)
Posting-number: Volume 47, Issue 68
Archive-name: ecu/patch03b
Environment: SCO,SCOXENIX,MOTOROLA,HP-UX,LINUX,NetBSD,SUNOS,SYSVR4,SOLARIS2,FreeBSD
Patch-To: ecu: Volume 42, Issue 99-135

#-------------------------------------------------------
# PATCH3.02
# created by gendiff x1.33 on 17 Feb 1995 20:19 UTC
#-------------------------------------------------------
*** ../ecu-3.32/ecuDCE.c	Wed May  4 04:38:45 1994
--- ecuDCE.c	Thu Jan 12 15:19:44 1995
***************
*** 32,39 ****
--- 32,40 ----
  connect_string:CONNECT
  
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:02-11-1994-16:03-wht@n4hgf-add connect string */
  /*:01-04-1994-05:45-wht@n4hgf-add INTDIAL_TO */
  /*:04-06-1993-11:51-wht@n4hgf-need to kill rcvr to use built-in dialer */
***************
*** 93,101 ****
  check_queued_sigint()
  {
  	while (ttyrdchk())
  	{
! 		if ((uchar) ttygetc(1) == (uchar) kbdintr)
  		{
  			sigint = 1;
  			return (1);
  		}
--- 94,102 ----
  check_queued_sigint()
  {
  	while (ttyrdchk())
  	{
! 		if (ttygetc(1) == (uchar) kbdintr)
  		{
  			sigint = 1;
  			return (1);
  		}
***************
*** 891,899 ****
  			{
  				ans = to_lower(ttygetc(1));
  				if (ans == 'c')
  					goto CONTINUE_CYCLE;
! 				else if (ans == kbdintr)
  					goto ABORT_CYCLE;
  				else
  					ring_bell();
  			}
--- 892,900 ----
  			{
  				ans = to_lower(ttygetc(1));
  				if (ans == 'c')
  					goto CONTINUE_CYCLE;
! 				else if (ans == (uchar)kbdintr)
  					goto ABORT_CYCLE;
  				else
  					ring_bell();
  			}
*** ../ecu-3.32/ecu_config.h	Wed May  4 04:38:46 1994
--- ecu_config.h	Thu Jan 12 15:19:45 1995
***************
*** 1,8 ****
--- 1,9 ----
  /*+-------------------------------------------------------------------------
  	ecu_config.h
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:01-16-1994-16:55-wht@n4hgf-added framework */
  
  #ifndef _ecu_config_h
***************
*** 11,19 ****
  /*
   * config.c, compiled without benefit of it's own wizardry
   * and it's user input, must know how to use the tty
   */
! #if defined(__NetBSD__) && !defined(CFG_TermiosLineio)
  #define CFG_TermiosLineio
  #endif
  
  /*
--- 12,20 ----
  /*
   * config.c, compiled without benefit of it's own wizardry
   * and it's user input, must know how to use the tty
   */
! #if (defined(__NetBSD__) || defined(__FreeBSD__)) && !defined(CFG_TermiosLineio)
  #define CFG_TermiosLineio
  #endif
  
  /*
*** ../ecu-3.32/ecu_time.h	Wed May  4 04:38:47 1994
--- ecu_time.h	Thu Jan 12 15:57:39 1995
***************
*** 45,58 ****
  #if defined(CFG_SelectNap)
  
  #ifdef CFG_IncSelectH
  #include <sys/select.h>
! #endif
! 
  #if !defined(ECU_INCLUDED_SYS_TIME_H)
  #include <sys/time.h>
  #define ECU_INCLUDED_SYS_TIME_H
  #endif /* ECU_INCLUDED_SYS_TIME_H */
  
  #endif /* CFG_SelectNap */
  
  /*
--- 45,58 ----
  #if defined(CFG_SelectNap)
  
  #ifdef CFG_IncSelectH
  #include <sys/select.h>
! #else /******* per 72027.3605compuserve.com */
  #if !defined(ECU_INCLUDED_SYS_TIME_H)
  #include <sys/time.h>
  #define ECU_INCLUDED_SYS_TIME_H
  #endif /* ECU_INCLUDED_SYS_TIME_H */
+ #endif /* 0 */
  
  #endif /* CFG_SelectNap */
  
  /*
*** ../ecu-3.32/ecuchdir.c	Wed May  4 04:38:48 1994
--- ecuchdir.c	Thu Jan 12 15:19:45 1995
***************
*** 17,24 ****
--- 17,25 ----
    yourself -- there you are!" -- Pogo
  
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
  /*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
  /*:09-25-1991-18:24-wht@n4hgf2-fix seg viol in popd w/o argument on Sun */
***************
*** 234,242 ****
  {
  	register icd;
  	register itmp;
  	char s256[256];
! 	uchar delim;
  
  #define BLD_ARG_MAX	5
  	char *arg[BLD_ARG_MAX];
  	int narg;
--- 235,243 ----
  {
  	register icd;
  	register itmp;
  	char s256[256];
! 	uint delim;
  
  #define BLD_ARG_MAX	5
  	char *arg[BLD_ARG_MAX];
  	int narg;
*** ../ecu-3.32/ecucmd.h	Wed May  4 04:38:49 1994
--- ecucmd.h	Thu Jan 12 15:51:25 1995
***************
*** 115,123 ****
   * we just declare them as integer functions
   */
  #if defined(HELPGEN)
  #define S static
! #define BODY {;}
  #else
  #define S
  #define BODY ;
  #endif
--- 115,123 ----
   * we just declare them as integer functions
   */
  #if defined(HELPGEN)
  #define S static
! #define BODY {return(-1);}
  #else
  #define S
  #define BODY ;
  #endif
*** ../ecu-3.32/ecucurses.h	Wed May  4 04:38:49 1994
--- ecucurses.h	Thu Jan 12 15:19:46 1995
***************
*** 5,12 ****
--- 5,13 ----
  It is impossible to avoid warnings with various SCO curses installation
  options, so we do it here
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:11-12-1993-11:00-wht@n4hgf-Linux changes by bob@vancouver.zadall.com */
  /*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
  /*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
***************
*** 46,54 ****
   * other uses TERMINFO curses at this time
   */
  #define M_TERMINFO			 /* some ecu code requires this despite
  							  * non-SCO */
! #if defined(LINUX)
  #include <ncurses.h>
  #else
  #include <curses.h>
  #endif /* LINUX */
--- 47,55 ----
   * other uses TERMINFO curses at this time
   */
  #define M_TERMINFO			 /* some ecu code requires this despite
  							  * non-SCO */
! #if defined(LINUX) || defined(__FreeBSD__)
  #include <ncurses.h>
  #else
  #include <curses.h>
  #endif /* LINUX */
*** ../ecu-3.32/ecufinsert.c	Wed May  4 04:38:50 1994
--- ecufinsert.c	Thu Jan 12 15:19:46 1995
***************
*** 9,16 ****
--- 9,17 ----
  	file_insert_to_line(narg,arg)
  
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
  /*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
  /*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
***************
*** 104,113 ****
  	long timeout_msecs;
  	FILE *fp;
  	char file_string[256];
  	char s256[256];
! 	char xmit_mode;
! 	uchar delim;
  
  #ifdef USE_XON_XOFF
  	int ixon;
  	int ixoff;
--- 105,114 ----
  	long timeout_msecs;
  	FILE *fp;
  	char file_string[256];
  	char s256[256];
! 	uint xmit_mode;
! 	uint delim;
  
  #ifdef USE_XON_XOFF
  	int ixon;
  	int ixoff;
***************
*** 156,164 ****
  		ff(se, "(E)cho pacing\r\n");
  		ff(se, "(F)ull speed transmission\r\n");
  		ff(se, "(P)aced transmission (20 msec/char)\r\n");
  		ff(se, "(Q)uit (or ESC)          press a key:   ");
! 		xmit_mode = ttygetc(0) & 0x7F;
  		if (xmit_mode > 0x20)
  			fputs(make_char_graphic(xmit_mode, 0), se);
  		fputs("\r\n", se);
  	}
--- 157,165 ----
  		ff(se, "(E)cho pacing\r\n");
  		ff(se, "(F)ull speed transmission\r\n");
  		ff(se, "(P)aced transmission (20 msec/char)\r\n");
  		ff(se, "(Q)uit (or ESC)          press a key:   ");
! 		xmit_mode = ttygetc(0);
  		if (xmit_mode > 0x20)
  			fputs(make_char_graphic(xmit_mode, 0), se);
  		fputs("\r\n", se);
  	}
*** ../ecu-3.32/ecufkey.c	Wed May  4 04:38:51 1994
--- ecufkey.c	Thu Jan 12 15:19:47 1995
***************
*** 17,24 ****
--- 17,25 ----
  	xf_to_ikde(xf)
  
  ------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:01-30-1993-12:17-wht@n4hgf-remove gcc < 1.40 bug workaround */
  /*:01-11-1993-15:42-wht@n4hgf-declare skip_ld_break */
  /*:01-01-1993-12:52-wht@n4hgf-add procedure binding for function keys */
***************
*** 74,82 ****
  	{XF10, IKDE_F10, "F10", "\033[V"},
  	{XF11, IKDE_F11, "F11", "\033[W"},
  	{XF12, IKDE_F12, "F12", "\033[X"},
  	{XFbktab, IKDE_BKTAB, "BkTab", "\033[Z"},
! 	{255, IKDE_InitStr, "IS", ""},
  	{0, 0, "", ""}
  };
  
  /*+-------------------------------------------------------------------------
--- 75,83 ----
  	{XF10, IKDE_F10, "F10", "\033[V"},
  	{XF11, IKDE_F11, "F11", "\033[W"},
  	{XF12, IKDE_F12, "F12", "\033[X"},
  	{XFbktab, IKDE_BKTAB, "BkTab", "\033[Z"},
! 	{XF_not_yet, IKDE_InitStr, "IS", ""},
  	{0, 0, "", ""}
  };
  
  /*+-------------------------------------------------------------------------
***************
*** 217,225 ****
  	xf_to_ikde(xf)
  --------------------------------------------------------------------------*/
  int
  xf_to_ikde(xf)
! uchar xf;
  {
  	KDEMAP *kmap = kdemap;
  
  	while (kmap->xf)
--- 218,226 ----
  	xf_to_ikde(xf)
  --------------------------------------------------------------------------*/
  int
  xf_to_ikde(xf)
! uint xf;
  {
  	KDEMAP *kmap = kdemap;
  
  	while (kmap->xf)
***************
*** 242,250 ****
  
  	while (kmap->xf)
  	{
  		if (kmap->ikde == ikde)
! 			return ((int)kmap->xf & 0xFF);
  		kmap++;
  	}
  	return (-1);
  }							 /* end of ikde_to_xf */
--- 243,251 ----
  
  	while (kmap->xf)
  	{
  		if (kmap->ikde == ikde)
! 			return (kmap->xf);
  		kmap++;
  	}
  	return (-1);
  }							 /* end of ikde_to_xf */
***************
*** 271,279 ****
  	xf_text(xf) - XFkey to text
  --------------------------------------------------------------------------*/
  char *
  xf_text(xf)
! uchar xf;
  {
  	static char sc8[8];
  
  	switch (xf)
--- 272,280 ----
  	xf_text(xf) - XFkey to text
  --------------------------------------------------------------------------*/
  char *
  xf_text(xf)
! uint xf;
  {
  	static char sc8[8];
  
  	switch (xf)
*** ../ecu-3.32/ecufkey.h	Wed May  4 04:38:51 1994
--- ecufkey.h	Thu Jan 12 15:19:47 1995
***************
*** 2,9 ****
--- 2,10 ----
  	ecufkey.h -- AT XENIX/UNIX function key phrases
  	wht@n4hgf.atl.ga.us
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:01-01-1993-12:52-wht@n4hgf-add procedure binding for function keys */
  /*:01-01-1993-12:35-wht@n4hgf-KDE_OUTSTR_MAX from 32 to 64 for proc exec */
  /*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
***************
*** 80,88 ****
  #define KACT_PROC				-4	/* run proc (invocation in ->str) */
  
  typedef struct kdemap
  {
! 	uchar xf;				 /* extended function code (0x80+ from
  							  * ttygetc()) */
  	short ikde;				 /* index into keyset */
  	char *name;				 /* ECU "formal" name for key */
  	char *init;				 /* key sends this string to port by default */
--- 81,89 ----
  #define KACT_PROC				-4	/* run proc (invocation in ->str) */
  
  typedef struct kdemap
  {
! 	uint xf;                                /* extended function code (0x100+ from
  							  * ttygetc()) */
  	short ikde;				 /* index into keyset */
  	char *name;				 /* ECU "formal" name for key */
  	char *init;				 /* key sends this string to port by default */
*** ../ecu-3.32/ecufork.c	Wed May  4 04:38:52 1994
--- ecufork.c	Sun Jan 15 02:34:09 1995
***************
*** 15,22 ****
--- 15,23 ----
    -- Chief Lodge Skins
  
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:01-06-1994-05:52-wht@n4hgf-clean up LINUX port */
  /*:12-12-1993-13:27-wht@n4hgf-differentiate MAX_EXEC_ARG only for i286 */
  /*:11-12-1993-11:00-wht@n4hgf-Linux changes by bob@vancouver.zadall.com */
***************
*** 116,124 ****
  		xmtr_signals();
  		return;
  	}
  
! #ifdef LINUX
  	endwin();
  #endif
  	ttymode(0);				 /* set canonical tty mode */
  	if (shellpid == 0)		 /* we are the spawned (going to call shell) */
--- 117,125 ----
  		xmtr_signals();
  		return;
  	}
  
! #if defined(LINUX) || defined(__FreeBSD__)
  	endwin();
  #endif
  	ttymode(0);				 /* set canonical tty mode */
  	if (shellpid == 0)		 /* we are the spawned (going to call shell) */
***************
*** 224,232 ****
  			return (cptr);
  		if (!(path_buf = malloc(strlen(cptr) + 1)))
  			return ((char *)0);
  		strcpy(path_buf, cptr);
! 		path_name[PATHNAME_QUAN + 1] = (char *)0;
  		cptr = path_buf;
  		for (path_count = 0; path_count < PATHNAME_QUAN; path_count++)
  		{
  			if (*cptr == 0)
--- 225,233 ----
  			return (cptr);
  		if (!(path_buf = malloc(strlen(cptr) + 1)))
  			return ((char *)0);
  		strcpy(path_buf, cptr);
! 		path_name[PATHNAME_QUAN] = (char *)0;
  		cptr = path_buf;
  		for (path_count = 0; path_count < PATHNAME_QUAN; path_count++)
  		{
  			if (*cptr == 0)
*** ../ecu-3.32/ecugrabbag.c	Wed May  4 04:38:53 1994
--- ecugrabbag.c	Thu Jan 12 15:19:48 1995
***************
*** 27,34 ****
--- 27,36 ----
    Vonnegut, Jr.
  
  ------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
+ /*:12-27-1994-15:12-wht@n4hgf-turn on rename if CFG_FakeRename */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:11-12-1993-11:00-wht@n4hgf-Linux changes by bob@vancouver.zadall.com */
  /*:08-07-1993-21:16-wht@n4hgf-entering history mgr from col > 1 caused glitch */
  /*:01-01-1993-12:52-wht@n4hgf-add procedure binding for function keys */
***************
*** 147,159 ****
  	kbd_escape() -- xmtr got extended key -- process it
  returns(1)
  --------------------------------------------------------------------------*/
  kbd_escape(xkey)
! uchar xkey;
  {
  	register itmp;
  	int ttygets_flags = TG_XDELIM;
! 	uchar delim;
  	int strpos;
  	int old_ttymode = get_ttymode();
  	register backspace_count;
  	register KDE *tkde;
--- 149,161 ----
  	kbd_escape() -- xmtr got extended key -- process it
  returns(1)
  --------------------------------------------------------------------------*/
  kbd_escape(xkey)
! uint xkey;
  {
  	register itmp;
  	int ttygets_flags = TG_XDELIM;
! 	uint delim;
  	int strpos;
  	int old_ttymode = get_ttymode();
  	register backspace_count;
  	register KDE *tkde;
***************
*** 736,744 ****
  
  /*+-------------------------------------------------------------------------
  	rename(from,to)
  --------------------------------------------------------------------------*/
! #if defined(M_XENIX) && !defined(BUILDING_LINT_ARGS)
  int
  rename(from, to)
  char *from;
  char *to;
--- 738,746 ----
  
  /*+-------------------------------------------------------------------------
  	rename(from,to)
  --------------------------------------------------------------------------*/
! #if defined(M_XENIX) || defined(CFG_FakeRename)
  int
  rename(from, to)
  char *from;
  char *to;
*** ../ecu-3.32/ecuicmd.c	Wed May  4 04:38:55 1994
--- ecuicmd.c	Thu Jan 12 15:19:49 1995
***************
*** 13,20 ****
--- 13,21 ----
    sea.' -- Jacques-Yves Cousteau SILENT WORLD
  
  ------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:08-07-1993-11:03-wht@n4hgf-resurrect mkdir cmd */
  /*:12-16-1992-19:03-wht@n4hgf-fix dial error help suggestion */
  /*:10-18-1992-14:26-wht@n4hgf-add conxon */
***************
*** 152,160 ****
  	char *find_procedure();
  	char *xon_status();
  	char *console_xon_status();
  
! #ifdef sun
  	int modem_lines;
  
  #endif
  
--- 153,161 ----
  	char *find_procedure();
  	char *xon_status();
  	char *console_xon_status();
  
! #if defined(sun) || defined(__FreeBSD__)
  	int modem_lines;
  
  #endif
  
***************
*** 247,255 ****
  					ff(se, "   baud rate set to %u\r\n", shm->Lbaud);
  				else
  				{
  					ff(se, "   invalid baud rate: %u\r\n", itmp);
! 					ff(se, "valid rates: 110,300,600,1200,2400,4800,9600,19200\r\n");
  				}
  			}
  			break;
  
--- 248,260 ----
  					ff(se, "   baud rate set to %u\r\n", shm->Lbaud);
  				else
  				{
  					ff(se, "   invalid baud rate: %u\r\n", itmp);
! #ifdef B115200
! 					ff(se, "valid rates: 110,300,600,1200,2400,4800,9600,19200,38400,57600,115200\r\n");
! #else
! 					ff(se, "valid rates: 110,300,600,1200,2400,4800,9600,19200,38400\r\n");
! #endif
  				}
  			}
  			break;
  
***************
*** 522,530 ****
  			disp_line_termio(TTYIN, s256);
  			ff(se, "\r\n");
  			sprintf(s256, "comm line %s", shm->Lline);
  			disp_line_termio(shm->Liofd, s256);
! #ifdef sun
  			ioctl(shm->Liofd, TIOCMGET, (char *)&modem_lines);
  			ff(se, "Current modem signals:   RTS:%c   CTS:%c   DCD:%c\r\n",
  				(modem_lines & TIOCM_RTS) ? '1' : '0',
  				(modem_lines & TIOCM_CTS) ? '1' : '0',
--- 527,535 ----
  			disp_line_termio(TTYIN, s256);
  			ff(se, "\r\n");
  			sprintf(s256, "comm line %s", shm->Lline);
  			disp_line_termio(shm->Liofd, s256);
! #if defined(sun) || defined(__FreeBSD__)
  			ioctl(shm->Liofd, TIOCMGET, (char *)&modem_lines);
  			ff(se, "Current modem signals:   RTS:%c   CTS:%c   DCD:%c\r\n",
  				(modem_lines & TIOCM_RTS) ? '1' : '0',
  				(modem_lines & TIOCM_CTS) ? '1' : '0',
*** ../ecu-3.32/ecuicmhelp.c	Wed May  4 04:38:55 1994
--- ecuicmhelp.c	Thu Jan 12 15:19:50 1995
***************
*** 18,25 ****
--- 18,26 ----
    side of his Atlantic with his verb in his mouth.  -- Mark Twain
  
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
  /*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
  /*:01-11-1992-16:01-wht@n4hgf-bug in help + F1 reverts to cat menu */
***************
*** 170,178 ****
  {
  	register y;
  	register x;
  	static char cmd[15];
! 	uchar delim = 0;
  	int wgpos = -1;
  	int edit = 0;
  
  	help_cmd_line_setup(
--- 171,179 ----
  {
  	register y;
  	register x;
  	static char cmd[15];
! 	uint delim = 0;
  	int wgpos = -1;
  	int edit = 0;
  
  	help_cmd_line_setup(
***************
*** 203,212 ****
  	register itmp;
  	int y;
  	int x;
  	char **cpptr;
! 	static char keylist[] =
  	{'g', 'c', 't', 'p', ESC, 0};
  	static char *list[] =
  	{
  		"g   - general commands",
  		"c   - communications-related commands",
--- 204,214 ----
  	register itmp;
  	int y;
  	int x;
  	char **cpptr;
! 	static uint keylist[] =
  	{'g', 'c', 't', 'p', ESC, 0};
+ 	static uint empty_list[] = { 0 };
  	static char *list[] =
  	{
  		"g   - general commands",
  		"c   - communications-related commands",
***************
*** 234,242 ****
  		waddstr(stdscr, *cpptr++);
  	}
  	wmove(stdscr, 9, 4);
  	waddstr(stdscr, "---- choose a category -------");
! 	return (winget_single(stdscr, "", keylist));
  
  }							 /* end of help_category_menu */
  
  /*+-------------------------------------------------------------------------
--- 236,244 ----
  		waddstr(stdscr, *cpptr++);
  	}
  	wmove(stdscr, 9, 4);
  	waddstr(stdscr, "---- choose a category -------");
! 	return (winget_single(stdscr, empty_list, keylist));
  
  }							 /* end of help_category_menu */
  
  /*+-------------------------------------------------------------------------
*** ../ecu-3.32/ecuicmhist.c	Wed May  4 04:38:56 1994
--- ecuicmhist.c	Thu Jan 12 15:19:50 1995
***************
*** 10,17 ****
--- 10,18 ----
    slinkeys on the escalator.  -- Steven Wright
  
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:09-13-1992-02:05-wht@n4hgf-redisplay escape prompt on error exit */
  /*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
  /*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
***************
*** 108,116 ****
  int icmdsize;
  {
  	register itmp;
  	register ICMDH *icmdh = icmdh_tail;
! 	uchar delim;
  
  	if (!icmdh)
  	{
  		ff(se, "  no interactive commands saved\r\n");
--- 109,117 ----
  int icmdsize;
  {
  	register itmp;
  	register ICMDH *icmdh = icmdh_tail;
! 	uint delim;
  
  	if (!icmdh)
  	{
  		ff(se, "  no interactive commands saved\r\n");
*** ../ecu-3.32/eculine.c	Thu Jun 16 14:29:54 1994
--- eculine.c	Thu Jan 12 15:19:51 1995
***************
*** 50,57 ****
--- 50,59 ----
    without wondering.  -- Saint Augustine
  
  ------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
+ /*:06-19-1994-11:52-wht@gyro-fix lflash_dtr for ESIXSVR4 */
  /*:06-03-1994-17:08-wht@kepler-turn off CRTSFL if val < 4 */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:10-27-1993-14:58-wht@n4hgf-bizarre fcntl bug finally fixed */
  /*:08-01-1993-02:12-wht@n4hgf-use got_delim in lgets_timeout */
***************
*** 574,586 ****
--- 576,596 ----
  		lrwt->count = actual_count;
  		return (lrwt->buffer);
  	}
  	cptr = lrwt->buffer;
+ #ifdef __FreeBSD__
+ 	while (*cptr && !isprint(*cptr))
+ #else
  	while (((*cptr > 0) && (*cptr < SPACE)) || (*cptr >= DEL))
+ #endif
  		cptr++;
  	rtn_val = cptr;
  	actual_count = 0;
+ #ifdef __FreeBSD__
+ 	while (*cptr && isprint(*cptr))
+ #else
  	while (((*cptr &= 0x7F) >= SPACE) && (*cptr < DEL))
+ #endif
  	{
  		cptr++;
  		actual_count++;
  	}
***************
*** 906,913 ****
--- 916,931 ----
  			return B19200;
  		case 38400:
  			return B38400;
  #endif
+ #ifdef B57600
+ 		case 57600:
+ 			return B57600;
+ #endif
+ #ifdef B115200
+ 		case 115200:
+ 			return B115200;
+ #endif
  		default:
  			return (-1);
  	}
  
***************
*** 1492,1499 ****
--- 1510,1524 ----
  --------------------------------------------------------------------------*/
  void
  lflash_dtr()
  {
+ #if defined(ESIXSVR4) /* thanx for fix to yzrnur!rene (Rene Lampe) */
+ 	int z = TIOCM_DTR | TIOCM_RTS;
+ 	Ioctl(shm->Liofd, TIOCMBIC, &z); /* Clear DTR */
+ 	Nap(500L);				 /* time for DTR to be low */
+ 	ioctl(shm->Liofd, TIOCMBIS, &z); /* Set DTR */
+ 	Nap(300L);				 /* nap to give a lazy DCE some time */
+ #else
  #if defined(TIOCCDTR) && defined(TIOCSDTR)	/* sun */
  	Ioctl(shm->Liofd, TIOCCDTR, 0);	/* drop DTR */
  	Nap(500L);				 /* time for DTR to be low */
  	Ioctl(shm->Liofd, TIOCSDTR, 0);	/* raise DTR */
***************
*** 1558,1565 ****
--- 1583,1591 ----
  
  #undef NEED_REOPEN
  
  #endif /* defined(TIOCCDTR) && defined(TIOCSDTR) */
+ #endif /* defined(ESIXSVR4) */
  
  }							 /* end of lflash_dtr */
  
  /*+-------------------------------------------------------------------------
*** ../ecu-3.32/ecumachdep.h	Wed May  4 04:38:57 1994
--- ecumachdep.h	Mon Feb 13 14:53:34 1995
***************
*** 1,8 ****
--- 1,10 ----
  /*+-------------------------------------------------------------------------
  	ecumachdep.h
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:42-wht@n4hgf-apply Bob Bailin machdep.h vs console.h fix */
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:01-16-1994-15:47-wht@n4hgf-creation */
  
  #ifndef _ecumachdep_h
***************
*** 19,28 ****
--- 21,38 ----
  #if defined(ESIXSVR4) && !defined(USE_AT_ANSI)
  #define USE_AT_ANSI
  #endif
  
+ #ifdef __FreeBSD__
+ #include <machine/console.h>
+ #endif
+ 
  #if defined(M_SYSV)
+ #ifdef defined(M_UNIX)
+ #include <sys/console.h>
+ #else
  #include <sys/machdep.h>
+ #endif
  /*
   * Thanks for the G2, er GIO_ATTR, to staceyc@sco.COM (Stacey Campbell)
   * GIO_ATTR was not defined in header files as of this writing
   */
*** ../ecu-3.32/ecunumrev.c	Thu Jun 16 14:36:40 1994
--- ecunumrev.c	Fri Feb 17 15:08:26 1995
***************
*** 8,15 ****
--- 8,17 ----
  	build_revision_string()
  
  ------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-15-1995-01:44-wht@n4hgf-clean up port rot */
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:12-12-1993-13:28-wht@n4hgf-support MOTSVR3 */
  /*:11-14-1993-12:33-wht@n4hgf-HP-UX port by Carl Wuebker at HP */
  /*:09-16-1992-14:13-wht@n4hgf-add M and F version qualifiers */
***************
*** 24,32 ****
--- 26,38 ----
  /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  
  #include <stdio.h>
  #include <string.h>
+ #ifdef __FreeBSD__
+ #include <stdlib.h>
+ #else
  #include <malloc.h>
+ #endif
  #include "patchlevel.h"
  
  #if defined(M_UNIX)
  #undef M_XENIX
***************
*** 37,45 ****
  /*
   * this is not a patchlevel, but a "sub-patchlevel" to keep my life sane
   */
  #if defined(WHT) || defined(ALPHA) || defined(BETA)
! char *numeric_devrev = "38";
  
  #else
  char *numeric_devrev = "";
  
--- 43,51 ----
  /*
   * this is not a patchlevel, but a "sub-patchlevel" to keep my life sane
   */
  #if defined(WHT) || defined(ALPHA) || defined(BETA)
! char *numeric_devrev = "47";
  
  #else
  char *numeric_devrev = "";
  
***************
*** 53,61 ****
  build_revision_string()
  {
  	int itmp;
  	char s128[128];
- 	char s32[32];
  
  	sprintf(s128, "%s%s.%02d",
  		(itmp = strlen(numeric_devrev)) ?
  #ifdef ALPHA
--- 59,66 ----
***************
*** 73,163 ****
  	if (itmp)
  	{
  		strcat(s128, ".");
  		strcat(s128, numeric_devrev);
- 	}
- 
- 	strcat(s128, "-");
- 
- #if defined(M_I286)
- 	strcat(s128, "286");
- #else
- #if defined(M_I386) || defined(i386) && (!defined(sun) && !defined(SVR4))
- 	strcat(s128, "386");
- #if defined(M_XENIX)
- #if defined(CFG_SelectNap)
- 	strcat(s128, "s");
- #else
- 	strcat(s128, "n");
- #endif /* CFG_SelectNap */
- #endif /* M_XENIX */
- #if defined(M_UNIX)
- 	strcat(s128, "u");
- #endif /* M_UNIX */
- #if defined(ISC)
- 	strcat(s128, "i");
- #endif /* ISC */
- #else
- #if defined(sun)
- 	strcat(s128, "sun");
- #else
- #if defined(MOTSVR3)
- 	strcat(s128, "MotSVR3");
- #else
- #if defined(SVR4)
- #if defined(ESIXSVR4)
- #define found_one
- 	strcat(s128, "eSVR4");
- #endif
- #if defined(ISCSVR4)
- #define found_one
- 	strcat(s128, "iSVR4");
- #endif
- #if defined(m68k) || defined(m88k)
- #define found_one
- 	strcat(s128, "MotSVR4");
- #endif
- #if !defined(found_one)
- 	strcat(s128, "SVR4");
- #endif /* found_one */
- #undef    found_one
- #else
- #if defined(Linux)
- 	strcat(s128, "Linux");
- #else
- #if defined(hpux)
- 	strcat(s128, "HP-UX");
- #else
- 	porting_attention_needed_here;
- #endif /* hpux */
- #endif /* Linux */
- #endif /* SVR4 */
- #endif /* MOTSVR3 */
- #endif /* sun */
- #endif /* M_I386 || i386 */
- #endif /* M_I286 */
- 
- 	s32[0] = 0;
- #if defined(__GNUC__) || defined(GNUC)
- 	strcat(s32, "G");
- #endif
- #if __STDC__
- 	strcat(s32, "A");
- #endif
- #ifdef WHT
- 	strcat(s32, "*");
- #endif /* WHT */
- #ifdef MORSE
- 	strcat(s32, "M");
- #endif /* WHT */
- #ifdef FASI
- 	strcat(s32, "F");
- #endif /* WHT */
- 
- 	if (strlen(s32))
- 	{
- 		strcat(s128, "-");
- 		strcat(s128, s32);
  	}
  
  #ifndef CONFIG
  	strcat(s128, " wht@n4hgf");
--- 78,85 ----
*** ../ecu-3.32/ecuphdir.c	Wed May  4 04:39:00 1994
--- ecuphdir.c	Tue Jan 24 17:57:04 1995
***************
*** 69,76 ****
--- 69,77 ----
  	want_pd_create(name)
  
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:38-wht@n4hgf-ECU release 3.30 */
  /*:11-17-1993-10:58-wht@n4hgf-ask for 'tty1a' not '1a' in case 1 */
  /*:08-17-1993-14:00-wht@n4hgf-with new wingets, skip standout in phdir edit */
  /*:05-29-1993-20:21-wht@n4hgf-change linst_err_text to LINST_text */
***************
*** 216,226 ****
--- 217,231 ----
  			itmp = strlen(modified);
  #if defined(SVR4)
  			whline(dirw, (unsigned long)(sHR & 0x00ff), itmp);
  #else
+ #ifdef __FreeBSD__
+ 			whline(dirw, sHR, itmp);
+ #else
  			while (itmp--)
  				waddch(dirw, (unsigned)sHR);
  #endif
+ #endif
  		}
  		wrefresh(dirw);
  	}
  }							 /* end of phdir_list_set_dirty */
***************
*** 390,411 ****
  int
  want_pd_create(name)
  char *name;
  {
! 	uchar uctmp = 255;
  
  	if (!dirw)
  		return (1);
  
  #ifdef COMPILER_BUG_FIXED
  	dirw_bot_msg("type 'y' or 'n'");
! 	while (uctmp == 255)
  	{
  		ring_bell();
  		dirw_cmd_line_setup(name, "does not exist: create?");
! 		uctmp = ttygetc(0);
! 		if (isupper(uctmp))
! 			uctmp = tolower(uctmp);
  		switch (uctmp)
  		{
  			case 'y':
  				uctmp = 1;
--- 395,414 ----
  int
  want_pd_create(name)
  char *name;
  {
! 	uint uctmp = XF_not_yet;
  
  	if (!dirw)
  		return (1);
  
  #ifdef COMPILER_BUG_FIXED
  	dirw_bot_msg("type 'y' or 'n'");
! 	while (uctmp == XF_not_yet)
  	{
  		ring_bell();
  		dirw_cmd_line_setup(name, "does not exist: create?");
! 		uctmp = to_lower(ttygetc(0));
  		switch (uctmp)
  		{
  			case 'y':
  				uctmp = 1;
***************
*** 413,421 ****
  			case 'n':
  				uctmp = 0;
  				break;
  			default:
! 				uctmp = 255;
  				break;
  		}
  	}
  	dirw_bot_msg("");
--- 416,424 ----
  			case 'n':
  				uctmp = 0;
  				break;
  			default:
! 				uctmp = XF_not_yet;
  				break;
  		}
  	}
  	dirw_bot_msg("");
***************
*** 426,437 ****
    KROCK:
  	dirw_bot_msg("type 'y' or 'n'");
  	ring_bell();
  	dirw_cmd_line_setup(name, "does not exist: create?");
! 	uctmp = ttygetc(0);
  	dirw_bot_msg("");
- 	if (isupper(uctmp))
- 		uctmp = tolower(uctmp);
  	switch (uctmp)
  	{
  		case 'y':
  			return (1);
--- 429,438 ----
    KROCK:
  	dirw_bot_msg("type 'y' or 'n'");
  	ring_bell();
  	dirw_cmd_line_setup(name, "does not exist: create?");
! 	uctmp = to_lower(ttygetc(0));
  	dirw_bot_msg("");
  	switch (uctmp)
  	{
  		case 'y':
  			return (1);
***************
*** 464,477 ****
--- 465,482 ----
  
  #if defined(SVR4)
  	whline(dirw, (unsigned long)(sHR & 0x00ff), DIRW_COLS - 1 - x);
  #else
+ #ifdef __FreeBSD__
+ 	whline(dirw, sHR, DIRW_COLS - 1 - x);
+ #else
  	while (x < DIRW_COLS - 1)
  	{
  		waddch(dirw, sHR);
  		x++;
  	}
  #endif
+ #endif
  }							 /* end of dirw_display_phonedir_name */
  
  /*+-------------------------------------------------------------------------
  	dirw_display_config()
***************
*** 478,486 ****
  --------------------------------------------------------------------------*/
  void
  dirw_display_config()
  {
! #if !defined(SVR4)
  	register y, x;
  
  #endif
  
--- 483,491 ----
  --------------------------------------------------------------------------*/
  void
  dirw_display_config()
  {
! #if !defined(SVR4) && !defined(__FreeBSD__)
  	register y, x;
  
  #endif
  
***************
*** 492,502 ****
--- 497,512 ----
  	whline(dirw, (unsigned long)(sHR & 0x00ff), DIRW_COLS - 2);
  #else
  	wmove(dirw, DIRW_LINES - DIRW_BOT_LINES, 0);
  	waddch(dirw, sLT);
+ #ifdef __FreeBSD__
+ 	whline(dirw, sHR, DIRW_COLS - 2);
+ 	wmove(dirw, DIRW_LINES - DIRW_BOT_LINES, DIRW_COLS - 1);
+ #else
  	getyx(dirw, y, x);
  	while (x++ < (DIRW_COLS - 1))
  		waddch(dirw, sHR);
+ #endif
  	waddch(dirw, sRT);
  #endif
  
  	if (pde_marked_for_redial_count)
***************
*** 530,549 ****
  	wstandout(dirw);
  
  #if defined(SVR4)
  	waddstr(dirw,
! 		" entry name | telephone number | tty | baud P | description                   "
  		);
  #else
  	waddstr(dirw, " entry name ");
  	waddch(dirw, (unsigned)sVR);
  	waddstr(dirw, " telephone number ");
  	waddch(dirw, (unsigned)sVR);
  	waddstr(dirw, " tty ");
  	waddch(dirw, (unsigned)sVR);
! 	waddstr(dirw, " baud P ");
  	waddch(dirw, (unsigned)sVR);
! 	waddstr(dirw, " description                   ");
  #endif
  
  	wstandend(dirw);
  	dirw_display_phonedir_name();
--- 540,575 ----
  	wstandout(dirw);
  
  #if defined(SVR4)
  	waddstr(dirw,
! 		" entry name | telephone number | tty | baud  P | description                  "
  		);
  #else
  	waddstr(dirw, " entry name ");
+ #ifdef __FreeBSD__
+ 	waddch(dirw, sVR);
+ #else
  	waddch(dirw, (unsigned)sVR);
+ #endif
  	waddstr(dirw, " telephone number ");
+ #ifdef __FreeBSD__
+ 	waddch(dirw, sVR);
+ #else
  	waddch(dirw, (unsigned)sVR);
+ #endif
  	waddstr(dirw, " tty ");
+ #ifdef __FreeBSD__
+ 	waddch(dirw, sVR);
+ #else
  	waddch(dirw, (unsigned)sVR);
! #endif
! 	waddstr(dirw, " baud  P ");
! #ifdef __FreeBSD__
! 	waddch(dirw, sVR);
! #else
  	waddch(dirw, (unsigned)sVR);
! #endif
! 	waddstr(dirw, " description                  ");
  #endif
  
  	wstandend(dirw);
  	dirw_display_phonedir_name();
***************
*** 582,592 ****
--- 608,622 ----
  
  #if defined(SVR4)
  		whline(dirw, (unsigned long)(sHR & 0x00ff), itmp2);
  #else
+ #ifdef __FreeBSD__
+ 		whline(dirw, sHR, itmp2);
+ #else
  		for (itmp = 0; itmp < itmp2; itmp++)
  			waddch(dirw, (unsigned)sHR);
  #endif
+ #endif
  
  		last_msglen = 0;
  	}
  	else
***************
*** 609,619 ****
--- 639,653 ----
  		{
  #if defined(SVR4)
  			whline(dirw, (unsigned long)(sHR & 0x00ff), itmp2);
  #else
+ #ifdef __FreeBSD__
+ 			whline(dirw, sHR, itmp2);
+ #else
  			while (itmp2--)
  				waddch(dirw, (unsigned)sHR);
  #endif
+ #endif
  		}
  		last_msglen = itmp;	 /* remember last message length */
  	}
  	wrefresh(dirw);
***************
*** 657,666 ****
  /*+-----------------------------------------------------------------------
  	phdir_display(win,line,tpde,stand_out)
  00000000001111111111222222222233333333334444444444555555555566666666667777777777
  01234567890123456789012345678901234567890123456789012345678901234567890123456789
! | entry name | telephone number | tty | baud P | description                   |
! | 0123456789 | 0123456789012345 | 01  | baud P | 01234567890123456789012345678 |
  --------------------------------------------------------------------------*/
  phdir_display(line, tpde, stand_out)
  int line;
  PDE *tpde;
--- 691,700 ----
  /*+-----------------------------------------------------------------------
  	phdir_display(win,line,tpde,stand_out)
  00000000001111111111222222222233333333334444444444555555555566666666667777777777
  01234567890123456789012345678901234567890123456789012345678901234567890123456789
! | entry name | telephone number | tty | baud  P | description                   |
! | 0123456789 | 0123456789012345 | 01  | baud  P | 01234567890123456789012345678 |
  --------------------------------------------------------------------------*/
  phdir_display(line, tpde, stand_out)
  int line;
  PDE *tpde;
***************
*** 681,691 ****
  	if (tpde->tty[0])
  		wprintw(scrw, "%-5.5s|", tpde->tty);
  	else
  		waddstr(scrw, "Any  |");
! 	wprintw(scrw, "%5u %c | ", tpde->baud,
  		(tpde->parity) ? to_upper(tpde->parity) : 'N');
! 	wprintw(scrw, "%-29.29s", tpde->descr);
  #else
  	wprintw(scrw, "%-16.16s ", tpde->telno);
  	waddch(scrw, (unsigned)sVR);
  	if (tpde->tty[0])
--- 715,725 ----
  	if (tpde->tty[0])
  		wprintw(scrw, "%-5.5s|", tpde->tty);
  	else
  		waddstr(scrw, "Any  |");
! 	wprintw(scrw, "%6u %c | ", tpde->baud,
  		(tpde->parity) ? to_upper(tpde->parity) : 'N');
! 	wprintw(scrw, "%-28.28s", tpde->descr);
  #else
  	wprintw(scrw, "%-16.16s ", tpde->telno);
  	waddch(scrw, (unsigned)sVR);
  	if (tpde->tty[0])
***************
*** 692,703 ****
  		wprintw(scrw, "%-5.5s", tpde->tty);
  	else
  		waddstr(scrw, "Any  ");
  	waddch(scrw, (unsigned)sVR);
! 	wprintw(scrw, "%5u %c ", tpde->baud,
  		(tpde->parity) ? to_upper(tpde->parity) : 'N');
  	waddch(scrw, (unsigned)sVR);
! 	wprintw(scrw, " %-29.29s ", tpde->descr);
  	waddch(scrw, (unsigned)sVR);
  #endif
  	return (0);
  
--- 726,737 ----
  		wprintw(scrw, "%-5.5s", tpde->tty);
  	else
  		waddstr(scrw, "Any  ");
  	waddch(scrw, (unsigned)sVR);
! 	wprintw(scrw, "%6u %c ", tpde->baud,
  		(tpde->parity) ? to_upper(tpde->parity) : 'N');
  	waddch(scrw, (unsigned)sVR);
! 	wprintw(scrw, " %-28.28s ", tpde->descr);
  	waddch(scrw, (unsigned)sVR);
  #endif
  	return (0);
  
***************
*** 843,854 ****
  
  /*+-------------------------------------------------------------------------
  	dirw_get_cmd()
  --------------------------------------------------------------------------*/
! uchar
  dirw_get_cmd()
  {
! 	register uchar cmd;
  	char setupline1[128];	 /* yetch ... avoid source line > 80 chars */
  	char setupline2[128];
  	char *setupline1_1 =
  	"~d~own ~u~p ~PgDn~ ~PgUp~ ~e~dit ~a~dd ~r~emove ~s~ave ~f~ind ";
--- 877,888 ----
  
  /*+-------------------------------------------------------------------------
  	dirw_get_cmd()
  --------------------------------------------------------------------------*/
! uint
  dirw_get_cmd()
  {
! 	register uint cmd;
  	char setupline1[128];	 /* yetch ... avoid source line > 80 chars */
  	char setupline2[128];
  	char *setupline1_1 =
  	"~d~own ~u~p ~PgDn~ ~PgUp~ ~e~dit ~a~dd ~r~emove ~s~ave ~f~ind ";
***************
*** 1128,1136 ****
  int edit;
  int y;
  char *buf;
  int bufmax;
! uchar *delim;
  {
  	int wgpos = -1;
  	char s80[80];
  	int done = 0;
--- 1162,1170 ----
  int edit;
  int y;
  char *buf;
  int bufmax;
! uint *delim;
  {
  	int wgpos = -1;
  	char s80[80];
  	int done = 0;
***************
*** 1156,1164 ****
  #endif
  		clear_area(addw, y, 20, bufmax);
  		edit = 1;			 /* if we come back again, edit string */
  
! 		switch (*((uchar *) delim))
  		{
  			case ESC:
  				waddstr(addw, buf);
  				done = 1;
--- 1190,1198 ----
  #endif
  		clear_area(addw, y, 20, bufmax);
  		edit = 1;			 /* if we come back again, edit string */
  
! 		switch (*((uint *) delim))
  		{
  			case ESC:
  				waddstr(addw, buf);
  				done = 1;
***************
*** 1212,1220 ****
  	int itmp;
  	int wgedit = 0;
  	int wgpos = -1;
  	char s64[64];
! 	uchar delim = 0;
  	int y, x;
  	PDE *old_curr_pde = (PDE *) 0;
  	uint baud;
  	char cmpbuf[128];
--- 1246,1254 ----
  	int itmp;
  	int wgedit = 0;
  	int wgpos = -1;
  	char s64[64];
! 	uint delim = 0;
  	int y, x;
  	PDE *old_curr_pde = (PDE *) 0;
  	uint baud;
  	char cmpbuf[128];
***************
*** 1301,1309 ****
  	wmove(addw, 2, 20);
  	waddstr(addw, tpde->telno);
  	wmove(addw, 3, 20);
  	waddstr(addw, (tpde->tty[0]) ? tpde->tty : "Any");
! 	sprintf(s64, "%-5u", tpde->baud);
  	wmove(addw, 4, 20);
  	waddstr(addw, s64);
  	s64[0] = (tpde->parity) ? to_upper((char)tpde->parity) : 'N';
  	s64[1] = 0;
--- 1335,1343 ----
  	wmove(addw, 2, 20);
  	waddstr(addw, tpde->telno);
  	wmove(addw, 3, 20);
  	waddstr(addw, (tpde->tty[0]) ? tpde->tty : "Any");
! 	sprintf(s64, "%-6u", tpde->baud);
  	wmove(addw, 4, 20);
  	waddstr(addw, s64);
  	s64[0] = (tpde->parity) ? to_upper((char)tpde->parity) : 'N';
  	s64[1] = 0;
***************
*** 1371,1380 ****
  
  			case 2:
  				sprintf(s64, "%u", tpde->baud);
  				phdir_add_or_edit_read(
  					"Enter rate (110,300,600,1200,2400,4800,9600,19200,38400)",
! 					1, input_state + 2, s64, 5 + 1, &delim);
  				if (valid_baud_rate(baud = atoi(s64)) < 0)
  				{
  					ring_bell();
  					continue;
--- 1405,1418 ----
  
  			case 2:
  				sprintf(s64, "%u", tpde->baud);
  				phdir_add_or_edit_read(
+ #ifdef B115200
+ 					"110,300,600,1200,2400,4800,9600,19200,38400,57600,115200",
+ #else
  					"Enter rate (110,300,600,1200,2400,4800,9600,19200,38400)",
! #endif
! 					1, input_state + 2, s64, 6 + 1, &delim);
  				if (valid_baud_rate(baud = atoi(s64)) < 0)
  				{
  					ring_bell();
  					continue;
***************
*** 1679,1687 ****
  phdir_cmd_find()
  {
  	register PDE *tpde;
  	char findname[12];
! 	uchar delim = 0;
  	int y, x;
  	int wgedit = 0;
  	int wgpos = -1;
  
--- 1717,1725 ----
  phdir_cmd_find()
  {
  	register PDE *tpde;
  	char findname[12];
! 	uint delim = 0;
  	int y, x;
  	int wgedit = 0;
  	int wgpos = -1;
  
***************
*** 1719,1727 ****
  {
  	int itmp;
  	char newdirname[256];
  	char buf[256];
! 	uchar delim = 0;
  	int y, x;
  	int wgedit = 0;
  	int wgpos = -1;
  	char *expcmd;
--- 1757,1765 ----
  {
  	int itmp;
  	char newdirname[256];
  	char buf[256];
! 	uint delim = 0;
  	int y, x;
  	int wgedit = 0;
  	int wgpos = -1;
  	char *expcmd;
***************
*** 1933,1941 ****
  void
  phdir_cmd_set_wait()
  {
  	char buf[64];
! 	uchar delim = 0;
  	int y, x;
  	int wgpos = -1;
  
  	dirw_bot_msg("ESC: abort  ^U: erase input");
--- 1971,1979 ----
  void
  phdir_cmd_set_wait()
  {
  	char buf[64];
! 	uint delim = 0;
  	int y, x;
  	int wgpos = -1;
  
  	dirw_bot_msg("ESC: abort  ^U: erase input");
***************
*** 1993,2001 ****
  --------------------------------------------------------------------------*/
  void
  phdir_manager()
  {
! 	register uchar cmd = 0;
  	int done;
  	char s80[80];
  	int restart_rcvr = need_rcvr_restart();
  
--- 2031,2039 ----
  --------------------------------------------------------------------------*/
  void
  phdir_manager()
  {
! 	register uint cmd = 0;
  	int done;
  	char s80[80];
  	int restart_rcvr = need_rcvr_restart();
  
*** ../ecu-3.32/ecurcvr.c	Wed May  4 04:39:01 1994
--- ecurcvr.c	Thu Jan 12 15:19:53 1995
***************
*** 63,70 ****
--- 63,71 ----
      Any perceptible delay will eventually get on your nerves. --Bob Hyers
  
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:39-wht@n4hgf-ECU release 3.30 */
  /*:10-03-1993-20:09-wht@n4hgf-document read errors w/fd on screen */
  /*:08-18-1993-05:49-wht@n4hgf-rcvr seems ready for release */
  /*:08-07-1993-20:38-wht@n4hgf-add xmtr_wfp_debug_hack */
***************
*** 1611,1619 ****
  	 */
  	if (rcvr_log && rcvr_log_fp)
  	{
  		/* if raw mode or character not excluded from "cooked" logging */
! 		if (rcvr_log_raw || ((rchar >= SPACE) && (rchar <= '~')) ||
  			(rchar == NL) || (rchar == TAB))
  		{
  			LOGPUTC(rchar, rcvr_log_fp);
  		}
--- 1612,1625 ----
  	 */
  	if (rcvr_log && rcvr_log_fp)
  	{
  		/* if raw mode or character not excluded from "cooked" logging */
! 		if (rcvr_log_raw ||
! #ifdef __FreeBSD__
! 			isprint(rchar) ||
! #else
! 			((rchar >= SPACE) && (rchar <= '~')) ||
! #endif
  			(rchar == NL) || (rchar == TAB))
  		{
  			LOGPUTC(rchar, rcvr_log_fp);
  		}
***************
*** 1681,1692 ****
  	{
  		tcap_LINES = 25;
  		tcap_COLS = 80;
  	}
! 	if (tcap_LINES > SCREEN_LINES_MAX)
! 		tcap_LINES = SCREEN_LINES_MAX;
! 	if (tcap_COLS > SCREEN_COLS_MAX)
! 		tcap_COLS = SCREEN_COLS_MAX;
  	LINESxCOLS = tcap_LINES * tcap_COLS;
  
  	rcvr_signals();
  	rcvr_log_open();
--- 1687,1698 ----
  	{
  		tcap_LINES = 25;
  		tcap_COLS = 80;
  	}
! 	if (tcap_LINES > CFG_ScreenLinesMax)
! 		tcap_LINES = CFG_ScreenLinesMax;
! 	if (tcap_COLS > CFG_ScreenColsMax)
! 		tcap_COLS = CFG_ScreenColsMax;
  	LINESxCOLS = tcap_LINES * tcap_COLS;
  
  	rcvr_signals();
  	rcvr_log_open();
*** ../ecu-3.32/ecuscrdump.c	Wed May  4 04:39:01 1994
--- ecuscrdump.c	Thu Jan 12 15:19:54 1995
***************
*** 7,14 ****
--- 7,15 ----
  	screen_dump(scrfile)
  
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-04-1994-04:39-wht@n4hgf-ECU release 3.30 */
  /*:11-12-1993-11:00-wht@n4hgf-Linux changes by bob@vancouver.zadall.com */
  /*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 */
  /*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA */
***************
*** 17,25 ****
  /*:07-17-1991-07:04-wht@n4hgf-avoid SCO UNIX nap bug */
  /*:12-21-1990-17:27-wht@n4hgf-non-ansi considerations */
  /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  
! #if defined(LINUX)
  #include <ncurses.h>
  #endif
  #include "ecu.h"
  #include "ecukey.h"
--- 18,26 ----
  /*:07-17-1991-07:04-wht@n4hgf-avoid SCO UNIX nap bug */
  /*:12-21-1990-17:27-wht@n4hgf-non-ansi considerations */
  /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
  
! #if defined(LINUX) || defined(__FreeBSD__)
  #include <ncurses.h>
  #endif
  #include "ecu.h"
  #include "ecukey.h"
*** ../ecu-3.32/ecusetup.c	Tue May 17 20:29:41 1994
--- ecusetup.c	Tue Feb  7 16:06:49 1995
***************
*** 11,19 ****
  04|    Description   ........................................    |
  05|                                                              |
  06|  tty: /dev/........   (opened)                               |
  07|                                                              |
! 08|  duplex: .  baud: .....  parity: . (data bits .)             |
  09|  add NL to transmitted CR: .                                 |
  10|  add NL to received CR:    .                                 |
  11|                                                              |
  12|                                                              |
--- 11,19 ----
  04|    Description   ........................................    |
  05|                                                              |
  06|  tty: /dev/........   (opened)                               |
  07|                                                              |
! 08|  duplex: .  baud: ...... parity: . (data bits .)             |
  09|  add NL to transmitted CR: .                                 |
  10|  add NL to received CR:    .                                 |
  11|                                                              |
  12|                                                              |
***************
*** 37,44 ****
--- 37,46 ----
    - Harry Truman
  
  --------------------------------------------------------------------------*/
  /*+:EDITS:*/
+ /*:02-07-1995-16:06-wht@n4hgf-unANSIfy struint */
+ /*:01-12-1995-15:19-wht@n4hgf-apply Andrew Chernov 8-bit clean+FreeBSD patch */
  /*:05-17-1994-20:29-wht@n4hgf-terminate setw_nondelim_list */
  /*:05-04-1994-04:39-wht@n4hgf-ECU release 3.30 */
  /*:12-02-1993-14:34-wht@n4hgf-line lock retries from 8 to 20 */
  /*:11-12-1993-11:00-wht@n4hgf-Linux changes by bob@vancouver.zadall.com */
***************
*** 103,111 ****
  #define DPX_LX		3
  
  #define BAUD_Y		8
  #define BAUD_X		20
! #define BAUD_LEN	5
  #define BAUD_LX		14
  
  #define PAR_Y		8
  #define PAR_X		35
--- 105,113 ----
  #define DPX_LX		3
  
  #define BAUD_Y		8
  #define BAUD_X		20
! #define BAUD_LEN        6
  #define BAUD_LX		14
  
  #define PAR_Y		8
  #define PAR_X		35
***************
*** 129,141 ****
  
  WINDOW *setw;
  
  #define SETW_MSG_LEFTX 2
! #define SETW_MSG_MAXLEN	(SETW_COLS - SETW_MSG_LEFTX - 8)
  #define SETW_MSG_BOT_Y  (SETW_LINES - 1)
  #define SETW_MSG_ERR_Y  (SETW_LINES - 3)
  
! #ifdef LINUX
  typedef chtype CHTYPE;
  
  #else
  typedef char CHTYPE;
--- 131,143 ----
  
  WINDOW *setw;
  
  #define SETW_MSG_LEFTX 2
! #define SETW_MSG_MAXLEN (SETW_COLS - SETW_MSG_LEFTX - 6)
  #define SETW_MSG_BOT_Y  (SETW_LINES - 1)
  #define SETW_MSG_ERR_Y  (SETW_LINES - 3)
  
! #if defined(LINUX) || defined(__FreeBSD__)
  typedef chtype CHTYPE;
  
  #else
  typedef char CHTYPE;
***************
*** 142,149 ****
--- 144,165 ----
  
  #endif
  
  /*+-------------------------------------------------------------------------
+ 	struint(str,delim)
+ --------------------------------------------------------------------------*/
+ static int
+ struint(str,delim)
+ uint *str;
+ uint delim;
+ {
+     for (; *str; str++)
+         if (*str == delim)
+             return(1);
+     return(0);
+ }	/* end of struint */
+ 
+ /*+-------------------------------------------------------------------------
  	setw_msg(msg,y,fillch)
  --------------------------------------------------------------------------*/
  void
  setw_msg(msg, y, fillch, last_msglen)
***************
*** 166,174 ****
  		itmp2 = *last_msglen + 2;
  #if defined(SVR4)
  		whline(setw, (unsigned long)(fillch & 0x00ff), itmp2);
  #else
! #if defined(LINUX)
  		whline(setw, fillch, itmp2);
  #else
  		for (itmp = 0; itmp < itmp2; itmp++)
  			waddch(setw, fillch & 0xFF);
--- 182,190 ----
  		itmp2 = *last_msglen + 2;
  #if defined(SVR4)
  		whline(setw, (unsigned long)(fillch & 0x00ff), itmp2);
  #else
! #if defined(LINUX) || defined(__FreeBSD__)
  		whline(setw, fillch, itmp2);
  #else
  		for (itmp = 0; itmp < itmp2; itmp++)
  			waddch(setw, fillch & 0xFF);
***************
*** 196,204 ****
  		{
  #if defined(SVR4)
  			whline(setw, (unsigned long)(fillch & 0x00ff), itmp2);
  #else
! #if defined(LINUX)
  			whline(setw, fillch, itmp2);
  #else
  			while (itmp2--)
  				waddch(setw, fillch & 0xFF);
--- 212,220 ----
  		{
  #if defined(SVR4)
  			whline(setw, (unsigned long)(fillch & 0x00ff), itmp2);
  #else
! #if defined(LINUX) || defined(__FreeBSD__)
  			whline(setw, fillch, itmp2);
  #else
  			while (itmp2--)
  				waddch(setw, fillch & 0xFF);
***************
*** 453,471 ****
  assumes cursor is already positioned
  --------------------------------------------------------------------------*/
  uint
  setw_get_single(nondelim_list)
! register char *nondelim_list;
  {
  	register uint itmp;
! 	static uchar setw_nondelim_list[] =
  	{
  		CRET, NL, CTL_B, CTL_D, TAB, ESC, CTL_L, CTL_R,
  		XFend, XFcurup, XFcurdn, 0
  	};
  
  	itmp = winget_single(setw, nondelim_list, setw_nondelim_list);
! 	if ((itmp & 0xFF) == CRET)
  		itmp = NL | 0x1000;
  	return (itmp);
  }							 /* end of setw_get_single */
  
--- 469,487 ----
  assumes cursor is already positioned
  --------------------------------------------------------------------------*/
  uint
  setw_get_single(nondelim_list)
! register uint *nondelim_list;
  {
  	register uint itmp;
! 	static uint setw_nondelim_list[] =
  	{
  		CRET, NL, CTL_B, CTL_D, TAB, ESC, CTL_L, CTL_R,
  		XFend, XFcurup, XFcurdn, 0
  	};
  
  	itmp = winget_single(setw, nondelim_list, setw_nondelim_list);
! 	if ((itmp & 0x1FF) == CRET)
  		itmp = NL | 0x1000;
  	return (itmp);
  }							 /* end of setw_get_single */
  
***************
*** 482,495 ****
  	char *cptr;
  	char logical[NAME_LEN + 1];
  	int done = 0;
  	uint baud;
! 	uchar delim;			 /* important to be unsigned to avoid sign
  							  * extension */
  	PDE *tpde;
  	WINDOW *window_create();
! 	static uchar use_input_delim[] =
  	{TAB, NL, XFcurdn, XFcurup, XFend, CTL_D, 0};
  
  	windows_start();
  	sprintf(s128, "ecu %s", revstr);
  	setw = window_create(s128, -3, SETW_TLY, SETW_TLX, SETW_LINES, SETW_COLS);
--- 498,514 ----
  	char *cptr;
  	char logical[NAME_LEN + 1];
  	int done = 0;
  	uint baud;
! 	uint delim;                     /* important to be unsigned to avoid sign
  							  * extension */
  	PDE *tpde;
  	WINDOW *window_create();
! 	static uint use_input_delim[] =
  	{TAB, NL, XFcurdn, XFcurup, XFend, CTL_D, 0};
+ 	static uint use_fh_delim[] = {'f', 'h', 0};
+ 	static uint use_neo_delim[] = {'n', 'e', 'o', 0};
+ 	static uint use_ny_delim[] = {'n', 'y', 0};
  
  	windows_start();
  	sprintf(s128, "ecu %s", revstr);
  	setw = window_create(s128, -3, SETW_TLY, SETW_TLX, SETW_LINES, SETW_COLS);
***************
*** 537,545 ****
  				}
  				if (delim == CTL_D)	/* do not process if going to
  									 * directory */
  					break;
! 				if (strchr((char *)use_input_delim, (uchar) delim))
  				{
  					strcpy(logical, s128);
  					if ((tpde = logical_telno_to_pde(logical)) &&
  						!copy_pde_to_Lvariables(tpde, 1))
--- 556,564 ----
  				}
  				if (delim == CTL_D)	/* do not process if going to
  									 * directory */
  					break;
! 				if (struint(use_input_delim, delim))
  				{
  					strcpy(logical, s128);
  					if ((tpde = logical_telno_to_pde(logical)) &&
  						!copy_pde_to_Lvariables(tpde, 1))
***************
*** 575,583 ****
  				setw_err_msg("");
  				if (delim == CTL_D)	/* do not process if going to
  									 * directory */
  					break;
! 				if (strchr((char *)use_input_delim, (uchar) delim))
  				{
  					strcpy(shm->Lline, "/dev/");
  					strcpy(&shm->Lline[5], s128);
  				}
--- 594,602 ----
  				setw_err_msg("");
  				if (delim == CTL_D)	/* do not process if going to
  									 * directory */
  					break;
! 				if (struint(use_input_delim, delim))
  				{
  					strcpy(shm->Lline, "/dev/");
  					strcpy(&shm->Lline[5], s128);
  				}
***************
*** 588,618 ****
  				setw_bot_msg("duplex F:full H:half");
  				wmove(setw, DPX_Y, DPX_X);
  				wrefresh(setw);
  				delim = NL;
! 				switch (itmp = setw_get_single("fh"))
  				{
  					case 0:
  					case 1:
  						shm->Lfull_duplex = itmp;
  						break;
  					default:
! 						delim = itmp & 0xFF;
  						break;
  				}
  				break;
  
  			case 3:		 /* baud */
  				setw_bot_msg(
! 					"rates: 110,300,600,1200,2400,41280,9600,19200,38400");
  			  CASE_3:
  				sprintf(s128, "%u", shm->Lbaud);
  				itmp = wingets(setw, BAUD_Y, BAUD_X, s128, BAUD_LEN + 1, &delim,
  					1, (int *)0);
  				if (delim == CTL_D)	/* do not process if going to
  									 * directory */
  					break;
! 				if (strchr((char *)use_input_delim, (uchar) delim))
  				{
  					if (valid_baud_rate(baud = atoi(s128)) < 0)
  					{
  						setup_display_baud();
--- 607,641 ----
  				setw_bot_msg("duplex F:full H:half");
  				wmove(setw, DPX_Y, DPX_X);
  				wrefresh(setw);
  				delim = NL;
! 				switch (itmp = setw_get_single(use_fh_delim))
  				{
  					case 0:
  					case 1:
  						shm->Lfull_duplex = itmp;
  						break;
  					default:
! 						delim = itmp & 0x1FF;
  						break;
  				}
  				break;
  
  			case 3:		 /* baud */
  				setw_bot_msg(
! #ifdef B115200
! 					"110,300,600,1200,2400,4800,9600,19200,38400,57600,115200");
! #else
! 					"rates: 110,300,600,1200,2400,4800,9600,19200,38400");
! #endif
  			  CASE_3:
  				sprintf(s128, "%u", shm->Lbaud);
  				itmp = wingets(setw, BAUD_Y, BAUD_X, s128, BAUD_LEN + 1, &delim,
  					1, (int *)0);
  				if (delim == CTL_D)	/* do not process if going to
  									 * directory */
  					break;
! 				if (struint(use_input_delim, delim))
  				{
  					if (valid_baud_rate(baud = atoi(s128)) < 0)
  					{
  						setup_display_baud();
***************
*** 628,636 ****
  				setw_bot_msg("parity: N:none E:even O:odd");
  				wmove(setw, PAR_Y, PAR_X);
  				wrefresh(setw);
  				delim = NL;
! 				switch (itmp = setw_get_single("neo"))
  				{
  					case 0:
  						shm->Lparity = 0;
  						break;
--- 651,659 ----
  				setw_bot_msg("parity: N:none E:even O:odd");
  				wmove(setw, PAR_Y, PAR_X);
  				wrefresh(setw);
  				delim = NL;
! 				switch (itmp = setw_get_single(use_neo_delim))
  				{
  					case 0:
  						shm->Lparity = 0;
  						break;
***************
*** 640,648 ****
  					case 2:
  						shm->Lparity = 'o';
  						break;
  					default:
! 						delim = itmp & 0xFF;
  						break;
  				}
  				wmove(setw, DB_Y, DB_X);
  				waddch(setw, (shm->Lparity) ? '7' : '8');
--- 663,671 ----
  					case 2:
  						shm->Lparity = 'o';
  						break;
  					default:
! 						delim = itmp & 0x1FF;
  						break;
  				}
  				wmove(setw, DB_Y, DB_X);
  				waddch(setw, (shm->Lparity) ? '7' : '8');
***************
*** 652,667 ****
  				setw_bot_msg("");
  				wmove(setw, XADDNL_Y, XADDNL_X);
  				wrefresh(setw);
  				delim = NL;
! 				switch (itmp = setw_get_single("ny"))
  				{
  					case 0:
  					case 1:
  						shm->Ladd_nl_outgoing = itmp;
  						break;
  					default:
! 						delim = itmp & 0xFF;
  				}
  				break;
  
  			case 6:
--- 675,690 ----
  				setw_bot_msg("");
  				wmove(setw, XADDNL_Y, XADDNL_X);
  				wrefresh(setw);
  				delim = NL;
! 				switch (itmp = setw_get_single(use_ny_delim))
  				{
  					case 0:
  					case 1:
  						shm->Ladd_nl_outgoing = itmp;
  						break;
  					default:
! 						delim = itmp & 0x1FF;
  				}
  				break;
  
  			case 6:
***************
*** 668,683 ****
  				setw_bot_msg("");
  				wmove(setw, RADDNL_Y, RADDNL_X);
  				wrefresh(setw);
  				delim = NL;
! 				switch (itmp = setw_get_single("ny"))
  				{
  					case 0:
  					case 1:
  						shm->Ladd_nl_incoming = itmp;
  						break;
  					default:
! 						delim = itmp & 0xFF;
  						break;
  				}
  				break;
  		}
--- 691,706 ----
  				setw_bot_msg("");
  				wmove(setw, RADDNL_Y, RADDNL_X);
  				wrefresh(setw);
  				delim = NL;
! 				switch (itmp = setw_get_single(use_ny_delim))
  				{
  					case 0:
  					case 1:
  						shm->Ladd_nl_incoming = itmp;
  						break;
  					default:
! 						delim = itmp & 0x1FF;
  						break;
  				}
  				break;
  		}

exit 0 # Just in case...

