v16i060: ECU async comm package rev 3.0, Patch01

Warren Tucker wht at n4hgf.uucp
Sun Jan 6 16:46:07 AEST 1991


Submitted-by: wht at n4hgf.uucp (Warren Tucker)
Posting-number: Volume 16, Issue 60
Archive-name: ecu3/patch01
Patch-To: ecu3: Volume 16, Issue 25-59

This is patch 1 to ECU 3.  It provides speed improvements
and fixes for non-ANSI terminal support.  Also provided is an
experimental make file for GCC 1.37.1 on UNIX systems.

To apply, place this shar in the ECU distribution directory
and unshar it. Then:
1. patch < PATCH01
2. make -or- make -f Make.xgcc
3. rm .orig or ~ files from patch when you are satisfied all is well

#!/bin/sh
# This is ecu3_PATCH01, a shell archive (shar 3.46)
# made 01/02/1991 04:02 UTC by wht at n4hgf
# Source directory /u1/src/ecu
#
# existing files WILL be overwritten
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#  36829 -rw-r--r-- PATCH01
#     21 -rw-r--r-- patchlevel.h
#  12403 -rw-r--r-- Make.xgcc
#
# ============= PATCH01 ==============
echo 'x - extracting PATCH01 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'PATCH01' &&
X:
X#+-------------------------------------------------------------------------
X# ECU 3.0 PATCH # 1 - Speed Improvements and Non-ANSI Fixes
X#
X# 1.  Speed improvements in the receiver process have been made.
X#     a.  memmove is used in mem_cpy (ecuutil.c); Duff's Device may be
X#         used if you do not have memmove (add a #define DUFF)
X#     b.  memset is used in spaces (ecurcvr.c)
X#     c.  #pragma intrinsic is used throughout for memset and memcpy
X#         (I am still suspicious/superstitious about intrinsics:
X#         they break badly with all but simple pointer arguments;
X#         I know how I use memset and memcpy; changers beware).
X#
X# 2.  Attribute mapping with non-ANSI terminals works muuuch better
X#     now, as does ruling character->printable character mapping.
X#
X# 3.  "bell notify" has been fixed to exclude the current terminal
X#     from getting the alarm (this used to work, but fell out somewhere)
X#
X# 4.  various changes to make GCC happier
X#     
X# created by gendiff x1.03 on 02 Jan 1991 03:55 UTC
X#--------------------------------------------------------------------------
X*** /u4/src/ecu3/ecu.c	Wed Dec 26 04:44:00 1990
X--- ecu.c	Tue Jan  1 20:46:59 1991
X***************
X*** 121,126
X    main() program forks to create rcvr process; then main()
X    becomes the xmtr process
X  ------------------------------------------------------------------------*/
X  main(argc,argv,envp)
X  int argc;
X  char **argv;
X
X--- 121,127 -----
X    main() program forks to create rcvr process; then main()
X    becomes the xmtr process
X  ------------------------------------------------------------------------*/
X+ int
X  main(argc,argv,envp)
X  int argc;
X  char **argv;
X*** /u4/src/ecu3/ecu.h	Mon Dec 24 22:26:00 1990
X--- ecu.h	Tue Jan  1 22:52:04 1991
X***************
X*** 3,8
X  	wht at n4hgf.Mt-Park.GA.US
X  ------------------------------------------------------------------------*/
X  /*+:EDITS:*/
X  /*:08-14-1990-20:39-wht at n4hgf-ecu3.00-flush old edit history */
X  
X  #define ECULIBDIR "/usr/local/lib/ecu"
X
X--- 3,9 -----
X  	wht at n4hgf.Mt-Park.GA.US
X  ------------------------------------------------------------------------*/
X  /*+:EDITS:*/
X+ /*:01-01-1991-21:36-wht at n4hgf-add GCC implies STDC */
X  /*:08-14-1990-20:39-wht at n4hgf-ecu3.00-flush old edit history */
X  
X  #define ECULIBDIR "/usr/local/lib/ecu"
X***************
X*** 7,12
X  
X  #define ECULIBDIR "/usr/local/lib/ecu"
X  
X  #if defined(__STDC__)	/* sigh ... malloc and such types */
X  #define VTYPE void
X  #else
X
X--- 8,17 -----
X  
X  #define ECULIBDIR "/usr/local/lib/ecu"
X  
X+ #if defined(__GCC__) && !defined(__STDC__)
X+ #define  __STDC__
X+ #endif
X+ 
X  #if defined(__STDC__)	/* sigh ... malloc and such types */
X  #define VTYPE void
X  #else
X***************
X*** 13,31
X  #define VTYPE char
X  #endif
X  
X- #if defined(M_UNIX)
X- #undef M_XENIX		/* we don't want this defined in UNIX world */
X- #undef NO_SELECT	/* UNIX select(S) works */
X- #endif
X- 
X- #if defined(M_I286) && !defined(NO_SELECT)
X- #define NO_SELECT	/* the last 286 XENIX I saw (2.2.1) had no select */
X- #endif
X- 
X- #ifndef ECULIBDIR
X- #define ECULIBDIR "/usr/lib/ecu"
X- #endif
X- 
X  #if !defined(STDIO_H_INCLUDED)
X  #include <stdio.h>
X  #endif
X
X--- 18,23 -----
X  #define VTYPE char
X  #endif
X  
X  #if !defined(STDIO_H_INCLUDED)
X  #include <stdio.h>
X  #endif
X***************
X*** 43,48
X  #include <termio.h>
X  #endif
X  
X  #include "ecuhangup.h"
X  #include "ecushm.h"
X  
X
X--- 35,55 -----
X  #include <termio.h>
X  #endif
X  
X+ #if defined(M_UNIX)
X+ #undef M_XENIX		/* we don't want this defined in UNIX world */
X+ #undef NO_SELECT	/* UNIX select(S) works */
X+ #pragma intrinsic(memcpy)	/* trust these intrinsics ... */
X+ #pragma intrinsic(memset)	/* ... because we know how we use them */
X+ #endif
X+ 
X+ #if defined(M_I286) && !defined(NO_SELECT)
X+ #define NO_SELECT	/* the last 286 XENIX I saw (2.2.1) had no select */
X+ #endif
X+ 
X+ #ifndef ECULIBDIR
X+ #define ECULIBDIR "/usr/lib/ecu"
X+ #endif
X+ 
X  #include "ecuhangup.h"
X  #include "ecushm.h"
X  
X***************
X*** 134,140
X  	char *delim;	/* ending string for lgets_timeout_or_delim */
X  	int echo;		/* echo incdoming chars to screen */
X  }	LRWT;
X- 
X  #include "stdio_lint.h"
X  #include "lint_args.h"
X  /* vi: set tabstop=4 shiftwidth=4: */
X
X--- 141,146 -----
X  	char *delim;	/* ending string for lgets_timeout_or_delim */
X  	int echo;		/* echo incdoming chars to screen */
X  }	LRWT;
X  #include "stdio_lint.h"
X  #include "lint_args.h"
X  /* vi: set tabstop=4 shiftwidth=4: */
X*** /u4/src/ecu3/ecuDCE.c	Mon Dec 24 22:27:00 1990
X--- ecuDCE.c	Tue Jan  1 21:43:59 1991
X***************
X*** 656,661
X  			goto START_RCVR_PROCESS;
X  		}
X  		setcolor(colors_error);
X  CONNECT_FAILED:
X  		pprintf("%s\n",result);
X  		iv[0] = 1;
X
X--- 656,662 -----
X  			goto START_RCVR_PROCESS;
X  		}
X  		setcolor(colors_error);
X+ #ifdef WHT
X  CONNECT_FAILED:
X  #endif
X  		pprintf("%s\n",result);
X***************
X*** 657,662
X  		}
X  		setcolor(colors_error);
X  CONNECT_FAILED:
X  		pprintf("%s\n",result);
X  		iv[0] = 1;
X  		DCE_report_iv_set(0);
X
X--- 658,664 -----
X  		setcolor(colors_error);
X  #ifdef WHT
X  CONNECT_FAILED:
X+ #endif
X  		pprintf("%s\n",result);
X  		iv[0] = 1;
X  		DCE_report_iv_set(0);
X***************
X*** 749,755
X  	DCE_hangup();
X  	while(retries--)
X  	{
X- 	register itmp;
X  
X  #ifdef AUTO_DIAL_PROC
X  		if(!isdigit(shm->Llogical[0]) && find_procedure(shm->Llogical))
X
X--- 751,756 -----
X  	DCE_hangup();
X  	while(retries--)
X  	{
X  
X  #ifdef AUTO_DIAL_PROC
X  		if(!isdigit(shm->Llogical[0]) && find_procedure(shm->Llogical))
X*** /u4/src/ecu3/ecufinsert.c	Mon Dec 24 22:28:00 1990
X--- ecufinsert.c	Tue Jan  1 21:43:01 1991
X***************
X*** 62,67
X  file_insert_clear_xoff()
X  {
X  #ifdef USE_XON_XOFF
X  ulong colors_at_entry = colors_current;
X  
X  	lclear_xmtr_xoff();
X
X--- 62,68 -----
X  file_insert_clear_xoff()
X  {
X  #ifdef USE_XON_XOFF
X+ #ifdef SAY_CLEARED_XOFF
X  ulong colors_at_entry = colors_current;
X  
X  	setcolor(colors_alert);
X***************
X*** 64,71
X  #ifdef USE_XON_XOFF
X  ulong colors_at_entry = colors_current;
X  
X- 	lclear_xmtr_xoff();
X- #ifdef SAY_CLEARED_XOFF
X  	setcolor(colors_alert);
X  	fputs("--> local XOFF cleared\r",se);
X  	setcolor(colors_at_entry);
X
X--- 65,70 -----
X  #ifdef SAY_CLEARED_XOFF
X  ulong colors_at_entry = colors_current;
X  
X  	setcolor(colors_alert);
X  	fputs("--> local XOFF cleared\r",se);
X  	setcolor(colors_at_entry);
X***************
X*** 70,75
X  	fputs("--> local XOFF cleared\r",se);
X  	setcolor(colors_at_entry);
X  #endif
X  #endif
X  }	/* end of file_insert_clear_xoff */
X  
X
X--- 69,75 -----
X  	fputs("--> local XOFF cleared\r",se);
X  	setcolor(colors_at_entry);
X  #endif
X+ 	lclear_xmtr_xoff();
X  #endif
X  }	/* end of file_insert_clear_xoff */
X  
X*** /u4/src/ecu3/ecufork.c	Mon Dec 24 22:29:00 1990
X--- ecufork.c	Tue Jan  1 20:49:09 1991
X***************
X*** 59,64
X  register shellpid;
X  register itmp;
X  register char *cptr;
X  char s40[40];
X  int wait_status;
X  
X
X--- 59,65 -----
X  register shellpid;
X  register itmp;
X  register char *cptr;
X+ #if defined(FORK_DEBUG)
X  char s40[40];
X  #endif
X  int wait_status;
X***************
X*** 60,65
X  register itmp;
X  register char *cptr;
X  char s40[40];
X  int wait_status;
X  
X  int rcvr_alive = (rcvr_pid > 0);
X
X--- 61,67 -----
X  register char *cptr;
X  #if defined(FORK_DEBUG)
X  char s40[40];
X+ #endif
X  int wait_status;
X  
X  int rcvr_alive = (rcvr_pid > 0);
X***************
X*** 237,243
X  int rcvr_alive = (rcvr_pid > 0);
X  int old_ttymode = get_ttymode();
X  int wait_status = 0;
X- extern int errno;
X  char *strrchr();
X  
X  #if defined(FORK_DEBUG)
X
X--- 239,244 -----
X  int rcvr_alive = (rcvr_pid > 0);
X  int old_ttymode = get_ttymode();
X  int wait_status = 0;
X  char *strrchr();
X  
X  #if defined(FORK_DEBUG)
X*** /u4/src/ecu3/ecuicmhelp.c	Mon Dec 24 22:29:00 1990
X--- ecuicmhelp.c	Tue Jan  1 21:51:29 1991
X***************
X*** 318,324
X  char **arg;
X  {
X  register char *cptr;
X- char s128[128];
X  char *getenv();
X  
X  	ff(se,"\r\n");
X
X--- 318,323 -----
X  char **arg;
X  {
X  register char *cptr;
X  char *getenv();
X  
X  	ff(se,"\r\n");
X*** /u4/src/ecu3/ecuicmhist.c	Mon Dec 24 22:29:00 1990
X--- ecuicmhist.c	Tue Jan  1 21:51:30 1991
X***************
X*** 52,58
X  
X  	if(!icmdh)
X  		return;
X! 	if(!(icmdh->icmd = strdup(icmd_buf)))
X  	{
X  		free((char *)icmdh);
X  		return;
X
X--- 52,58 -----
X  
X  	if(!icmdh)
X  		return;
X! 	if(!(icmdh->icmd = (uchar *)strdup(icmd_buf)))
X  	{
X  		free((char *)icmdh);
X  		return;
X*** /u4/src/ecu3/eculine.c	Mon Dec 24 22:30:00 1990
X--- eculine.c	Tue Jan  1 21:44:36 1991
X***************
X*** 69,78
X  uint rchar;
X  register int echo;
X  {
X- extern int rcvr_log;
X- extern FILE *rcvr_log_fp;
X- extern char rcvr_log_file[];	/* if rcvr_log!= 0,log filename */
X- 
X  	if(process_rcvd_char(rchar))
X  		return;
X  
X
X--- 69,74 -----
X  uint rchar;
X  register int echo;
X  {
X  	if(process_rcvd_char(rchar))
X  		return;
X  
X*** /u4/src/ecu3/ecuphone.c	Mon Dec 24 22:32:00 1990
X--- ecuphone.c	Tue Jan  1 21:51:31 1991
X***************
X*** 588,593
X  			(pde_marked_for_redial_count == 1) ? "y" : "ies");
X  		wstandend(dirw);
X  	}
X  }	/* end of dirw_display_config */
X  
X  /*+-----------------------------------------------------------------------
X
X--- 588,594 -----
X  			(pde_marked_for_redial_count == 1) ? "y" : "ies");
X  		wstandend(dirw);
X  	}
X+ 	return(0);
X  }	/* end of dirw_display_config */
X  
X  /*+-----------------------------------------------------------------------
X***************
X*** 1010,1016
X  void
X  pde_cmd_down()
X  {
X- register itmp;
X  register PDE *tpde;
X  
X  	if((!curr_pde) || (curr_pde->next == (PDE *)0))
X
X--- 1011,1016 -----
X  void
X  pde_cmd_down()
X  {
X  register PDE *tpde;
X  
X  	if((!curr_pde) || (curr_pde->next == (PDE *)0))
X***************
X*** 1051,1056
X  	pde_add_or_edit_read(prompt,edit,x,buf,max,delim)
X  max must not wrap around to another line
X  --------------------------------------------------------------------------*/
X  pde_add_or_edit_read(prompt,edit,x,buf,max,delim)
X  char *prompt;
X  int edit;
X
X--- 1051,1057 -----
X  	pde_add_or_edit_read(prompt,edit,x,buf,max,delim)
X  max must not wrap around to another line
X  --------------------------------------------------------------------------*/
X+ void
X  pde_add_or_edit_read(prompt,edit,x,buf,max,delim)
X  char *prompt;
X  int edit;
X***************
X*** 1115,1121
X  register PDE *tpde;
X  int edit;
X  {
X- register itmp;
X  int input_state = 0;
X  int changed;
X  char s50[50];
X
X--- 1116,1121 -----
X  register PDE *tpde;
X  int edit;
X  {
X  int input_state = 0;
X  int changed;
X  char s50[50];
X***************
X*** 1320,1327
X  pde_cmd_add(tpde)
X  register PDE *tpde;
X  {
X- register itmp;
X- 
X  	if(tpde)
X  	{
X  		pde_list_add(tpde);
X
X--- 1320,1325 -----
X  pde_cmd_add(tpde)
X  register PDE *tpde;
X  {
X  	if(tpde)
X  	{
X  		pde_list_add(tpde);
X***************
X*** 1436,1443
X  void
X  pde_cmd_remove()
X  {
X- register itmp;
X- register PDE *tpde;
X  char s80[80];
X  
X  	if(!check_curr_pde())
X
X--- 1434,1439 -----
X  void
X  pde_cmd_remove()
X  {
X  char s80[80];
X  
X  	if(!check_curr_pde())
X***************
X*** 1466,1472
X  void
X  pde_cmd_find()
X  {
X- register itmp;
X  register PDE *tpde;
X  char findname[12];
X  char delim;
X
X--- 1462,1467 -----
X  void
X  pde_cmd_find()
X  {
X  register PDE *tpde;
X  char findname[12];
X  char delim;
X***************
X*** 1495,1500
X  /*+-------------------------------------------------------------------------
X  	pde_cmd_change_dir()
X  --------------------------------------------------------------------------*/
X  pde_cmd_change_dir()
X  {
X  register itmp;
X
X--- 1490,1496 -----
X  /*+-------------------------------------------------------------------------
X  	pde_cmd_change_dir()
X  --------------------------------------------------------------------------*/
X+ void
X  pde_cmd_change_dir()
X  {
X  int itmp;
X***************
X*** 1497,1504
X  --------------------------------------------------------------------------*/
X  pde_cmd_change_dir()
X  {
X! register itmp;
X! register PDE *tpde;
X  char newdirname[256];
X  char buf[256];
X  char delim;
X
X--- 1493,1499 -----
X  void
X  pde_cmd_change_dir()
X  {
X! int itmp;
X  char newdirname[256];
X  char buf[256];
X  char delim;
X***************
X*** 1528,1535
X  	}
X  	if(find_shell_chars(newdirname))
X  	{
X- 	char *expcmd;
X- 
X  		if(expand_cmd_with_wildlist(newdirname,&expcmd))
X  		{
X  			dirw_bot_msg(expcmd);
X
X--- 1523,1528 -----
X  	}
X  	if(find_shell_chars(newdirname))
X  	{
X  		if(expand_cmd_with_wildlist(newdirname,&expcmd))
X  		{
X  			dirw_bot_msg(expcmd);
X***************
X*** 1724,1729
X  /*+-------------------------------------------------------------------------
X  	pde_cmd_set_wait()
X  --------------------------------------------------------------------------*/
X  pde_cmd_set_wait()
X  {
X  char buf[64];
X
X--- 1717,1723 -----
X  /*+-------------------------------------------------------------------------
X  	pde_cmd_set_wait()
X  --------------------------------------------------------------------------*/
X+ void
X  pde_cmd_set_wait()
X  {
X  char buf[64];
X*** /u4/src/ecu3/ecurcvr.c	Wed Dec 26 05:15:00 1990
X--- ecurcvr.c	Tue Jan  1 21:02:41 1991
X***************
X*** 8,20
X  /* #define ANSI_DEBUG_NOBUF */	/* unbufferred logging */
X  /* #define ANSI_DEBUG_LOGFILE	"/dev/tty2h" */
X  /* #define DEBUG_CURSOR */
X- #ifdef TEMP_HACK
X- #define ANSI_DEBUG
X- #define ANSI_DEBUG_2
X- #define ANSI_DEBUG_3
X- #define ANSI_DEBUG_LOGFILE	"/t/ansi.log"
X- #endif
X- 
X  /*+-------------------------------------------------------------------------
X  	ecurcvr.c - rcvr process + ANSI filter + non-ANSI<->ANSI hoop jumping
X  	wht at n4hgf.Mt-Park.GA.US
X
X--- 8,13 -----
X  /* #define ANSI_DEBUG_NOBUF */	/* unbufferred logging */
X  /* #define ANSI_DEBUG_LOGFILE	"/dev/tty2h" */
X  /* #define DEBUG_CURSOR */
X  /*+-------------------------------------------------------------------------
X  	ecurcvr.c - rcvr process + ANSI filter + non-ANSI<->ANSI hoop jumping
X  	wht at n4hgf.Mt-Park.GA.US
X***************
X*** 56,61
X  
X  --------------------------------------------------------------------------*/
X  /*+:EDITS:*/
X  /*:12-21-1990-21:06-wht at n4hgf-CUF and CUB set non-ansi cursor incorrectly */
X  /*:12-20-1990-16:27-wht at n4hgf-had SU and SD swapped */
X  /*:11-30-1990-18:39-wht at n4hgf-non-ansi console rcvr appears to be working */
X
X--- 49,55 -----
X  
X  --------------------------------------------------------------------------*/
X  /*+:EDITS:*/
X+ /*:12-26-1990-14:32-wht at n4hgf-use memset in spaces() */
X  /*:12-21-1990-21:06-wht at n4hgf-CUF and CUB set non-ansi cursor incorrectly */
X  /*:12-20-1990-16:27-wht at n4hgf-had SU and SD swapped */
X  /*:11-30-1990-18:39-wht at n4hgf-non-ansi console rcvr appears to be working */
X***************
X*** 100,105
X  FILE *wfp = (FILE *)0;
X  #endif
X  
X  /*+-------------------------------------------------------------------------
X  	redisplay_rcvr_screen() - redisplay logical receiver screen
X  As of writing, this function is called only by the XMTR process
X
X--- 94,120 -----
X  FILE *wfp = (FILE *)0;
X  #endif
X  
X+ extern int tty_is_multiscreen;
X+ uchar non_multiscreen_hi_map[128] =
X+ {
X+ /*80*/	'c','u','e','a','a','a','a','c',  /* the main purpose of this ... */
X+ /*88*/	'e','e','e','i','i','i','a','a',  /* ... is to map ruling ... */
X+ /*90*/	'e','e','a','a','a','o','u','u',  /* ... characters, but as ...*/
X+ /*98*/	'y','o','u','X','#','Y','P','f',  /* ... a side effect, also map ... */
X+ /*A0*/	'a','i','o','u','n','n','a','o',  /* ... others to reasonable, ... */
X+ /*A8*/	'?','-','-','%','%','|','<','>',  /* ... near, amusing, or random ... */
X+ /*B0*/	'#','#','#','|','+','+','+','.',  /* ... printing characters as well */
X+ /*B8*/	'.','+','|','.','\'','\'','\'','.',
X+ /*C0*/	'`','+','+','+','-','+','+','+',
X+ /*C8*/	'`','.','+','+','+','=','+','+',
X+ /*D0*/	'+','+','+','`','`','.','.','+',
X+ /*D8*/	'+','\'','.','#','_','|','|','-',
X+ /*E0*/	'a','b','F','T','E','o','u','t',
X+ /*E8*/	'I','0','O','o','o','o','e','n',
X+ /*F0*/	'=','+','>','<','f','j','%','=',
X+ /*F8*/	'o','.','.','V','n','2','*',' '
X+ };
X+ 
X  /*+-------------------------------------------------------------------------
X  	redisplay_rcvr_screen() - redisplay logical receiver screen
X  As of writing, this function is called only by the XMTR process
X***************
X*** 115,122
X  	{
X  		tcap_cursor(y,0);
X  		fwrite(&shm->screen[y][0],
X! 			((y != tcap_LINES - 1) ? tcap_COLS : tcap_COLS - 1),
X! 			1,se);
X  	}
X  	tcap_eeol();
X  	tcap_cursor(shm->cursor_y,shm->cursor_x);
X
X--- 130,136 -----
X  	{
X  		tcap_cursor(y,0);
X  		fwrite(&shm->screen[y][0],
X! 			((y != tcap_LINES - 1) ? tcap_COLS : tcap_COLS - 1),1,se);
X  	}
X  	tcap_eeol();
X  	tcap_cursor(shm->cursor_y,shm->cursor_x);
X***************
X*** 143,148
X  
X  /*+-------------------------------------------------------------------------
X  	spaces(buf,buflen) - fill with spaces
X  --------------------------------------------------------------------------*/
X  void
X  spaces(buf,buflen)
X
X--- 157,164 -----
X  
X  /*+-------------------------------------------------------------------------
X  	spaces(buf,buflen) - fill with spaces
X+ 
X+   use Duff's Device
X  --------------------------------------------------------------------------*/
X  void
X  spaces(buf,buflen)
X***************
X*** 147,153
X  void
X  spaces(buf,buflen)
X  register uchar *buf;
X! register uint buflen;
X  {
X  #ifdef DEBUG_CURSOR
X  	if((ulong)buf > (((ulong)shm->screen) + LINESxCOLS))
X
X--- 163,169 -----
X  void
X  spaces(buf,buflen)
X  register uchar *buf;
X! uint buflen;
X  {
X  #ifdef DEBUG_CURSOR
X  	if((ulong)buf > (((ulong)shm->screen) + LINESxCOLS))
X***************
X*** 170,177
X  		return;
X  #endif
X  
X! 	while(buflen--)
X! 		*buf++ = ' ';
X  }	/* end of spaces */
X  
X  /*+-------------------------------------------------------------------------
X
X--- 186,193 -----
X  		return;
X  #endif
X  
X! 	memset(buf,SPACE,buflen);
X! 
X  }	/* end of spaces */
X  
X  /*+-------------------------------------------------------------------------
X***************
X*** 235,241
X  
X  	if(!tty_is_ansi)
X  	{
X! 		cptr = ansibuf;
X  		while(token = str_token(cptr,";"))
X  		{
X  			cptr = (char *)0;	/* further calls to str_token need NULL */
X
X--- 251,260 -----
X  
X  	if(!tty_is_ansi)
X  	{
X! 		ansibuf[ansilen - 1] = 0;	/* get rid of 'm' */
X! 		cptr = ansibuf + 1;			/* get rid of '[' */
X! 		if(!strlen(cptr))
X! 			goto SGR_0;
X  		while(token = str_token(cptr,";"))
X  		{
X  			cptr = (char *)0;	/* further calls to str_token need NULL */
X***************
X*** 242,247
X  			switch(atoi(token))
X  			{
X  				case 0:		/* normal */
X  					tcap_stand_end();
X  					tcap_blink_off();
X  					tcap_underscore_off();
X
X--- 261,267 -----
X  			switch(atoi(token))
X  			{
X  				case 0:		/* normal */
X+ SGR_0:
X  					tcap_stand_end();
X  					tcap_blink_off();
X  					tcap_underscore_off();
X***************
X*** 1069,1074
X  /*+-------------------------------------------------------------------------
X  	process_rcvd_char(rchar)
X  --------------------------------------------------------------------------*/
X  process_rcvd_char(rchar)
X  register uint rchar;
X  {
X
X--- 1089,1095 -----
X  /*+-------------------------------------------------------------------------
X  	process_rcvd_char(rchar)
X  --------------------------------------------------------------------------*/
X+ int
X  process_rcvd_char(rchar)
X  register uint rchar;
X  {
X***************
X*** 1213,1219
X  void
X  rcvr()
X  {
X- register itmp;
X  uchar rchar;
X  uchar nlchar = NL;
X  char *cptr;
X
X--- 1234,1239 -----
X  void
X  rcvr()
X  {
X  uchar rchar;
X  uchar nlchar = NL;
X  
X***************
X*** 1216,1222
X  register itmp;
X  uchar rchar;
X  uchar nlchar = NL;
X- char *cptr;
X  
X  #ifdef ANSI_DEBUG
X  char s80[80];
X
X--- 1236,1241 -----
X  {
X  uchar rchar;
X  uchar nlchar = NL;
X  
X  #ifdef ANSI_DEBUG
X  char s80[80];
X***************
X*** 1255,1261
X  	saved_cursor_y = shm->cursor_y;
X  	saved_cursor_x = shm->cursor_x;
X  
X! 	while(1)		/* receive loop - keep tight as possible! */
X  	{
X  		rchar = lgetc_rcvr();
X  
X
X--- 1274,1281 -----
X  	saved_cursor_y = shm->cursor_y;
X  	saved_cursor_x = shm->cursor_x;
X  
X! /* receive loop - keep tight as possible! */
X! 	if(tty_is_multiscreen)
X  	{
X  		while(1)
X  		{
X***************
X*** 1257,1263
X  
X  	while(1)		/* receive loop - keep tight as possible! */
X  	{
X! 		rchar = lgetc_rcvr();
X  
X  		if(process_rcvd_char(rchar))
X  			continue;
X
X--- 1277,1285 -----
X  /* receive loop - keep tight as possible! */
X  	if(tty_is_multiscreen)
X  	{
X! 		while(1)
X! 		{
X! 			rchar = lgetc_rcvr();
X  
X  			if(process_rcvd_char(rchar))
X  				continue;
X***************
X*** 1259,1266
X  	{
X  		rchar = lgetc_rcvr();
X  
X! 		if(process_rcvd_char(rchar))
X! 			continue;
X  
X  		write(TTYERR,&rchar,1);
X  
X
X--- 1281,1288 -----
X  		{
X  			rchar = lgetc_rcvr();
X  
X! 			if(process_rcvd_char(rchar))
X! 				continue;
X  
X  			write(TTYERR,&rchar,1);
X  
X***************
X*** 1262,1268
X  		if(process_rcvd_char(rchar))
X  			continue;
X  
X! 		write(TTYERR,&rchar,1);
X  
X  		if(shm->Ladd_nl_incoming && (rchar == CR))
X  			write(TTYERR,&nlchar,1);
X
X--- 1284,1290 -----
X  			if(process_rcvd_char(rchar))
X  				continue;
X  
X! 			write(TTYERR,&rchar,1);
X  
X  			if(shm->Ladd_nl_incoming && (rchar == CR))
X  				write(TTYERR,&nlchar,1);
X***************
X*** 1264,1271
X  
X  		write(TTYERR,&rchar,1);
X  
X! 		if(shm->Ladd_nl_incoming && (rchar == CR))
X! 			write(TTYERR,&nlchar,1);
X  
X  	}
X  }	/* end of rcvr */
X
X--- 1286,1300 -----
X  
X  			write(TTYERR,&rchar,1);
X  
X! 			if(shm->Ladd_nl_incoming && (rchar == CR))
X! 				write(TTYERR,&nlchar,1);
X! 		}
X! 	}
X! 	else
X! 	{
X! 		while(1)
X! 		{
X! 			rchar = lgetc_rcvr();
X  
X  			if(rchar >= 0x80)
X  				rchar = non_multiscreen_hi_map[rchar - 0x80];
X***************
X*** 1267,1272
X  		if(shm->Ladd_nl_incoming && (rchar == CR))
X  			write(TTYERR,&nlchar,1);
X  
X  	}
X  }	/* end of rcvr */
X  
X
X--- 1296,1312 -----
X  		{
X  			rchar = lgetc_rcvr();
X  
X+ 			if(rchar >= 0x80)
X+ 				rchar = non_multiscreen_hi_map[rchar - 0x80];
X+ 
X+ 			if(process_rcvd_char(rchar))
X+ 				continue;
X+ 
X+ 			write(TTYERR,&rchar,1);
X+ 
X+ 			if(shm->Ladd_nl_incoming && (rchar == CR))
X+ 				write(TTYERR,&nlchar,1);
X+ 		}
X  	}
X  }	/* end of rcvr */
X  
X*** /u4/src/ecu3/ecushm.c	Mon Dec 24 22:33:00 1990
X--- ecushm.c	Tue Jan  1 21:03:03 1991
X***************
X*** 108,113
X  	shmx_rc_report(prcvr_chars,prcvr_chars_this_connect)
X   xmtr calls to get rcvr stats
X  --------------------------------------------------------------------------*/
X  shmx_rc_report(prcvd_chars,prcvd_chars_this_connect)
X  long *prcvd_chars;
X  long *prcvd_chars_this_connect;
X
X--- 108,114 -----
X  	shmx_rc_report(prcvr_chars,prcvr_chars_this_connect)
X   xmtr calls to get rcvr stats
X  --------------------------------------------------------------------------*/
X+ void
X  shmx_rc_report(prcvd_chars,prcvd_chars_this_connect)
X  long *prcvd_chars;
X  long *prcvd_chars_this_connect;
X*** /u4/src/ecu3/ecusighdl.c	Mon Dec 24 22:33:00 1990
X--- ecusighdl.c	Tue Jan  1 21:06:57 1991
X***************
X*** 73,78
X  start_rcvr_process(notify_flag)
X  int notify_flag;
X  {
X  char s40[40];
X  extern ulong colors_current;
X  ulong colors_at_entry = colors_current;
X
X--- 73,79 -----
X  start_rcvr_process(notify_flag)
X  int notify_flag;
X  {
X+ #if defined(FORK_DEBUG)
X  char s40[40];
X  #endif
X  extern ulong colors_current;
X***************
X*** 74,79
X  int notify_flag;
X  {
X  char s40[40];
X  extern ulong colors_current;
X  ulong colors_at_entry = colors_current;
X  
X
X--- 75,81 -----
X  {
X  #if defined(FORK_DEBUG)
X  char s40[40];
X+ #endif
X  extern ulong colors_current;
X  ulong colors_at_entry = colors_current;
X  
X***************
X*** 115,127
X  		xmtr_signals();
X  		return(rcvr_pid);
X  	}
X! 	else
X! 	{
X! 		rcvr_pid = -1;		/* no receiver active */
X! 		ff(se,"\r\n\ncould not fork for receive\r\n");
X! 		hangup(HANGUP_NO_FORK_FOR_RCVR);
X! 		/*NOTREACHED*/
X! 	}
X  }	/* end of start_rcvr_process */
X  
X  /*+-----------------------------------------------------------------------
X
X--- 117,127 -----
X  		xmtr_signals();
X  		return(rcvr_pid);
X  	}
X! 	rcvr_pid = -1;		/* no receiver active */
X! 	ff(se,"\r\n\ncould not fork for receive\r\n");
X! 	hangup(HANGUP_NO_FORK_FOR_RCVR);
X! 	/*NOTREACHED*/
X! 
X  }	/* end of start_rcvr_process */
X  
X  /*+-----------------------------------------------------------------------
X*** /u4/src/ecu3/ecutty.c	Mon Dec 24 22:34:00 1990
X--- ecutty.c	Tue Jan  1 22:08:07 1991
X***************
X*** 69,75
X  	XFhome		/* KDEk_HOME */
X  };
X  
X! static char *dole_out_rd_char = (char *)0;
X  
X  extern int interrupt;
X  extern uint tcap_LINES;
X
X--- 69,75 -----
X  	XFhome		/* KDEk_HOME */
X  };
X  
X! static uchar *dole_out_rd_char = (uchar *)0;
X  
X  extern int interrupt;
X  extern uint tcap_LINES;
X***************
X*** 561,567
X  	ioctl(TTYIN,TCXONC,(char *)1);	/* restart tty output */
X  
X  #if defined(M_XENIX) || defined(M_UNIX)
X! 	dole_out_rd_char = (char *)0;	/* see ttygetc() */
X  #endif
X  
X  }	/* end of ttyflush */
X
X--- 561,567 -----
X  	ioctl(TTYIN,TCXONC,(char *)1);	/* restart tty output */
X  
X  #if defined(M_XENIX) || defined(M_UNIX)
X! 	dole_out_rd_char = (uchar *)0;	/* see ttygetc() */
X  #endif
X  
X  }	/* end of ttyflush */
X***************
X*** 590,596
X  
X  	if(dole_out_rd_char)		/* handle (very unlikely) FAST typist */
X  	{
X! 		if(itmp = *dole_out_rd_char++)
X  			return(itmp);
X  		else
X  			dole_out_rd_char = (char *)0;
X
X--- 590,596 -----
X  
X  	if(dole_out_rd_char)		/* handle (very unlikely) FAST typist */
X  	{
X! 		if(itmp = (uint)*dole_out_rd_char++)
X  			return(itmp);
X  		else
X  			dole_out_rd_char = (uchar *)0;
X***************
X*** 593,599
X  		if(itmp = *dole_out_rd_char++)
X  			return(itmp);
X  		else
X! 			dole_out_rd_char = (char *)0;
X  	}
X  
X  GET_KEY:
X
X--- 593,599 -----
X  		if(itmp = (uint)*dole_out_rd_char++)
X  			return(itmp);
X  		else
X! 			dole_out_rd_char = (uchar *)0;
X  	}
X  
X  GET_KEY:
X*** /u4/src/ecu3/ecuutil.c	Mon Dec 24 22:35:00 1990
X--- ecuutil.c	Tue Jan  1 22:18:37 1991
X***************
X*** 31,36
X  
X  ------------------------------------------------------------------------*/
X  /*+:EDITS:*/
X  /*:12-04-1990-00:58-wht at n4hgf-allow alternating between str/arg_token */
X  /*:08-14-1990-20:40-wht at n4hgf-ecu3.00-flush old edit history */
X  
X
X--- 31,37 -----
X  
X  ------------------------------------------------------------------------*/
X  /*+:EDITS:*/
X+ /*:12-26-1990-14:32-wht at n4hgf-use memmove or Duff's Device in mem_cpy() */
X  /*:12-04-1990-00:58-wht at n4hgf-allow alternating between str/arg_token */
X  /*:08-14-1990-20:40-wht at n4hgf-ecu3.00-flush old edit history */
X  
X***************
X*** 52,57
X  
X  /*+-------------------------------------------------------------------------
X  	mem_cpy(dest,src,len) - memcpy() with non-destructive overlapping copy
X  --------------------------------------------------------------------------*/
X  void
X  mem_cpy(dest,src,len)
X
X--- 53,60 -----
X  
X  /*+-------------------------------------------------------------------------
X  	mem_cpy(dest,src,len) - memcpy() with non-destructive overlapping copy
X+ 
X+   use Duff's device for speed if memmove not available
X  --------------------------------------------------------------------------*/
X  void
X  mem_cpy(dest,src,len)
X***************
X*** 59,64
X  register char *src;
X  register len;
X  {
X  	if(dest > src)
X  	{
X  		dest += len;
X
X--- 62,71 -----
X  register char *src;
X  register len;
X  {
X+ #ifndef DUFF
X+ 	memmove(dest,src,len);
X+ #else	/* for systems without memmove */
X+ 	register itmp = (len + 7) / 8;
X  	if(dest > src)
X  	{
X  		dest += len;
X***************
X*** 63,70
X  	{
X  		dest += len;
X  		src += len;
X! 		while(len--)
X! 			*--dest = *--src;
X  	}
X  	else
X  	{
X
X--- 70,87 -----
X  	{
X  		dest += len;
X  		src += len;
X! 		switch(len % 8)
X! 		{
X! 		case 0:	do{	*--dest = *--src;
X! 		case 7:		*--dest = *--src;
X! 		case 6:		*--dest = *--src;
X! 		case 5:		*--dest = *--src;
X! 		case 4:		*--dest = *--src;
X! 		case 3:		*--dest = *--src;
X! 		case 2:		*--dest = *--src;
X! 		case 1:		*--dest = *--src;
X! 			 	}while (--itmp > 0);
X! 		}
X  	}
X  	else
X  	{
X***************
X*** 68,75
X  	}
X  	else
X  	{
X! 		while(len--)
X! 			*dest++ = *src++;
X  	}
X  }	/* end of mem_cpy */
X  
X
X--- 85,102 -----
X  	}
X  	else
X  	{
X! 		switch(len % 8)
X! 		{
X! 		case 0:	do{	*dest++ = *src++;
X! 		case 7:		*dest++ = *src++;
X! 		case 6:		*dest++ = *src++;
X! 		case 5:		*dest++ = *src++;
X! 		case 4:		*dest++ = *src++;
X! 		case 3:		*dest++ = *src++;
X! 		case 2:		*dest++ = *src++;
X! 		case 1:		*dest++ = *src++;
X! 			 	}while (--itmp > 0);
X! 		}
X  	}
X  #endif
X  }	/* end of mem_cpy */
X***************
X*** 71,76
X  		while(len--)
X  			*dest++ = *src++;
X  	}
X  }	/* end of mem_cpy */
X  
X  /*+-------------------------------------------------------------------------
X
X--- 98,104 -----
X  			 	}while (--itmp > 0);
X  		}
X  	}
X+ #endif
X  }	/* end of mem_cpy */
X  
X  /*+-------------------------------------------------------------------------
X***************
X*** 74,80
X  }	/* end of mem_cpy */
X  
X  /*+-------------------------------------------------------------------------
X! 	errno_text(errno)
X  --------------------------------------------------------------------------*/
X  char *
X  errno_text(errno)
X
X--- 102,108 -----
X  }	/* end of mem_cpy */
X  
X  /*+-------------------------------------------------------------------------
X! 	errno_text(err_no)
X  --------------------------------------------------------------------------*/
X  char *
X  errno_text(err_no)
X***************
X*** 77,84
X  	errno_text(errno)
X  --------------------------------------------------------------------------*/
X  char *
X! errno_text(errno)
X! int errno;
X  {
X  static char errant[16];
X  
X
X--- 105,112 -----
X  	errno_text(err_no)
X  --------------------------------------------------------------------------*/
X  char *
X! errno_text(err_no)
X! int err_no;
X  {
X  static char errant[16];
X  
X***************
X*** 82,88
X  {
X  static char errant[16];
X  
X! 	switch(errno)
X  	{
X  		case 0: return("0");
X  		case EPERM: return("EPERM");
X
X--- 110,116 -----
X  {
X  static char errant[16];
X  
X! 	switch(err_no)
X  	{
X  		case 0: return("0");
X  		case EPERM: return("EPERM");
X***************
X*** 195,202
X  char *parsestr;
X  char *termchars;
X  {
X- register int first = 1;
X- register char *termptr;
X  register char *parseptr;
X  char *token;
X  
X
X--- 223,228 -----
X  char *parsestr;
X  char *termchars;
X  {
X  register char *parseptr;
X  char *token;
X  
X*** /u4/src/ecu3/ecuwinutil.c	Mon Dec 24 22:36:00 1990
X--- ecuwinutil.c	Tue Jan  1 21:51:32 1991
X***************
X*** 113,131
X  #endif
X  	windows_active = 1;
X  
X- #ifdef WHT
X- 	if(!tty_is_ansi)
X- 	{
X- 		sTL = vanilla_TL;
X- 		sTR = vanilla_TR;
X- 		sBL = vanilla_BL;
X- 		sBR = vanilla_BR;
X- 		sLT = vanilla_LT;
X- 		sRT = vanilla_RT;
X- 		sVR = vanilla_VR;
X- 		sHR = vanilla_HR;
X- 	}
X- #else
X  	if(!tty_is_multiscreen)
X  	{
X  		sTL = vanilla_TL;
X
X--- 113,118 -----
X  #endif
X  	windows_active = 1;
X  
X  	if(!tty_is_multiscreen)
X  	{
X  		sTL = vanilla_TL;
X***************
X*** 137,143
X  		sVR = vanilla_VR;
X  		sHR = vanilla_HR;
X  	}
X- #endif
X  
X  }	/* end of windows_start */
X  
X
X--- 124,129 -----
X  		sVR = vanilla_VR;
X  		sHR = vanilla_HR;
X  	}
X  
X  }	/* end of windows_start */
X  
X*** /u4/src/ecu3/ecuxenix.c	Mon Dec 24 22:36:00 1990
X--- ecuxenix.c	Tue Jan  1 21:35:04 1991
X***************
X*** 327,333
X  int morse_frequency = 600;
X  char morse_char;
X  static int morse_ticks = 0;
X- extern int errno;
X  
X  	if(!tty_is_multiscreen)
X  	{
X
X--- 327,332 -----
X  int morse_frequency = 600;
X  char morse_char;
X  static int morse_ticks = 0;
X  
X  	if(!tty_is_multiscreen)
X  	{
X***************
X*** 332,338
X  	if(!tty_is_multiscreen)
X  	{
X  		ring_bell();
X! 		return;
X  	}
X  
X  	if(!morse_ticks)
X
X--- 331,337 -----
X  	if(!tty_is_multiscreen)
X  	{
X  		ring_bell();
X! 		return(0);
X  	}
X  
X  	if(!morse_ticks)
X***************
X*** 403,410
X  
X  /*+-------------------------------------------------------------------------
X  	bell_alarm(xbell_type)
X!   Under XENIX 2.2.1, ring bell on multiscreens;
X!   if morse driver included, use it
X  --------------------------------------------------------------------------*/
X  int
X  bell_alarm(xbell_type)
X
X--- 402,408 -----
X  
X  /*+-------------------------------------------------------------------------
X  	bell_alarm(xbell_type)
X!   ring bell on multiscreens; if morse driver included, use it instead
X  --------------------------------------------------------------------------*/
X  int
X  bell_alarm(xbell_type)
X***************
X*** 413,419
X  register notify_fd;
X  register fork_pid;
X  static long notify_time = 0L;
X! char *ttname;
X  char devname[64];
X  int devnum;
X  int ttnum;
X
X--- 411,417 -----
X  register notify_fd;
X  register fork_pid;
X  static long notify_time = 0L;
X! char *get_ttyname();
X  char devname[64];
X  int devnum;
X  int ttnum;
X***************
X*** 422,428
X  	if(!tty_is_multiscreen)
X  	{
X  		ring_bell();
X! 		return;
X  	}
X  
X  /* if happened less than 15 secs ago, forget it */
X
X--- 420,426 -----
X  	if(!tty_is_multiscreen)
X  	{
X  		ring_bell();
X! 		return(0);
X  	}
X  
X  	ttnum = atoi(get_ttyname() + 8);
X***************
X*** 425,430
X  		return;
X  	}
X  
X  /* if happened less than 15 secs ago, forget it */
X  	if((time((long *)0) - notify_time) < 15L)
X  		return(0);
X
X--- 423,430 -----
X  		return(0);
X  	}
X  
X+ 	ttnum = atoi(get_ttyname() + 8);
X+ 
X  /* if happened less than 15 secs ago, forget it */
X  	if((time((long *)0) - notify_time) < 15L)
X  		return(0);
X***************
X*** 460,465
X  #if defined(MORSE)
X  	}
X  #endif
X  }	/* end of bell_alarm */
X  
X  /*+-------------------------------------------------------------------------
X
X--- 460,466 -----
X  #if defined(MORSE)
X  	}
X  #endif
X+ 	/*NOTREACHED*/
X  }	/* end of bell_alarm */
X  
X  /*+-------------------------------------------------------------------------
X***************
X*** 570,576
X  {
X  register itmp;
X  register char *cptr;
X- int iarg;
X  int mode = atoi(arg[1]);
X  LRWT lr;
X  char buf[1024];
X
X--- 571,576 -----
X  {
X  register itmp;
X  register char *cptr;
X  int mode = atoi(arg[1]);
X  LRWT lr;
X  char buf[1024];
X*** /u4/src/ecu3/ecuxfer.c	Mon Dec 24 22:37:00 1990
X--- ecuxfer.c	Tue Jan  1 21:51:33 1991
X***************
X*** 212,218
X  }	/* end of xfrw_get_single */
X  
X  /*+-------------------------------------------------------------------------
X! 	xfer_title_fragment(xfertype)
X  --------------------------------------------------------------------------*/
X  char *
X  xfer_title_fragment()
X
X--- 212,218 -----
X  }	/* end of xfrw_get_single */
X  
X  /*+-------------------------------------------------------------------------
X! 	xfer_title_fragment()
X  --------------------------------------------------------------------------*/
X  char *
X  xfer_title_fragment()
X***************
X*** 866,872
X  {
X  register itmp;
X  char execcmd[256];
X- int xfertype;
X  char bottom_label[64];
X  
X  	sprintf(bottom_label,"-C 'Connected to %s' ",
X
X--- 866,871 -----
X  {
X  register itmp;
X  char execcmd[256];
X  char bottom_label[64];
X  
X  	sprintf(bottom_label,"-C 'Connected to %s' ",
X*** /u4/src/ecu3/hdbintf.c	Mon Dec 24 22:39:00 1990
X--- hdbintf.c	Tue Jan  1 22:22:14 1991
X***************
X*** 65,70
X  ungetty_get_line()
X  {
X  int itmp;
X  char ungetty_log[80];
X  int ungetty_pid;
X  int (*original_sighdlr)();
X
X--- 65,71 -----
X  ungetty_get_line()
X  {
X  int itmp;
X+ #if defined(LOG_UNGETTY)
X  char ungetty_log[80];
X  #endif
X  int ungetty_pid;
X***************
X*** 66,71
X  {
X  int itmp;
X  char ungetty_log[80];
X  int ungetty_pid;
X  int (*original_sighdlr)();
X  int wait_status;
X
X--- 67,73 -----
X  int itmp;
X  #if defined(LOG_UNGETTY)
X  char ungetty_log[80];
X+ #endif
X  int ungetty_pid;
X  int (*original_sighdlr)();
X  int wait_status;
X***************
X*** 354,360
X  getdlent()
X  {
X  int itmp;
X- char *cptr;
X  #define MAX_DL_TOKENS 3
X  char *tokens[MAX_DL_TOKENS];
X  static struct dlent dle;
X
X--- 356,361 -----
X  getdlent()
X  {
X  int itmp;
X  #define MAX_DL_TOKENS 3
X  char *tokens[MAX_DL_TOKENS];
X  static struct dlent dle;
X*** /u4/src/ecu3/lint_args.h	Mon Dec 24 22:47:00 1990
X--- lint_args.h	Tue Jan  1 21:03:21 1991
X***************
X*** 135,143
X  int dirw_display_config(void);
X  int lookup_logical_telno(void);
X  int pde_add_or_edit(struct phone_directory_entry *,int );
X! int pde_add_or_edit_read(char *,int ,int ,char *,int ,char *);
X! int pde_cmd_change_dir(void);
X! int pde_cmd_set_wait(void);
X  int pde_dial(struct phone_directory_entry *);
X  int pde_dial_cycle(void);
X  int pde_display(int ,struct phone_directory_entry *,int );
X
X--- 135,143 -----
X  int dirw_display_config(void);
X  int lookup_logical_telno(void);
X  int pde_add_or_edit(struct phone_directory_entry *,int );
X! void pde_add_or_edit_read(char *,int ,int ,char *,int ,char *);
X! void pde_cmd_change_dir(void);
X! void pde_cmd_set_wait(void);
X  int pde_dial(struct phone_directory_entry *);
X  int pde_dial_cycle(void);
X  int pde_display(int ,struct phone_directory_entry *,int );
X***************
X*** 224,230
X  void setw_msg(char *,int ,char ,int *);
X  /* ecushm.c */
X  int shm_init(void);
X! int shmx_rc_report(long *,long *);
X  void shm_done(void);
X  void shmr_process_rcvr_SIGUSR2(void);
X  void shmr_set_xmtr_bn_1(void);
X
X--- 224,230 -----
X  void setw_msg(char *,int ,char ,int *);
X  /* ecushm.c */
X  int shm_init(void);
X! void shmx_rc_report(long *,long *);
X  void shm_done(void);
X  void shmr_process_rcvr_SIGUSR2(void);
X  void shmr_set_xmtr_bn_1(void);
SHAR_EOF
chmod 0644 PATCH01 ||
echo 'restore of PATCH01 failed'
Wc_c="`wc -c < 'PATCH01'`"
test 36829 -eq "$Wc_c" ||
	echo 'PATCH01: original size 36829, current size' "$Wc_c"
# ============= patchlevel.h ==============
echo 'x - extracting patchlevel.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'patchlevel.h' &&
X#define PATCHLEVEL 1
SHAR_EOF
chmod 0644 patchlevel.h ||
echo 'restore of patchlevel.h failed'
Wc_c="`wc -c < 'patchlevel.h'`"
test 21 -eq "$Wc_c" ||
	echo 'patchlevel.h: original size 21, current size' "$Wc_c"
# ============= Make.xgcc ==============
echo 'x - extracting Make.xgcc (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'Make.xgcc' &&
X#  CHK=0xF880
X#+-------------------------------------------------------------------
X# GCC Make.xgcc for ecu and related programs
X# wht at n4hgf.Mt-Park.GA.US
X#
X# This is an experimental make file for GCC 1.37.1 for UNIX 386 only
X# only ECU is made with GCC; the other make files will use (MSC) cc
X#
X# -traditional is used over -ansi because of at least the following
X# 1. SCO's curses.h file contains an apostrophe in a #error
X#    pseudo-statement and gcc barfs on it (even though the statement
X#    is not included)
X#
X# 2. gcc complains about passing an unsigned char * to strlen(); yuk
X#--------------------------------------------------------------------
X#+:EDITS:*/
X#:01-01-1991-20:30-wht at n4hgf-creation
X
XSHELL=/bin/sh
XCC = gcc
X
X#-------------------- configurable parameters -----------------------
X#--> set LBIN to your local bin directory path
XLBIN = /usr/local/bin
X
X#--> set ECUBINDIR to the desired location of the ecu library
X#    directory (normally /usr/lib/ecu)
X#ECULIBDIR = /usr/lib/ecu
XECULIBDIR = /usr/local/lib/ecu
X
X#--> leave commented unless you have my morse speaker driver
X#MORSE=-DMORSE
X
X#--> uncomment if you have the crypt library. NOTE: minimal use is
X#    made of crypt ... Read the note in README.  You probably want
X#    to leave this commented unless you want the best protection you
X#    can get against deviant mutant ninja hackers :-)
X#CRYPT=-DCRYPT
X#LCRYPT=-lcrypt
X
X#--> comment out if you have a working select(S) (for serial lines;
X#    2.3.1 has a broken one that may be fixable: see README; 2.3.2
X#    has a working select(S) for serial lines and a fix from SCO
X#    for pipes [ecu doesn't select() on pipes])
X#NOSEL=-DNO_SELECT
X
X#--> comment out if you do not want the automatic procedure execution
X#    feature when connecting to a system (see ecu.man dial command)
XADPROC=-DAUTO_DIAL_PROC
X#--------------------------------------------------------------------
X
X#make some composites based on above
XSYSTEM = UNIX/386
XU3C = -O -Wunused -Wswitch -Wcomment\
X      -Wshadow -Wpointer-arith -Wcast-qual\
X      -traditional -fstrength-reduce -fforce-mem -fforce-addr\
X      -DM_I386 -DM_UNIX -DM_SYSV
XCURSES = -DM_TERMCAP
XCURSES_LIB = -ltcap -ltermlib
X#ESIO=-DHAVE_ESIO
XCOMFLAGS = $(U3C)
XCFLAGS  = -g $(CURSES) $(CRYPT) $(MORSE) $(NOSEL) $(ADPROC) $(COMFLAGS) $(ESIO)
XLDFLAGS = -g -lx -lmalloc $(LCRYPT) $(CURSES_LIB)
X
XECUSHARNAME=ecu3
XMANSHARNAME=ecuman3
X
X.SUFFIXES:
X.SUFFIXES: .o .c .h .l
XSHELL = /bin/sh
X
X.c.o:;	/bin/time $(CC) -c $(CFLAGS) $*.c 
X
XSHARFLS = \
XREADME \
XANCIENTHISTORY \
XESOTERIC \
XMake.ecu *.c *.h \
Xhelp/Make.xgcc  help/*.{h,c,src} \
Xecufriend/{Make.xgcc,*.{c,h}} \
Xecuungetty/Make.xgcc ecuungetty/*.{c,h} \
Xmapkey/README mapkey/keys.usa.ecu.d\
Xbperr/bperr.c \
Xz/Make.xgcc z/*.{c,h} sea/Make.xgcc sea/*.{c,h,doc,imp} \
Xgendial/Make.xgcc  gendial/*.{h,c} \
Xxsel386/* \
Xshar.fls */*.fls \
Xckermit/* doc/{*.txt,runoff} models/* zgcc mkoldproto.l'
X
XSRC	= \
X	bamboozle.c\
X	cmdtbl.c\
X	expresp.c\
X	ecu.c\
X	ecuLCK.c\
X	ecuchdir.c\
X	ecudump.c\
X	ecufinsert.c\
X	ecufkey.c\
X	ecufork.c\
X	ecuDCE.c\
X	eculine.c\
X	eculock.c\
X	ecunumrev.c\
X	ecuicmaux.c\
X	ecuicmhelp.c\
X	ecuicmhist.c\
X	ecuicmd.c\
X	ecuphone.c\
X	ecuphrase.c\
X	ecurcvr.c\
X	ecuscrdump.c\
X	ecusetup.c\
X	ecushm.c\
X	ecusighdl.c\
X	ecutcap.c\
X	ecutime.c\
X	ecutty.c\
X	ecuuclc.c\
X	ecuusage.c\
X	ecuutil.c\
X	ecuwinutil.c\
X	ecuxenix.c\
X	ecuxfer.c\
X	esdutil.c\
X	feval.c\
X	gint.c\
X	gstr.c\
X	hdbintf.c\
X	logevent.c\
X	nonansikey.c\
X	pcmd.c\
X	pcmdif.c\
X	pcmdfile.c\
X	pcmdtty.c\
X	pcmdwhile.c\
X	pcmdxfer.c\
X	poutput.c\
X	pprintf.c\
X	proc.c\
X	proc_error.c\
X	procframe.c\
X	regexp.c\
X	utmpstat.c\
X	var.c
X
XOBJ	= \
X	bamboozle.o\
X	cmdtbl.o\
X	expresp.o\
X	ecu.o\
X	ecuLCK.o\
X	ecudump.o\
X	ecuchdir.o\
X	ecufinsert.o\
X	ecufkey.o\
X	ecufork.o\
X	ecuDCE.o\
X	eculine.o\
X	eculock.o\
X	ecunumrev.o\
X	ecuicmaux.o\
X	ecuicmhelp.o\
X	ecuicmhist.o\
X	ecuicmd.o\
X	ecuphone.o\
X	ecuphrase.o\
X	ecurcvr.o\
X	ecuscrdump.o\
X	ecusetup.o\
X	ecushm.o\
X	ecusighdl.o\
X	ecutcap.o\
X	ecutime.o\
X	ecutty.o\
X	ecuuclc.o\
X	ecuusage.o\
X	ecuutil.o\
X	ecuwinutil.o\
X	ecuxenix.o\
X	ecuxfer.o\
X	esdutil.o\
X	esiointf.o\
X	feval.o\
X	gint.o\
X	gstr.o\
X	hdbintf.o\
X	logevent.o\
X	nonansikey.o\
X	pcmd.o\
X	pcmdif.o\
X	pcmdfile.o\
X	pcmdtty.o\
X	pcmdwhile.o\
X	pcmdxfer.o\
X	poutput.o\
X	pprintf.o\
X	proc.o\
X	proc_error.o\
X	procframe.o\
X	regexp.o\
X	utmpstat.o\
X	var.o
X
Xall: check_tools ecuhelp ecu ecuug ecuz ecus
X
Xtools: $(LBIN)/sysdep $(LBIN)/afterlint $(LBIN)/mkoldproto
X
Xcheck_tools:
X	@[ -x $(LBIN)/sysdep ] || echo '"make tools" first, with write access to $(LBIN)'
X	@[ -x $(LBIN)/sysdep ] || exit 1
X	touch check_tools
X
Xecuhelp: check_tools
X	cd help;make
X
Xecuz: check_tools
X	cd z;make
X
Xecus: check_tools
X	cd sea;make
X
Xbperr/bperr: check_tools bperr/bperr.c
X	cd bperr;make bperr
X
Xecu: check_tools $(OBJ)
X	echo 'char *makedate="'`date` $(SYSTEM)'";'  >makedate.c
X	$(CC) -c $(CFLAGS) makedate.c; rm makedate.c
X	rm -rf $@
X	$(CC) -o $@ $(COMFLAGS) makedate.o $(OBJ) $(LDFLAGS)
X	rm makedate.o
X
Xecuug: check_tools
X	cd ecuungetty;make CRYPT=$(CRYPT) LCRYPT=$(LCRYPT)
X
Xproc_error.c: ecuerror.h
X	make bperr/bperr
X	bperr/bperr
X
X$(OBJ): ecushm.h
X
Xecu.fls: $(SRC) Make.xgcc
X	ls $(SRC) >ecu.fls
X
Xlint: ecu.fls
X	echo ' ' > lint_args.h
X	csh zgcc ecu.fls lint_args.h $(CFLAGS)
X
XLint:
X	lint -ux *.c > ecu.lint
X
Xinstall: all ecuhelp ecuz ecus #run as root
X	cp ecu z/ecusz z/ecurz sea/ecusea $(LBIN)
X	-mkdir $(ECULIBDIR)
X	cd ecuungetty;make CRYPT=$(CRYPT) LCRYPT=$(LCRYPT) ECULIBDIR=$(ECULIBDIR)\
X		install
X	cp models/*.mi help/ecuhelp.data $(ECULIBDIR)
X	@echo "--------------------------------------------------------------------"
X	@echo "| edit $(ECULIBDIR)/*.mi for your tty lines per ecu.man"
X	@echo "--------------------------------------------------------------------"
X
Xshar.fls: Make.xgcc
X	csh -c 'ls $(SHARFLS) | sort > shar.fls'
X
X# for shar 3.40
Xshar:
X	csh -c 'shar -x -F -m -c -s "wht at n4hgf.Mt-Park.GA.US" -a \
X-n$(ECUSHARNAME) -l55 -o/tmp/$(ECUSHARNAME) $(SHARFLS) 
X	shar -x -F -m -c -s "wht%n4hgf at gatech.ecu" -a \
X-n$(MANSHARNAME) -L55 -o/tmp/$(MANSHARNAME) doc/ecu.man
X
XsharZ:
X	csh -c 'shar -x -F -m -C -c -s "wht at n4hgf.Mt-Park.GA.US" -a \
X-n$(ECUSHARNAME) -L50 -o/tmp/$(ECUSHARNAME)Z $(SHARFLS) 
X
X$(LBIN)/sysdep: sysdep.c	# uname -p undocumented on UNIX but works
X	@echo 'building sysdep for' `uname -p`
X	[ `uname -p` != i80286 ] || $(CC) -O -M2 sysdep.c -o $@
X	[ `uname -p`  = i80286 ] || $(CC) -O     sysdep.c -o $@
X
X$(LBIN)/afterlint: afterlint.c
X	$(CC) -O afterlint.c -o $@
X
X$(LBIN)/mkoldproto: mkoldproto.l
X	lex mkoldproto.l
X	$(CC) lex.yy.c -ll -o $@
X	rm lex.yy.?
X
X#
X#
X#
X# MAKE DEPEND: regenerate .o:.h dependencies automatically
X#
Xdepend:
X		rm -f depend.tmp
X		if test '$(SRC)' ;\
X		then (grep '^#include' $(SRC) \
X		| sed	-e 's?:[^<]*<\([^>]*\)>.*?: /usr/include/\1?'\
X			-e 's?:[^"]*"\([^"]*\)".*?: \1?'\
X			-e 's?\(.*\)\.c?\1.o?'\
X			-e 's?ecuerror.h?ecu.h?'\
X		 >> depend.tmp) ;\
X		fi
X
X		echo '/^# DO NOT DELETE THIS LINE' >exdep.tmp
X		echo '.+1,$$d' >>exdep.tmp
X		echo 'r depend.tmp' >> exdep.tmp
X		echo 'w' >> exdep.tmp
X		cp Make.xgcc Make.xgcc.new
X		ex Make.xgcc.new < exdep.tmp
X		rm exdep.tmp depend.tmp
X		echo '#	DEPENDENCIES MUST END AT END OF	FILE' >>Make.xgcc.new
X		echo '#	IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Make.xgcc.new
X		echo '#	see make depend	above'>>Make.xgcc.new
X		mv Make.xgcc Make.xgcc.bak
X		mv Make.xgcc.new Make.xgcc
X
X# DO NOT DELETE THIS LINE
Xcmdtbl.o: ecucmd.h
Xexpresp.o: ecu.h
Xexpresp.o: ecu.h
Xexpresp.o: esd.h
Xexpresp.o: var.h
Xexpresp.o: proc.h
Xecu.o: ecu.h
Xecu.o: esd.h
Xecu.o: proc.h
Xecu.o: ecukey.h
Xecu.o: ecuxkey.h
Xecu.o: ecuhangup.h
Xecu.o: patchlevel.h
Xecu.o: /usr/include/sys/param.h
XecuLCK.o: ecu.h
XecuLCK.o: utmpstatus.h
Xecuchdir.o: ecu.h
Xecuchdir.o: ecukey.h
Xecuchdir.o: /usr/include/pwd.h
Xecudump.o: ecu.h
Xecufinsert.o: ecu.h
Xecufinsert.o: ecukey.h
Xecufkey.o: ecu.h
Xecufkey.o: ecukey.h
Xecufkey.o: ecufkey.h
Xecufkey.o: ecuxkey.h
Xecufkey.o: ecufork.h
Xecufork.o: ecu.h
Xecufork.o: ecufork.h
XecuDCE.o: ecu.h
XecuDCE.o: ecukey.h
XecuDCE.o: esd.h
XecuDCE.o: var.h
XecuDCE.o: ecupde.h
XecuDCE.o: ecu.h
XecuDCE.o: relop.h
Xeculine.o: ecu.h
Xeculine.o: ecukey.h
Xeculine.o: ecuhangup.h
Xeculock.o: ecu.h
Xeculock.o: utmpstatus.h
Xecuicmaux.o: ecu.h
Xecuicmaux.o: ecu.h
Xecuicmaux.o: ecucmd.h
Xecuicmhelp.o: /usr/include/curses.h
Xecuicmhelp.o: ecu.h
Xecuicmhelp.o: ecucmd.h
Xecuicmhelp.o: ecukey.h
Xecuicmhelp.o: pc_scr.h
Xecuicmhelp.o: stdio_lint.h
Xecuicmhist.o: /usr/include/curses.h
Xecuicmhist.o: pc_scr.h
Xecuicmhist.o: ecu.h
Xecuicmhist.o: ecukey.h
Xecuicmhist.o: ecuxkey.h
Xecuicmd.o: ecu.h
Xecuicmd.o: esd.h
Xecuicmd.o: ecufkey.h
Xecuicmd.o: patchlevel.h
Xecuicmd.o: ecucmd.h
Xecuphone.o: /usr/include/curses.h
Xecuphone.o: ecu.h
Xecuphone.o: pc_scr.h
Xecuphone.o: ecupde.h
Xecuphone.o: ecukey.h
Xecuphone.o: ecuxkey.h
Xecuphone.o: ecuhangup.h
Xecuphone.o: utmpstatus.h
Xecuphone.o: dvent.h
Xecuphone.o: esd.h
Xecuphone.o: var.h
Xecuphrase.o: ecu.h
Xecurcvr.o: ecu.h
Xecurcvr.o: ecukey.h
Xecuscrdump.o: ecu.h
Xecuscrdump.o: ecukey.h
Xecuscrdump.o: pc_scr.h
Xecusetup.o: /usr/include/curses.h
Xecusetup.o: patchlevel.h
Xecusetup.o: ecu.h
Xecusetup.o: ecukey.h
Xecusetup.o: ecuxkey.h
Xecusetup.o: pc_scr.h
Xecushm.o: ecu.h
Xecushm.o: /usr/include/sys/ipc.h
Xecushm.o: /usr/include/sys/shm.h
Xecusighdl.o: ecu.h
Xecusighdl.o: ecufork.h
Xecutcap.o: ecu.h
Xecutcap.o: ecukey.h
Xecutcap.o: pc_scr.h
Xecutime.o: /usr/include/sys/types.h
Xecutime.o: /usr/include/time.h
Xecutime.o: /usr/include/sys/timeb.h
Xecutty.o: ecu.h
Xecutty.o: esd.h
Xecutty.o: ecufkey.h
Xecutty.o: ecukey.h
Xecutty.o: ecuxkey.h
Xecutty.o: ecu.h
Xecutty.o: ecuhangup.h
Xecutty.o: /usr/include/sys/machdep.h
Xecutty.o: ecutty.h
Xecuusage.o: /usr/include/stdio.h
Xecuusage.o: ecuhangup.h
Xecuutil.o: ecu.h
Xecuutil.o: ecuhangup.h
Xecuutil.o: ecufork.h
Xecuutil.o: /usr/include/pwd.h
Xecuwinutil.o: /usr/include/curses.h
Xecuwinutil.o: ecukey.h
Xecuwinutil.o: ecuxkey.h
Xecuwinutil.o: ecuhangup.h
Xecuwinutil.o: pc_scr.h
Xecuxenix.o: ecu.h
Xecuxenix.o: ecukey.h
Xecuxenix.o: ecufkey.h
Xecuxenix.o: ecuxkey.h
Xecuxenix.o: ecufork.h
Xecuxenix.o: esd.h
Xecuxfer.o: /usr/include/curses.h
Xecuxfer.o: ecu.h
Xecuxfer.o: ecukey.h
Xecuxfer.o: ecuxkey.h
Xecuxfer.o: ecu.h
Xecuxfer.o: pc_scr.h
Xesdutil.o: /usr/include/ctype.h
Xesdutil.o: ecu.h
Xesdutil.o: ecu.h
Xesdutil.o: esd.h
Xfeval.o: ecu.h
Xfeval.o: ecu.h
Xfeval.o: esd.h
Xfeval.o: proc.h
Xfeval.o: var.h
Xgint.o: ecu.h
Xgint.o: ecu.h
Xgint.o: esd.h
Xgint.o: var.h
Xgstr.o: ecu.h
Xgstr.o: ecu.h
Xgstr.o: esd.h
Xgstr.o: var.h
Xhdbintf.o: ecu.h
Xhdbintf.o: esd.h
Xhdbintf.o: var.h
Xhdbintf.o: ecuhangup.h
Xhdbintf.o: utmpstatus.h
Xhdbintf.o: ecuungetty.h
Xhdbintf.o: dvent.h
Xhdbintf.o: dlent.h
Xhdbintf.o: dialprog.h
Xhdbintf.o: /usr/include/errno.h
Xhdbintf.o: /usr/include/utmp.h
Xlogevent.o: /usr/include/stdio.h
Xlogevent.o: /usr/include/sys/locking.h
Xlogevent.o: stdio_lint.h
Xlogevent.o: lint_args.h
Xnonansikey.o: ecu.h
Xnonansikey.o: ecukey.h
Xnonansikey.o: ecufkey.h
Xnonansikey.o: ecuxkey.h
Xnonansikey.o: ecufork.h
Xpcmd.o: ecu.h
Xpcmd.o: ecu.h
Xpcmd.o: ecuhangup.h
Xpcmd.o: ecukey.h
Xpcmd.o: esd.h
Xpcmd.o: var.h
Xpcmd.o: proc.h
Xpcmdif.o: /usr/include/ctype.h
Xpcmdif.o: ecu.h
Xpcmdif.o: ecu.h
Xpcmdif.o: esd.h
Xpcmdif.o: var.h
Xpcmdif.o: proc.h
Xpcmdif.o: relop.h
Xpcmdfile.o: ecu.h
Xpcmdfile.o: ecukey.h
Xpcmdfile.o: ecu.h
Xpcmdfile.o: esd.h
Xpcmdfile.o: var.h
Xpcmdfile.o: proc.h
Xpcmdtty.o: ecu.h
Xpcmdtty.o: ecu.h
Xpcmdtty.o: esd.h
Xpcmdtty.o: ecutty.h
Xpcmdwhile.o: /usr/include/ctype.h
Xpcmdwhile.o: ecu.h
Xpcmdwhile.o: ecu.h
Xpcmdwhile.o: esd.h
Xpcmdwhile.o: var.h
Xpcmdwhile.o: proc.h
Xpcmdwhile.o: relop.h
Xpcmdxfer.o: ecu.h
Xpcmdxfer.o: ecukey.h
Xpcmdxfer.o: ecu.h
Xpcmdxfer.o: esd.h
Xpcmdxfer.o: var.h
Xpcmdxfer.o: proc.h
Xpoutput.o: ecu.h
Xpoutput.o: ecukey.h
Xpoutput.o: ecu.h
Xpoutput.o: esd.h
Xpprintf.o: /usr/include/stdio.h
Xpprintf.o: /usr/include/varargs.h
Xproc.o: /usr/include/ctype.h
Xproc.o: ecu.h
Xproc.o: ecu.h
Xproc.o: esd.h
Xproc.o: var.h
Xproc.o: proc.h
Xproc.o: ecucmd.h
Xproc_error.o: ecu.h
Xproc_error.o: ecu.h
Xprocframe.o: /usr/include/ctype.h
Xprocframe.o: ecu.h
Xprocframe.o: ecukey.h
Xprocframe.o: ecu.h
Xprocframe.o: esd.h
Xprocframe.o: var.h
Xprocframe.o: proc.h
Xregexp.o: /usr/include/stdio.h
Xregexp.o: stdio_lint.h
Xregexp.o: lint_args.h
Xregexp.o: ecu.h
Xregexp.o: esd.h
Xregexp.o: var.h
Xregexp.o: /usr/include/setjmp.h
Xutmpstat.o: ecu.h
Xutmpstat.o: ecuhangup.h
Xutmpstat.o: utmpstatus.h
Xutmpstat.o: ecuungetty.h
Xutmpstat.o: dialprog.h
Xutmpstat.o: /usr/include/errno.h
Xutmpstat.o: /usr/include/utmp.h
Xvar.o: ecu.h
Xvar.o: esd.h
Xvar.o: var.h
Xvar.o: proc.h
Xvar.o: ecukey.h
Xvar.o: ecu.h
X#	DEPENDENCIES MUST END AT END OF	FILE
X#	IF YOU PUT STUFF HERE IT WILL GO AWAY
X#	see make depend	above
SHAR_EOF
chmod 0644 Make.xgcc ||
echo 'restore of Make.xgcc failed'
Wc_c="`wc -c < 'Make.xgcc'`"
test 12403 -eq "$Wc_c" ||
	echo 'Make.xgcc: original size 12403, current size' "$Wc_c"
exit 0

exit 0 # Just in case...
-- 
Kent Landfield                   INTERNET: kent at sparky.IMD.Sterling.COM
Sterling Software, IMD           UUCP:     uunet!sparky!kent
Phone:    (402) 291-8300         FAX:      (402) 291-4362
Please send comp.sources.misc-related mail to kent at uunet.uu.net.



More information about the Comp.sources.misc mailing list