home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-08-28 | 48.5 KB | 1,818 lines |
- Newsgroups: comp.sources.misc
- From: Warren Tucker <wht@n4hgf.GA.US>
- Subject: v22i072: ecu - ECU async comm package rev 3.10, Patch03c/3
- Message-ID: <1991Aug28.030221.19538@sparky.IMD.Sterling.COM>
- X-Md4-Signature: 4daf3c58e8f1646f8d13733d53a857ca
- Date: Wed, 28 Aug 1991 03:02:21 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: Warren Tucker <wht@n4hgf.GA.US>
- Posting-number: Volume 22, Issue 72
- Archive-name: ecu/patch03c
- Environment: SCO, XENIX, ISC, SUNOS4.1, SYSVR4
- Patch-To: ecu: Volume 21, Issue 53-89
-
- #!/bin/sh
- # this is ecu/patch3c (ECU 3.10 patch 3 part 3)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file PATCH3.01 continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 3; then
- echo Please unpack part "$Scheck" next!
- exit 1
- else
- exit 0
- fi
- ) < _shar_seq_.tmp || exit 1
- if test ! -f _shar_wnt_.tmp; then
- echo 'x - still skipping PATCH3.01'
- else
- echo 'x - continuing file PATCH3.01'
- sed 's/^X//' << 'SHAR_EOF' >> 'PATCH3.01' &&
- diff -c /export/home/wht/src/ecu312/ecuwinutil.c ./ecuwinutil.c
- *** /export/home/wht/src/ecu312/ecuwinutil.c Sun Aug 25 17:28:30 1991
- --- ./ecuwinutil.c Sun Aug 25 14:39:30 1991
- ***************
- *** 16,21 ****
- --- 16,22 ----
- X
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- + /*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
- X /*:08-01-1991-03:52-wht@n4hgf-when editing string, set cursor to end */
- X /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
- X /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
- ***************
- *** 55,60 ****
- --- 56,62 ----
- X unsigned char sHR = at_HR;
- X
- X int windows_active = 0;
- +
- X int ttymode_before_window_start;
- X
- X /*+-------------------------------------------------------------------------
- ***************
- *** 176,186 ****
- --- 178,192 ----
- X WINDOW *win;
- X {
- X
- + #ifdef SVR4
- + box(win,(unsigned long)sVR,(unsigned long)sHR);
- + #else
- X box(win,sVR,sHR);
- X wmove(win,0,0); waddch(win,(unsigned)sTL);
- X wmove(win,win->_maxy - 1,0); waddch(win,(unsigned)sBL);
- X wmove(win,win->_maxy - 1,win->_maxx - 1); waddch(win,(unsigned)sBR);
- X wmove(win,0,win->_maxx - 1); waddch(win,(unsigned)sTR);
- + #endif
- X
- X } /* end of winbox */
- X
- diff -c /export/home/wht/src/ecu312/ecuxenix.c ./ecuxenix.c
- *** /export/home/wht/src/ecu312/ecuxenix.c Sun Aug 25 17:29:23 1991
- --- ./ecuxenix.c Fri Aug 23 14:22:11 1991
- ***************
- *** 423,428 ****
- --- 423,472 ----
- X } /* end of xbell */
- X
- X /*+-------------------------------------------------------------------------
- + audio_play(file) - play a sound file
- + --------------------------------------------------------------------------*/
- + #ifdef sun4
- + void
- + audio_play(file)
- + char *file;
- + {
- + char cmd[1024];
- + strcpy(cmd,"!cat ")
- + strcat(cmd,file);
- + strcat(cmd," | /usr/demo/SOUND/play");
- + shell(cmd);
- + } /* end of audio_play */
- + #endif
- +
- + /*+-------------------------------------------------------------------------
- + audio_notify(type) - "bell_notify" with audio
- + --------------------------------------------------------------------------*/
- + #ifdef sun4
- + void
- + audio_notify(type)
- + register type;
- + {
- + switch(type)
- + {
- + case XBELL_DONE:
- + file = "/usr/demo/SOUND/sounds/gong.au";
- + break;
- + case XBELL_ATTENTION:
- + file = "/usr/demo/SOUND/sounds/whistle.au";
- + break;
- + case XBELL_C:
- + file = "/usr/demo/SOUND/sounds/whistle.au";
- + break;
- + case XBELL_3T:
- + file = "/usr/demo/SOUND/sounds/doorbell.au";
- + break;
- + default:
- + break;
- + }
- + } /* end of audio_notify */
- + #endif
- +
- + /*+-------------------------------------------------------------------------
- X bell_alarm(xbell_type)
- X ring bell on multiscreens; if morse driver included, use it instead
- X --------------------------------------------------------------------------*/
- ***************
- *** 430,435 ****
- --- 474,480 ----
- X bell_alarm(xbell_type)
- X int xbell_type;
- X {
- + #if defined(M_SYSV)
- X register notify_fd;
- X register fork_pid;
- X static long notify_time = 0L;
- ***************
- *** 439,445 ****
- X int ttnum;
- X long time();
- X
- - #if defined(M_SYSV)
- X #if !(defined(WHT) && defined(MORSE))
- X if(!tty_is_multiscreen)
- X {
- --- 484,489 ----
- ***************
- *** 509,514 ****
- --- 553,561 ----
- X bell_alarm(xbell_type);
- X }
- X #endif
- + #if defined(sun4)
- + audio_notify(xbell_type);
- + #endif
- X } /* end of bell_notify */
- X
- X /*+-------------------------------------------------------------------------
- ***************
- *** 546,552 ****
- --- 593,601 ----
- X case SIGUSR1: cptr = "SIGUSR1"; break;
- X case SIGUSR2: cptr = "SIGUSR2"; break;
- X case SIGCLD: cptr = "SIGCLD"; break;
- + #if defined(SIGPWR)
- X case SIGPWR: cptr = "SIGPWR"; break;
- + #endif
- X #if defined(SIGSTOP)
- X case SIGSTOP: cptr = "SIGSTOP"; break;
- X #endif
- ***************
- *** 644,650 ****
- X lr.buffer = buf;
- X lr.bufsize = sizeof(buf);
- X lr.delim = (char *)0;
- ! lr.echo = 0;
- X sigint = 0;
- X
- X /*
- --- 693,699 ----
- X lr.buffer = buf;
- X lr.bufsize = sizeof(buf);
- X lr.delim = (char *)0;
- ! lr.echo_flag = 0;
- X sigint = 0;
- X
- X /*
- diff -c /export/home/wht/src/ecu312/ecuxfer.c ./ecuxfer.c
- *** /export/home/wht/src/ecu312/ecuxfer.c Sun Aug 25 17:29:24 1991
- --- ./ecuxfer.c Sun Aug 25 14:39:31 1991
- ***************
- *** 35,40 ****
- --- 35,41 ----
- X
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- + /*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
- X /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
- X /*:07-17-1991-07:04-wht@n4hgf-avoid SCO UNIX nap bug */
- X /*:07-14-1991-18:18-wht@n4hgf-new ttygets functions */
- ***************
- *** 171,178 ****
- --- 172,183 ----
- X if((itmp = strlen(msg)) == 0)
- X {
- X itmp2 = last_msglen + 2;
- + #ifdef SVR4
- + whline(xfrw, (unsigned long)(sHR & 0x00ff), itmp2);
- + #else
- X for(itmp = 0; itmp < itmp2; itmp++)
- X waddch(xfrw,(unsigned)sHR);
- + #endif
- X last_msglen = 0;
- X }
- X else
- ***************
- *** 193,200 ****
- --- 198,209 ----
- X waddch(xfrw,' ');
- X if((itmp2 = last_msglen - itmp) > 0)
- X {
- + #ifdef SVR4
- + whline(xfrw, (unsigned long)(sHR & 0x00ff), itmp2);
- + #else
- X while(itmp2--)
- X waddch(xfrw,(unsigned)sHR);
- + #endif
- X }
- X last_msglen = itmp; /* remember last message length */
- X }
- diff -c /export/home/wht/src/ecu312/esdutil.c ./esdutil.c
- *** /export/home/wht/src/ecu312/esdutil.c Thu Jul 25 12:57:00 1991
- --- ./esdutil.c Sun Aug 25 23:44:31 1991
- ***************
- *** 35,40 ****
- --- 35,41 ----
- X This is old code; give me a break
- X -----------------------------------------------------------------*/
- X /*+:EDITS:*/
- + /*:08-25-1991-23:20-root@n4hgf2-get_switches could overflow result string */
- X /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
- X /*:05-02-1991-04:12-wht@n4hgf-how did esdrealloc ever work? */
- X /*:04-23-1991-04:33-wht@n4hgf-function name reorganization */
- ***************
- *** 762,779 ****
- X
- X switches_max--;
- X *switches++ = '-';
- X index++;
- ! while((itmp < switches_max) && (index < cb))
- X {
- ! schar = *(pb + index++);
- X if(isspace(schar))
- X break;
- - *switches++ = schar;
- X }
- X
- X tesd->index = index;
- X *switches = 0;
- ! return(0);
- X
- X } /* end of get_switches() */
- X
- --- 763,784 ----
- X
- X switches_max--;
- X *switches++ = '-';
- + switches_max--;
- X index++;
- ! while(index < cb)
- X {
- ! schar = *(pb + index);
- ! index++;
- ! if(switches_max > 0)
- ! *switches++ = schar;
- ! switches_max--;
- X if(isspace(schar))
- X break;
- X }
- X
- X tesd->index = index;
- X *switches = 0;
- ! return((switches_max < 0) ? eSwitchesTooLong : 0);
- X
- X } /* end of get_switches() */
- X
- diff -c /export/home/wht/src/ecu312/expresp.c ./expresp.c
- *** /export/home/wht/src/ecu312/expresp.c Sun Aug 25 17:29:25 1991
- --- ./expresp.c Mon Aug 26 00:09:24 1991
- ***************
- *** 125,131 ****
- X lr.buffer = last_Speed_result;
- X lr.bufsize = sizeof(last_Speed_result);
- X lr.delim = "\n";
- ! lr.echo = 0;
- X lgets_timeout(&lr);
- X ftime(&now_timeb);
- X ms_now = (now_timeb.time * 1000) + now_timeb.millitm;
- --- 125,131 ----
- X lr.buffer = last_Speed_result;
- X lr.bufsize = sizeof(last_Speed_result);
- X lr.delim = "\n";
- ! lr.echo_flag = 0;
- X lgets_timeout(&lr);
- X ftime(&now_timeb);
- X ms_now = (now_timeb.time * 1000) + now_timeb.millitm;
- ***************
- *** 433,438 ****
- --- 433,440 ----
- X RETURN:
- X esdfree(tesd);
- X iv[0] = !!erc;
- + if(proctrace)
- + pprintf("$i00 = %7ld (0x%08lx,0%lo)\n",iv[0],iv[0],iv[0]);
- X if(erc == eExpectRespondFail)
- X erc = 0;
- X return(erc);
- Common subdirectories: /export/home/wht/src/ecu312/fasi and ./fasi
- Common subdirectories: /export/home/wht/src/ecu312/gendial and ./gendial
- diff -c /export/home/wht/src/ecu312/hdbintf.c ./hdbintf.c
- *** /export/home/wht/src/ecu312/hdbintf.c Sun Aug 25 17:28:32 1991
- --- ./hdbintf.c Tue Aug 27 04:55:07 1991
- ***************
- *** 4,9 ****
- --- 4,10 ----
- X #endif
- X
- X /* #define CHOOSE_DEBUG */
- + /* #defined CALL_DIALER_BY_ECUDIAL */ /* gendial makes use of this */
- X
- X /*+-------------------------------------------------------------------------
- X hdbintf.c - HDB UUCP database and /etc/utmp interface routines
- ***************
- *** 12,17 ****
- --- 13,19 ----
- X Defined functions:
- X choose_device(type,baud)
- X choose_line(baud)
- + dialcodes_translate(phone)
- X dialstr_translate(translate_list,to_translate)
- X dvtype_match(typespec,dvtype)
- X enddlent()
- ***************
- *** 25,35 ****
- --- 27,47 ----
- X hdb_dial(presult)
- X hdb_dial_error_text(errcode)
- X hdb_init()
- + strip_phone_num(sptr)
- X ungetty_get_line()
- X ungetty_return_line()
- X
- + Date: Fri, 23 Aug 91 18:30:06 +0300 (MSD)
- + From: emory!hq.demos.su!ache (Andrew A. Chernov, canton Uri's citizen)
- + 1) HDB dialers may return connect speed as return code (!= 0)
- + 2) Using HDB Dialcodes file for phone numbers translation now
- + (\D,\T escape sequence)
- +
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- + /*:08-27-1991-03:08-ache@hq.demos.su-pass dial prog name in lieu of "ECUdial" */
- + /*:08-27-1991-03:08-ache@hq.demos.su-dialer enhancement */
- + /*:08-25-1991-13:07-wht@n4hgf-apply ache@hq.demos.su patches */
- X /*:08-10-1991-17:39-wht@n4hgf-US_WEGOTIT handling */
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:06-02-1991-17:42-wht@n4hgf-add getdvtype */
- ***************
- *** 52,57 ****
- --- 64,71 ----
- X
- X char *arg_token();
- X char *skip_ld_break();
- + char *dialcodes_translate();
- + char *strip_phone_num();
- X
- X extern int errno;
- X extern char kbdintr; /* current input INTR */
- ***************
- *** 66,71 ****
- --- 80,86 ----
- X FILE *fpdl = NULL;
- X char *Devices_file = "/usr/lib/uucp/Devices";
- X char *Dialers_file = "/usr/lib/uucp/Dialers";
- + char *Dialcodes_file = "/usr/lib/uucp/Dialcodes";
- X char ungetty_ttyname[64] = "";
- X
- X /*+-------------------------------------------------------------------------
- ***************
- *** 278,283 ****
- --- 293,299 ----
- X dve.high_baud = atoi(cptr + 1);
- X }
- X dve.dialprog = tokens[4];
- + dve.token = tokens[5];
- X return(&dve);
- X
- X } /* end of getdvent */
- ***************
- *** 377,383 ****
- X you must make sure any supplied regexp is a valid one, for regexp
- X compilation errors are indistinguishable from other seach failures
- X
- ! uses optimized implimentation of dvtype_match functionality
- X --------------------------------------------------------------------------*/
- X struct dvent *
- X getdvtype(type)
- --- 393,399 ----
- X you must make sure any supplied regexp is a valid one, for regexp
- X compilation errors are indistinguishable from other seach failures
- X
- ! uses optimized implementation of dvtype_match functionality
- X --------------------------------------------------------------------------*/
- X struct dvent *
- X getdvtype(type)
- ***************
- *** 620,626 ****
- X if(itmp = line_locked(s32))
- X continue;
- X case US_WEGOTIT:
- ! #if defined(WHT) && defined(SHARE_DEBUG)
- X ecu_log_event(getpid(),"looking for line found we own it");
- X #endif
- X case US_LOGIN: /* enabled for login, idle */
- --- 636,642 ----
- X if(itmp = line_locked(s32))
- X continue;
- X case US_WEGOTIT:
- ! #if defined(SHARE_DEBUG)
- X ecu_log_event(getpid(),"looking for line found we own it");
- X #endif
- X case US_LOGIN: /* enabled for login, idle */
- ***************
- *** 844,855 ****
- X char baudstr[10];
- X char dbgstr[10];
- X char dial_log[100];
- ! char stripped_num[64];
- X char *sptr;
- X char *dptr;
- X static char stat_s20[20];
- X ulong colors_at_entry = colors_current;
- X extern char *make_char_graphic();
- X #ifdef WHT /* hack for immediate need ... make a real feature later */
- X FILE *fp;
- X char credit_file[128];
- --- 860,872 ----
- X char baudstr[10];
- X char dbgstr[10];
- X char dial_log[100];
- ! char *stripped_num;
- X char *sptr;
- X char *dptr;
- X static char stat_s20[20];
- X ulong colors_at_entry = colors_current;
- X extern char *make_char_graphic();
- + char token[128]; /* translated dialer token */
- X #ifdef WHT /* hack for immediate need ... make a real feature later */
- X FILE *fp;
- X char credit_file[128];
- ***************
- *** 902,921 ****
- X return(4);
- X }
- X
- ! sptr = shm->Ltelno;
- ! dptr = stripped_num;
- ! while(*sptr)
- ! {
- ! if(strchr("()-",*sptr))
- ! {
- ! sptr++;
- ! continue;
- ! }
- ! *dptr++ = *sptr++;
- ! }
- ! *dptr = 0;
- X
- X #ifdef WHT /* hack for immediate need ... make a real feature later */
- X if(*(dptr - 1) == '$')
- X {
- X *--dptr = 0;
- --- 919,928 ----
- X return(4);
- X }
- X
- ! stripped_num = strip_phone_num(shm->Ltelno);
- X
- X #ifdef WHT /* hack for immediate need ... make a real feature later */
- + dptr = stripped_num;
- X if(*(dptr - 1) == '$')
- X {
- X *--dptr = 0;
- ***************
- *** 942,947 ****
- --- 949,994 ----
- X }
- X #endif /* WHT */
- X
- + /* Translate Token now */
- +
- + if (dve->token == (char *)0 || !dve->token[0])
- + strcpy(token, stripped_num);
- + else {
- + dptr = token;
- + for (sptr = dve->token; *sptr; sptr++)
- + if (*sptr != '\\')
- + *dptr++ = *sptr;
- + else {
- + char *s, *t;
- +
- + switch (*(sptr + 1)) {
- +
- + /* Direct */
- + case 'D':
- + sptr++;
- + s = stripped_num;
- + Dir:
- + while (*s)
- + *dptr++ = *s++;
- + break;
- +
- + /* Dialcodes Translate */
- + case 'T':
- + sptr++;
- + s = stripped_num;
- + t = dialcodes_translate(&s);
- + while(*t)
- + *dptr++ = *t++;
- + goto Dir;
- +
- + default:
- + *dptr++ = '\\';
- + break;
- + }
- + }
- + *dptr = 0;
- + }
- +
- X pprintf("Type %s to abort ... ",
- X (kbdintr == 0x7F) ? "DEL" : make_char_graphic(kbdintr,0));
- X
- ***************
- *** 967,974 ****
- X if((dial_pid = smart_fork()) == 0)
- X {
- X signal(SIGINT,SIG_DFL);
- ! execl(dve->dialprog,"ECUdial",dbgstr,
- ! shm->Lline,stripped_num,
- X baudstr,(char *)0);
- X exit(-1);
- X }
- --- 1014,1029 ----
- X if((dial_pid = smart_fork()) == 0)
- X {
- X signal(SIGINT,SIG_DFL);
- ! execl(dve->dialprog,
- ! #if defined(WHT) || defined(CALL_DIALER_BY_ECUDIAL)
- ! "ECUdial", /* I want to know ECU is calling */
- ! #else
- ! dve->dialprog, /* other dialers need to know how they
- ! * are being called
- ! */
- ! #endif
- ! dbgstr,
- ! shm->Lline,token,
- X baudstr,(char *)0);
- X exit(-1);
- X }
- ***************
- *** 992,998 ****
- X if(wait_status)
- X {
- X sprintf(dial_log,"UUCPDIAL %s %s 0x%04x",
- ! dve->dialprog,stripped_num,wait_status);
- X ecu_log_event(getpid(),dial_log);
- X }
- X #endif
- --- 1047,1053 ----
- X if(wait_status)
- X {
- X sprintf(dial_log,"UUCPDIAL %s %s 0x%04x",
- ! dve->dialprog,token,wait_status);
- X ecu_log_event(getpid(),dial_log);
- X }
- X #endif
- ***************
- *** 1003,1021 ****
- X if(wait_status & 0xFF)
- X wait_status = (RC_FAIL | RCE_SIG) << 8;
- X
- - if(!wait_status)
- - {
- - sprintf(stat_s20,"CONNECT %u",shm->Lbaud);
- - *presult = stat_s20; /* DCE_dial will report result code */
- - return(0);
- - }
- -
- X if((wait_status & 0xFF00) == 0xFF00)
- X {
- X pputs("uucp dial failure (see ~/.ecu/log) ... trying ecu dialer\n");
- X return(4);
- X }
- ! *presult = hdb_dial_error_text((wait_status >> 8) & 0xFF);
- X setcolor(colors_error);
- X pputs(*presult);
- X setcolor(colors_at_entry);
- --- 1058,1112 ----
- X if(wait_status & 0xFF)
- X wait_status = (RC_FAIL | RCE_SIG) << 8;
- X
- X if((wait_status & 0xFF00) == 0xFF00)
- X {
- X pputs("uucp dial failure (see ~/.ecu/log) ... trying ecu dialer\n");
- X return(4);
- X }
- !
- ! wait_status = (wait_status >> 8) & 0xFF;
- !
- ! if(!(wait_status & ~RC_BAUD))
- ! {
- ! char *cptr;
- !
- ! wait_status &= RC_BAUD;
- ! switch (wait_status)
- ! {
- ! case 0: cptr = baudstr; break; /* SAME */
- ! case B50: cptr = "50"; break;
- ! case B75: cptr = "75"; break;
- ! case B110: cptr = "110"; break;
- ! case B134: cptr = "134.5"; break;
- ! case B150: cptr = "150"; break;
- ! case B200: cptr = "200"; break;
- ! case B300: cptr = "300"; break;
- ! case B600: cptr = "600"; break;
- ! case B1200: cptr = "1200"; break;
- ! case B1800: cptr = "1800"; break;
- ! case B2400: cptr = "2400"; break;
- ! case B4800: cptr = "4800"; break;
- ! case B9600: cptr = "9600"; break;
- ! #if defined(B19200)
- ! case B19200: cptr = "19200"; break;
- ! #endif
- ! #if defined(B38400)
- ! case B38400: cptr = "38400"; break;
- ! #endif
- ! default:
- ! switch (wait_status) {
- ! case EXTA: cptr = "EXTA"; break;
- ! case EXTB: cptr = "EXTB"; break;
- ! default: cptr = "????"; break;
- ! }
- ! }
- !
- ! sprintf(stat_s20,"CONNECT %s",cptr);
- ! *presult = stat_s20; /* DCE_dial will report result code */
- ! return(0);
- ! }
- !
- ! *presult = hdb_dial_error_text(wait_status);
- X setcolor(colors_error);
- X pputs(*presult);
- X setcolor(colors_at_entry);
- ***************
- *** 1064,1069 ****
- --- 1155,1226 ----
- X there_is_hdb_on_this_machine = !access(Devices_file,4);
- X
- X } /* end of hdb_init */
- +
- + /*+-------------------------------------------------------------------------
- + dialcodes_translate(phone) - translate first part of phone using Dialcodes
- + --------------------------------------------------------------------------*/
- + char *
- + dialcodes_translate(phone)
- + char **phone;
- + {
- + FILE *f;
- + int itmp;
- + #define MAX_DLC_TOKENS 2
- + char *tokens[MAX_DLC_TOKENS];
- + static char dlstr[128];
- +
- + if ((f = fopen(Dialcodes_file, "r")) == NULL)
- + return "";
- +
- + while(1) {
- + if(fgets(dlstr,sizeof(dlstr),f) == NULL)
- + break;
- + if(((itmp = strlen(dlstr)) > 0) && (dlstr[itmp - 1] == '\n'))
- + dlstr[--itmp] = 0;
- + if((dlstr[0] == '#') || (dlstr[0] == ' ') || (!itmp))
- + continue;
- + if(tokens[0] = arg_token(dlstr," \t\r\n"))
- + {
- + if (!(tokens[1] = arg_token((char *)0," \t\r\n")))
- + tokens[1] = "";
- + itmp = strlen(tokens[0]);
- + if (strncmp(*phone, tokens[0], itmp))
- + continue;
- + fclose(f);
- + *phone += itmp;
- + return tokens[1];
- + }
- + break;
- + }
- +
- + fclose(f);
- + return "";
- + }
- +
- + /*+-------------------------------------------------------------------------
- + strip_phone_num(sptr) - remove junk characters from phone
- + --------------------------------------------------------------------------*/
- + char *
- + strip_phone_num(sptr)
- + char *sptr;
- + {
- + static char stripped_num[64];
- + char *dptr;
- +
- + dptr = stripped_num;
- + while(*sptr)
- + {
- + if(*sptr == '(' || *sptr == ')')
- + {
- + sptr++;
- + continue;
- + }
- + *dptr++ = *sptr++;
- + }
- + *dptr = 0;
- +
- + return stripped_num;
- + }
- X
- X /* vi: set tabstop=4 shiftwidth=4: */
- X /* end of hdbintf.c */
- Common subdirectories: /export/home/wht/src/ecu312/help and ./help
- diff -c /export/home/wht/src/ecu312/kbdtest.c ./kbdtest.c
- *** /export/home/wht/src/ecu312/kbdtest.c Thu Jul 25 12:58:00 1991
- --- ./kbdtest.c Fri Aug 23 14:22:22 1991
- ***************
- *** 57,62 ****
- --- 57,64 ----
- X if(arg)
- X {
- X (void)ioctl(TTYIN,TCGETA,&tv);
- + Ltermio.c_cflag &= ~(CS8 | PARENB | PARODD);
- + Ltermio.c_cflag |= CS8;
- X tv.c_iflag &= ~(INLCR | ICRNL | IGNCR | IXOFF | IUCLC | ISTRIP);
- X tv.c_oflag |= OPOST;
- X tv.c_oflag &= ~(OLCUC | ONLCR | OCRNL | ONOCR | ONLRET);
- diff -c /export/home/wht/src/ecu312/kbdtest3.c ./kbdtest3.c
- *** /export/home/wht/src/ecu312/kbdtest3.c Sun Aug 25 17:28:34 1991
- --- ./kbdtest3.c Mon Aug 26 05:01:40 1991
- ***************
- *** 1,5 ****
- X /* CHK=0x2F4F */
- ! char *revision = "1.01";
- X /*+-----------------------------------------------------------------------
- X kbdtest3.c -- test keyboard values
- X wht@n4hgf.Mt-Park.GA.US
- --- 1,5 ----
- X /* CHK=0x2F4F */
- ! char *revision = "1.02";
- X /*+-----------------------------------------------------------------------
- X kbdtest3.c -- test keyboard values
- X wht@n4hgf.Mt-Park.GA.US
- ***************
- *** 17,22 ****
- --- 17,23 ----
- X k3ttymode(arg)
- X main(argc,argv)
- X read_kbd_string(buf,max)
- + termio_parity_text(cflag)
- X tputstrs(strs)
- X write_nonansi_desc(fp,buf,buflen,name)
- X xtoasc(ch,incl_3char)
- ***************
- *** 23,28 ****
- --- 24,30 ----
- X
- X ------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- + /*:08-17-1991-13:58-root@n4hgf-make kbd entirely raw */
- X /*:08-06-1991-13:12-wht@n4hgf-add parity reporting */
- X /*:08-06-1991-13:12-wht@n4hgf-some terminals reinvent parity bit's use */
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- ***************
- *** 266,273 ****
- X if incl_3char set true, then space + ASCII assignment (e.g. "NUL") is
- X appended to the string for non-printable graphics
- X ------------------------------------------------------------------------*/
- ! char *xtoasc(ch,incl_3char)
- ! register char ch;
- X int incl_3char;
- X {
- X static char gg[8];
- --- 268,276 ----
- X if incl_3char set true, then space + ASCII assignment (e.g. "NUL") is
- X appended to the string for non-printable graphics
- X ------------------------------------------------------------------------*/
- ! char *
- ! xtoasc(ch,incl_3char)
- ! register unsigned char ch;
- X int incl_3char;
- X {
- X static char gg[8];
- ***************
- *** 276,281 ****
- --- 279,286 ----
- X
- X if(ch == 0x7F)
- X strcpy(gg,"del");
- + else if(ch == 0x9b)
- + strcpy(gg,"csi");
- X else if(ch > 0x7F)
- X sprintf(gg,"0x%02x",(unsigned char)ch);
- X else if(ch > 0x20)
- ***************
- *** 297,303 ****
- X void
- X write_nonansi_desc(fp,buf,buflen,name)
- X FILE *fp;
- ! char *buf;
- X int buflen;
- X char *name;
- X {
- --- 302,308 ----
- X void
- X write_nonansi_desc(fp,buf,buflen,name)
- X FILE *fp;
- ! unsigned char *buf;
- X int buflen;
- X char *name;
- X {
- ***************
- *** 344,349 ****
- --- 349,356 ----
- X if(arg)
- X {
- X (void)ioctl(TTYIN,TCGETA,&tv);
- + tv.c_cflag &= ~(CS8 | PARENB | PARODD);
- + tv.c_cflag |= CS8;
- X tv.c_iflag &= ~(INLCR | ICRNL | IGNCR | IXOFF | IUCLC | ISTRIP);
- X tv.c_lflag &= ~(ICANON | ISIG | ECHO);
- X tv.c_cc[VEOF] = '\01';
- ***************
- *** 438,445 ****
- X }
- X
- X ioctl(TTYIN,TCGETA,&tv0); /* get original status */
- ! k3ttymode(2);
- ! parity_text = termio_parity_text(tv.c_cflag);
- X
- X if(!hex_out)
- X {
- --- 445,451 ----
- X }
- X
- X ioctl(TTYIN,TCGETA,&tv0); /* get original status */
- ! parity_text = termio_parity_text(tv0.c_cflag);
- X
- X if(!hex_out)
- X {
- ***************
- *** 447,458 ****
- X if(!(ttype = getenv("TERM")))
- X ttype = "??";
- X time(&now);
- ! fprintf(fpout,"# nonansikey definition for TERM='%s'\n",ttype);
- X fprintf(fpout,"# built by kbdtest3 %s %s",revision,ctime(&now));
- X fprintf(fpout,"# keyboard parity required = %s\n",parity_text);
- X fprintf(fpout,"# stty -a at kbdtest3 execution time:\n");
- X fclose(fpout);
- ! sprintf(s128,"/bin/stty -a | /bin/sed -e 's/^/# /' >> %s\n",outfile);
- X system(s128);
- X if(!(fpout = fopen(outfile,"a")))
- X {
- --- 453,489 ----
- X if(!(ttype = getenv("TERM")))
- X ttype = "??";
- X time(&now);
- ! fprintf(fpout,"# nonansikey for '%s' under ",ttype);
- ! #if defined(M_SYSV)
- ! fputs("SCO\n",fpout);
- ! #else
- ! #if defined(ISC)
- ! fputs("ISC\n",fpout);
- ! #else
- ! #if defined(sun)
- ! fputs("SunOS\n",fpout);
- ! #else
- ! fputs("??? OS\n",fpout);
- ! #endif /* sun */
- ! #endif /* ISC */
- ! #endif /* M_SYSV */
- !
- X fprintf(fpout,"# built by kbdtest3 %s %s",revision,ctime(&now));
- X fprintf(fpout,"# keyboard parity required = %s\n",parity_text);
- + #if defined(sun)
- + #ifdef notdef /* system() uses sockets $#@$^!&%# */
- + fprintf(fpout,"# stty everything at kbdtest3 execution time:\n");
- + fclose(fpout);
- + strcpy(s128,"/usr/bin/stty everything | ");
- + strcat(s128,"/usr/bin/sed -e 's/^/# /' >> ");
- + strcat(s128,outfile);
- + #endif
- + #else
- X fprintf(fpout,"# stty -a at kbdtest3 execution time:\n");
- X fclose(fpout);
- ! strcpy(s128,"/bin/stty -a | /bin/sed -e 's/^/# /' >> ");
- ! strcat(s128,outfile);
- ! #endif
- X system(s128);
- X if(!(fpout = fopen(outfile,"a")))
- X {
- ***************
- *** 462,468 ****
- --- 493,501 ----
- X fprintf(fpout,"%s\n",ttype);
- X }
- X
- + printf("Your keyboard driver parity is set to %s\n",parity_text);
- X printf("press ^D (0x04) to terminate program early\n\n");
- + k3ttymode(1);
- X
- X while(need->ecuname)
- X {
- ***************
- *** 498,504 ****
- X need->ecuname);
- X }
- X else
- ! write_nonansi_desc(fpout,instr,count,need->ecuname);
- X }
- X
- X if((count == 1) && ((instr[0] & 0x7F) == 4))
- --- 531,540 ----
- X need->ecuname);
- X }
- X else
- ! {
- ! write_nonansi_desc(fpout,(unsigned char *)instr,count,
- ! need->ecuname);
- ! }
- X }
- X
- X if((count == 1) && ((instr[0] & 0x7F) == 4))
- diff -c /export/home/wht/src/ecu312/logevent.c ./logevent.c
- *** /export/home/wht/src/ecu312/logevent.c Wed Aug 7 14:23:00 1991
- --- ./logevent.c Fri Aug 23 14:22:25 1991
- ***************
- *** 3,8 ****
- --- 3,9 ----
- X wht@n4hgf.Mt-Park.GA.US
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- + /*:08-21-1991-02:00-wht@n4hgf-sun does not have xenix locking - fix later */
- X /*:08-07-1991-14:23-wht@n4hgf-use static logname */
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:09-19-1990-19:36-wht@n4hgf-ecu_log_event now gets pid for log from caller */
- ***************
- *** 9,15 ****
- X /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
- X
- X #include <stdio.h>
- ! #include <sys/locking.h>
- X #include "stdio_lint.h"
- X #include "lint_args.h"
- X
- --- 10,18 ----
- X /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
- X
- X #include <stdio.h>
- ! #if defined(USE_LOCKING)
- ! # include <sys/locking.h>
- ! #endif
- X #include "stdio_lint.h"
- X #include "lint_args.h"
- X
- ***************
- *** 32,38 ****
- --- 35,43 ----
- X }
- X if((ecu_log_fp = fopen(logname,"a")) != NULL)
- X {
- + #if defined(USE_LOCKING)
- X locking(fileno(ecu_log_fp),LK_LOCK,0L);
- + #endif
- X get_tod(2,tstr256);
- X tstr256[10] = '-';
- X fputs(tstr256,ecu_log_fp);
- ***************
- *** 39,50 ****
- X fprintf(ecu_log_fp,"-%05d-",pid);
- X fputs(event_note,ecu_log_fp);
- X fputs("\n",ecu_log_fp);
- X fflush(ecu_log_fp);
- X locking(fileno(ecu_log_fp),LK_UNLCK,0L);
- X fclose(ecu_log_fp);
- X }
- X } /* end of ecu_log_event */
- -
- X
- X /* vi: set tabstop=4 shiftwidth=4: */
- X /* end of logevent.c */
- --- 44,56 ----
- X fprintf(ecu_log_fp,"-%05d-",pid);
- X fputs(event_note,ecu_log_fp);
- X fputs("\n",ecu_log_fp);
- + #if defined(USE_LOCKING)
- X fflush(ecu_log_fp);
- X locking(fileno(ecu_log_fp),LK_UNLCK,0L);
- + #endif
- X fclose(ecu_log_fp);
- X }
- X } /* end of ecu_log_event */
- X
- X /* vi: set tabstop=4 shiftwidth=4: */
- X /* end of logevent.c */
- diff -c /export/home/wht/src/ecu312/makedirs.c ./makedirs.c
- *** /export/home/wht/src/ecu312/makedirs.c Sun Aug 25 17:28:37 1991
- --- ./makedirs.c Fri Aug 23 14:39:36 1991
- ***************
- *** 2,7 ****
- --- 2,8 ----
- X makedirs.c
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- + /*:08-23-1991-14:38-wht@n4hgf-was not making last subdirectory in list */
- X /*:08-09-1991-02:13-root@n4hgf-need smart_fork for XENIX */
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:07-15-1991-14:24-wht@n4hgf-creation */
- ***************
- *** 25,30 ****
- --- 26,32 ----
- X int dmode = 0755;
- X char *dname;
- X struct stat stat_buf,*st = &stat_buf;
- + char s512[512];
- X extern char *optarg;
- X extern int optind;
- X
- ***************
- *** 59,65 ****
- X else
- X {
- X errno = ENOENT; /* fake make_dirs */
- ! if(!make_dirs(dname,dmode))
- X {
- X perror(dname);
- X exit(1);
- --- 61,69 ----
- X else
- X {
- X errno = ENOENT; /* fake make_dirs */
- ! strcpy(s512,dname);
- ! strcat(s512,"/dummy");
- ! if(!make_dirs(s512,dmode))
- X {
- X perror(dname);
- X exit(1);
- Common subdirectories: /export/home/wht/src/ecu312/mapkey and ./mapkey
- diff -c /export/home/wht/src/ecu312/mkdirs.c ./mkdirs.c
- *** /export/home/wht/src/ecu312/mkdirs.c Sun Aug 25 17:28:37 1991
- --- ./mkdirs.c Sun Aug 25 14:21:45 1991
- ***************
- *** 1,27 ****
- X /* CHK=0x9A80 */
- X /*+-------------------------------------------------------------------------
- ! mkdirs.c
- X wht@n4hgf.Mt-Park.GA.US
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X /*:08-09-1991-00:30-wht@n4hgf-no need for sys/wait.h + XENIX doesn't have it */
- X /*:08-06-1991-02:37-root@n4hgf-how did compile succeed without signal.h? */
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:07-15-1991-14:20-wht@n4hgf-creation */
- X
- - #include <signal.h>
- X #include <string.h>
- ! #if defined(ISC22)
- ! #define _POSIX_SOURCE /* yetch - for crock in types.h to
- ! * get wait.h to work
- ! */
- ! #endif
- X #include <sys/types.h>
- X #include <sys/stat.h>
- ! #include <sys/errno.h>
- X
- - extern int errno;
- -
- X /*+-------------------------------------------------------------------------
- X mkdir(dpath,dmode)
- X
- --- 1,26 ----
- X /* CHK=0x9A80 */
- X /*+-------------------------------------------------------------------------
- ! mkdirs.c - make multiple directories
- X wht@n4hgf.Mt-Park.GA.US
- +
- + XENIX lacks mkdir() to use elegant PD bersion by John Gilmore
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- + /*:08-25-1991-14:21-wht@n4hgf-XENIX code hinges on M_XENIX not !sun&&!isc etc */
- X /*:08-09-1991-00:30-wht@n4hgf-no need for sys/wait.h + XENIX doesn't have it */
- X /*:08-06-1991-02:37-root@n4hgf-how did compile succeed without signal.h? */
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- X /*:07-15-1991-14:20-wht@n4hgf-creation */
- X
- X #include <string.h>
- ! #include <errno.h>
- !
- ! #if defined(M_XENIX)
- ! #include <signal.h>
- X #include <sys/types.h>
- X #include <sys/stat.h>
- ! #endif
- X
- X /*+-------------------------------------------------------------------------
- X mkdir(dpath,dmode)
- X
- ***************
- *** 28,34 ****
- X Directory-creating routines from Public Domain TAR by John Gilmore
- X Make a directory. Compatible with the mkdir() system call on 4.2BSD.
- X --------------------------------------------------------------------------*/
- ! #if !defined(M_UNIX) && !defined(ISC22)
- X #define TERM_SIGNAL(status) ((status) & 0x7F)
- X #define TERM_COREDUMP(status) (((status) & 0x80) != 0)
- X #define TERM_VALUE(status) ((status) >> 8)
- --- 27,33 ----
- X Directory-creating routines from Public Domain TAR by John Gilmore
- X Make a directory. Compatible with the mkdir() system call on 4.2BSD.
- X --------------------------------------------------------------------------*/
- ! #if defined(M_XENIX)
- X #define TERM_SIGNAL(status) ((status) & 0x7F)
- X #define TERM_COREDUMP(status) (((status) & 0x80) != 0)
- X #define TERM_VALUE(status) ((status) >> 8)
- Common subdirectories: /export/home/wht/src/ecu312/models and ./models
- diff -c /export/home/wht/src/ecu312/nonansikey.c ./nonansikey.c
- *** /export/home/wht/src/ecu312/nonansikey.c Sun Aug 25 17:28:39 1991
- --- ./nonansikey.c Mon Aug 26 05:46:56 1991
- ***************
- *** 11,16 ****
- --- 11,17 ----
- X
- X ------------------------------------------------------------------*/
- X /*+:EDITS:*/
- + /*:08-26-1991-05:45-wht@n4hgf2-# got included in key def */
- X /*:08-06-1991-13:19-wht@n4hgf-allow any code as first in key sequence */
- X /*:08-03-1991-14:44-wht@n4hgf-look for nonansikeys in ECULIBDIR too */
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- ***************
- *** 31,36 ****
- --- 32,38 ----
- X
- X KDE nonansi_key_table[KDE_COUNT];
- X char nonansi_key_name[32] = "";
- + static FILE *nadbg = (FILE *)0;
- X
- X /*+-------------------------------------------------------------------------
- X nonansi_key_init()
- ***************
- *** 68,74 ****
- X register token_number = 0;
- X KDE *tkde = (KDE *)0;
- X int KDEt = 0;
- ! int done = 0;
- X char *token_separator = ":";
- X char *token;
- X char *arg_token();
- --- 70,76 ----
- X register token_number = 0;
- X KDE *tkde = (KDE *)0;
- X int KDEt = 0;
- ! int octothorpe = 0;
- X char *token_separator = ":";
- X char *token;
- X char *arg_token();
- ***************
- *** 75,82 ****
- X char *str_token();
- X char *skip_ld_break();
- X
- ! while(!done && (token = (token_number < 2) ? str_token(bufptr,":")
- ! : arg_token(bufptr," \t")))
- X {
- X bufptr = (char *)0; /* further calls to arg_token need NULL */
- X token = skip_ld_break(token);
- --- 77,85 ----
- X char *str_token();
- X char *skip_ld_break();
- X
- ! while(!octothorpe &&
- ! (token = (token_number < 2) ? str_token(bufptr,":")
- ! : arg_token(bufptr," \t")))
- X {
- X bufptr = (char *)0; /* further calls to arg_token need NULL */
- X token = skip_ld_break(token);
- ***************
- *** 106,124 ****
- X case 2: /* third field is first token of sequence */
- X if(*token == '#')
- X goto MISSING_SEQUENCE;
- - #ifdef notdef /* allow any char as first */
- - if(((itmp = ascii_to_hex(token)) < 1) || (itmp >= SPACE))
- - { /* make sure it is non-printable */
- - ff(se,
- - " %s: first char in sequence must be in the range 0x01 to 0x1F not '%s'\r\n",
- - keyset_idstr(KDEt),token);
- - return(-1);
- - }
- - #endif
- X
- X default: /* third and subsequent to define key */
- X if(*token == '#')
- ! done = 1;
- X if(tkde->count == sizeof(tkde->str))
- X {
- X ff(se," %s: output count too long",
- --- 109,121 ----
- X case 2: /* third field is first token of sequence */
- X if(*token == '#')
- X goto MISSING_SEQUENCE;
- X
- X default: /* third and subsequent to define key */
- X if(*token == '#')
- ! {
- ! octothorpe = 1;
- ! break;
- ! }
- X if(tkde->count == sizeof(tkde->str))
- X {
- X ff(se," %s: output count too long",
- ***************
- *** 136,141 ****
- --- 133,141 ----
- X break;
- X } /* end of switch(token_number) */
- X
- + if(octothorpe)
- + break;
- +
- X token_number++;
- X
- X } /* end while not end of record */
- ***************
- *** 158,163 ****
- --- 158,167 ----
- X /* special init string entry */
- X if(KDEt == KDEk_InitStr)
- X fwrite(tkde->str,1,tkde->count,se);
- + #if defined(NONANSI_DEBUG)
- + else
- + hex_dump_fp(nadbg,tkde->str,tkde->count,keyset_idstr(KDEt),0);
- + #endif
- X return(0);
- X }
- X
- ***************
- *** 177,182 ****
- --- 181,190 ----
- X FILE *fp_keys;
- X int errstat = 0;
- X static char ecukeys_name[128];
- + #if defined(NONANSI_DEBUG)
- + if(!nadbg)
- + nadbg = fopen("/tmp/nadbg.log","w");
- + #endif
- X
- X nonansi_key_init(); /* clear any previous key defns */
- X
- ***************
- *** 213,219 ****
- X }
- X if(errstat)
- X {
- ! ff(se,"terminal type '%s' not found in %s; unable to proceed\r\n",
- X name,ecukeys_name);
- X termecu(TERMECU_CONFIG_ERROR);
- X }
- --- 221,227 ----
- X }
- X if(errstat)
- X {
- ! ff(se,"terminal type '%s'\r\nnot found in %s; unable to proceed\r\n",
- X name,ecukeys_name);
- X termecu(TERMECU_CONFIG_ERROR);
- X }
- ***************
- *** 296,306 ****
- X register ikde;
- X register KDE *tkde;
- X int err_rtn = XF_no_way;
- - #if defined(NONANSI_DEBUG)
- - static FILE *nadbg = (FILE *)0;
- - if(!nadbg)
- - nadbg = fopen("/tmp/nadbg.log","w");
- - #endif
- X
- X if(!buflen)
- X return(XF_not_yet);
- --- 304,309 ----
- ***************
- *** 307,313 ****
- X
- X #if defined(NONANSI_DEBUG)
- X if(nadbg)
- ! hex_dump_fp(nadbg,buf,buflen,"mapna",1);
- X #endif
- X
- X for(ikde = 0,tkde = nonansi_key_table; ikde < KDE_COUNT;
- --- 310,316 ----
- X
- X #if defined(NONANSI_DEBUG)
- X if(nadbg)
- ! hex_dump_fp(nadbg,buf,-buflen,"mapna",1);
- X #endif
- X
- X for(ikde = 0,tkde = nonansi_key_table; ikde < KDE_COUNT;
- diff -c /export/home/wht/src/ecu312/patchlevel.h ./patchlevel.h
- *** /export/home/wht/src/ecu312/patchlevel.h Sun Aug 25 17:29:10 1991
- --- ./patchlevel.h Fri Aug 23 14:22:28 1991
- ***************
- *** 1 ****
- ! #define PATCHLEVEL 12
- --- 1 ----
- ! #define PATCHLEVEL 13
- diff -c /export/home/wht/src/ecu312/pc_scr.h ./pc_scr.h
- *** /export/home/wht/src/ecu312/pc_scr.h Thu Jul 25 12:58:00 1991
- --- ./pc_scr.h Sat Aug 24 22:07:04 1991
- ***************
- *** 18,24 ****
- X #define at_RT 0xB4 /* right hand T */
- X #define at_VR 0xB3 /* vertical rule */
- X #define at_HR 0xC4 /* horizontal rule */
- -
- X /*
- X * non-ANSI equivalents
- X */
- --- 18,23 ----
- diff -c /export/home/wht/src/ecu312/pcmd.c ./pcmd.c
- *** /export/home/wht/src/ecu312/pcmd.c Sun Aug 25 17:29:26 1991
- --- ./pcmd.c Sun Aug 25 22:33:14 1991
- ***************
- *** 37,42 ****
- --- 37,43 ----
- X
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- + /*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
- X /*:08-06-1991-21:18-wht@n4hgf-nap -m test wrong sense ... old bug! */
- X /*:08-05-1991-16:22-wht@n4hgf-add nap -1 return and proctrace */
- X /*:07-25-1991-12:58-wht@n4hgf-ECU release 3.10 */
- ***************
- *** 60,65 ****
- --- 61,71 ----
- X
- X #define NAMED_VARIABLE_FLAG 0x1000L
- X
- + #ifdef SVR4
- + # include <sys/termiox.h>
- + extern int hx_flag;
- + #endif
- +
- X extern int proctrace;
- X extern int rcvr_pid;
- X extern ulong colors_current;
- ***************
- *** 420,426 ****
- X lr.buffer = svptr->pb;
- X lr.bufsize = svptr->maxcb;
- X lr.delim = (tesd1) ? tesd1->pb : (char *)0;
- ! lr.echo = (strchr(switches,'e') != (char *)0);
- X (void)lgets_timeout(&lr);
- X if(tesd1)
- X esdfree(tesd1);
- --- 426,432 ----
- X lr.buffer = svptr->pb;
- X lr.bufsize = svptr->maxcb;
- X lr.delim = (tesd1) ? tesd1->pb : (char *)0;
- ! lr.echo_flag = (strchr(switches,'e') != (char *)0);
- X (void)lgets_timeout(&lr);
- X if(tesd1)
- X esdfree(tesd1);
- ***************
- *** 1257,1270 ****
- X if(erc = get_alpha_zstr(param,new_rtscts,sizeof(new_rtscts)))
- X return(erc);
- X
- ! #if defined(RTSFLOW)
- X lRTSCTS_control(yes_or_no(new_rtscts));
- X
- X if(proctrace)
- X {
- X pprintf("RTS %s CTS %s\n",
- X (Ltermio.c_cflag & RTSFLOW) ? "on" : "off",
- X (Ltermio.c_cflag & CTSFLOW) ? "on" : "off");
- X }
- X #else
- X if(proctrace)
- --- 1263,1288 ----
- X if(erc = get_alpha_zstr(param,new_rtscts,sizeof(new_rtscts)))
- X return(erc);
- X
- ! #if defined(RTSFLOW) || defined (SVR4) || defined(sun)
- X lRTSCTS_control(yes_or_no(new_rtscts));
- X
- X if(proctrace)
- X {
- X pprintf("RTS %s CTS %s\n",
- + #ifdef SVR4
- + (hx_flag & RTSXOFF) ? "on" : "off",
- + (hx_flag & CTSXON) ? "on" : "off");
- + #else
- + #if defined(RTSFLOW)
- X (Ltermio.c_cflag & RTSFLOW) ? "on" : "off",
- X (Ltermio.c_cflag & CTSFLOW) ? "on" : "off");
- + #else
- + #if defined(sun)
- + "N/A",
- + (Ltermio.c_cflag & CRTSCTS) ? "on" : "off");
- + #endif /* sun */
- + #endif /* RTSFLOW */
- + #endif /* SVR4 */
- X }
- X #else
- X if(proctrace)
- diff -c /export/home/wht/src/ecu312/pprintf.c ./pprintf.c
- *** /export/home/wht/src/ecu312/pprintf.c Thu Jul 25 12:59:00 1991
- --- ./pprintf.c Fri Aug 23 14:22:38 1991
- ***************
- *** 9,14 ****
- --- 9,15 ----
- X supplied too, in which case %p prints as a 16-bit segment offset.
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- + /*:08-21-1991-02:12-wht@n4hgf-handle char *sprintf */
- X /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
- X /*:01-09-1991-22:31-wht@n4hgf-ISC port */
- X /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
- ***************
- *** 82,88 ****
- --- 83,94 ----
- X case 's':
- X *tp++ = c;
- X *tp = '\0';
- + #if defined(INT_SPRINTF)
- X dp += sprintf(dp,tempfmt,va_arg(args,char *));
- + #else
- + sprintf(dp,tempfmt,va_arg(args,char *));
- + dp += strlen(dp);
- + #endif
- X break;
- X case 'u':
- X case 'x':
- ***************
- *** 93,102 ****
- X *tp = '\0';
- X #if !defined(LONGINT)
- X if(longflag)
- X dp += sprintf(dp,tempfmt,va_arg(args,unsigned long));
- ! else
- X #endif
- X dp += sprintf(dp,tempfmt,va_arg(args,unsigned));
- X break;
- X #endif
- X case 'd':
- --- 99,121 ----
- X *tp = '\0';
- X #if !defined(LONGINT)
- X if(longflag)
- + {
- + #if defined(INT_SPRINTF)
- X dp += sprintf(dp,tempfmt,va_arg(args,unsigned long));
- ! #else
- ! sprintf(dp,tempfmt,va_arg(args,unsigned long));
- ! dp += strlen(dp);
- X #endif
- + }
- + else
- + #endif /* LONGINT */
- + {
- + #if defined(INT_SPRINTF)
- X dp += sprintf(dp,tempfmt,va_arg(args,unsigned));
- + #else
- + sprintf(dp,tempfmt,va_arg(args,unsigned));
- + dp += strlen(dp);
- + #endif
- X break;
- X #endif
- X case 'd':
- ***************
- *** 106,115 ****
- --- 125,148 ----
- X *tp = '\0';
- X #if !defined(LONGINT)
- X if(longflag)
- + {
- + #if defined(INT_SPRINTF)
- X dp += sprintf(dp,tempfmt,va_arg(args,long));
- + #else
- + sprintf(dp,tempfmt,va_arg(args,long));
- + dp += strlen(dp);
- + #endif
- + }
- X else
- X #endif
- + {
- + #if defined(INT_SPRINTF)
- X dp += sprintf(dp,tempfmt,va_arg(args,int));
- + #else
- + sprintf(dp,tempfmt,va_arg(args,int));
- + dp += strlen(dp);
- + #endif
- + }
- X break;
- X case 'f':
- X case 'e':
- ***************
- *** 118,124 ****
- --- 151,162 ----
- X case 'G':
- X *tp++ = c;
- X *tp = '\0';
- + #if defined(INT_SPRINTF)
- X dp += sprintf(dp,tempfmt,va_arg(args,double));
- + #else
- + sprintf(dp,tempfmt,va_arg(args,double));
- + dp += strlen(dp);
- + #endif
- X break;
- X case 'p':
- X #if defined(M_I286)
- ***************
- *** 129,135 ****
- --- 167,178 ----
- X dp += sprintf(dp,"%04x:%04x",(int)tp,(int)((long)tp >> 16));
- X #endif /* M_SDATA */
- X #else
- + #if defined(INT_SPRINTF)
- X dp += sprintf(dp,"0x%08lx",va_arg(args,pointer));
- + #else
- + sprintf(dp,"0x%08lx",va_arg(args,pointer));
- + dp += strlen(dp);
- + #endif
- X #endif /* M_I286 */
- X break;
- X case '-':
- ***************
- *** 157,163 ****
- --- 200,211 ----
- X #endif
- X goto continue_format;
- X case '*':
- + #if defined(INT_SPRINTF)
- X tp += sprintf(tp,"%d",va_arg(args,int));
- + #else
- + printf(tp,"%d",va_arg(args,int));
- + tp += strlen(tp);
- + #endif
- X goto continue_format;
- X case '%':
- X default:
- diff -c /export/home/wht/src/ecu312/proc.c ./proc.c
- *** /export/home/wht/src/ecu312/proc.c Thu Jul 25 12:59:00 1991
- --- ./proc.c Fri Aug 23 14:22:39 1991
- ***************
- *** 538,545 ****
- --- 538,547 ----
- X }
- X }
- X pcb_stack[--proc_level] = (PCB *)0;
- + #if 0
- X if(erc && !proc_level)
- X plog_control((char *)0);
- + #endif
- X return(erc);
- X } /* end of execute_proc */
- X
- diff -c /export/home/wht/src/ecu312/proc_error.c ./proc_error.c
- *** /export/home/wht/src/ecu312/proc_error.c Thu Jul 25 12:59:00 1991
- --- ./proc_error.c Sun Aug 25 23:47:05 1991
- ***************
- *** 1,10 ****
- ! /* CHK=0xD771 */
- X /*+-------------------------------------------------------------------------
- X proc_error.c - print ecu procedure error
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- ! /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
- ! /*:07-06-1991-22:58-build_err-creation from ecuerror.h */
- X
- X #include "ecu.h"
- X #include "ecuerror.h"
- --- 1,9 ----
- ! /* CHK=0xA7D5 */
- X /*+-------------------------------------------------------------------------
- X proc_error.c - print ecu procedure error
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- ! /*:08-25-1991-23:47-build_err-creation from ecuerror.h */
- X
- X #include "ecu.h"
- X #include "ecuerror.h"
- ***************
- *** 152,157 ****
- --- 151,159 ----
- X break;
- X case eExpectRespondFail:
- X pputs("expect-respond failed\n");
- + break;
- + case eSwitchesTooLong:
- + pputs("switches too long\n");
- X break;
- X case eProcAttn_GOTO:
- X pputs("GOTO detected\n");
- Common subdirectories: /export/home/wht/src/ecu312/sea and ./sea
- Only in .: shar.fls
- diff -c /export/home/wht/src/ecu312/smap.h ./smap.h
- *** /export/home/wht/src/ecu312/smap.h Thu Jul 25 12:59:00 1991
- --- ./smap.h Fri Aug 23 14:22:44 1991
- ***************
- *** 43,49 ****
- --- 43,51 ----
- X VTYPE *malloc();
- X VTYPE *calloc();
- X VTYPE *realloc();
- + #if !defined(sun)
- X void free();
- + #endif
- X #else /* not NOMEMCHECK */
- X #ifndef malloc
- X #define malloc _malloc
- ***************
- *** 53,59 ****
- --- 55,63 ----
- X VTYPE *_malloc();
- X VTYPE *_calloc();
- X VTYPE *_realloc();
- + #if !defined(sun)
- X void _free();
- + #endif
- X #endif /* not malloc */
- X void _blkstart();
- X void _blkend();
- diff -c /export/home/wht/src/ecu312/stdio_lint.h ./stdio_lint.h
- *** /export/home/wht/src/ecu312/stdio_lint.h Thu Jul 25 12:59:00 1991
- --- ./stdio_lint.h Sun Aug 25 14:39:31 1991
- ***************
- *** 3,8 ****
- --- 3,9 ----
- X wht@n4hgf.Mt-Park.GA.US
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- + /*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
- X /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
- X /*:01-18-1991-11:55-wht@n4hgf-fix strchr/strrchr per steve@nshore.ncoast.org */
- X /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
- ***************
- *** 11,27 ****
- X char *gets(char *);
- X char *getenv(char *);
- X int access(char *,int);
- X int chmod(char *,int);
- - int close(int);
- X int creat(char *,int);
- X int dup(int);
- X int fcloseall(void);
- X int isatty(int);
- X long lseek(int,long,int);
- - int puts(char *);
- X int read(int,char *,unsigned int);
- X #ifndef __GNUC__
- X int stat(char *,struct stat *);
- X int fstat(int,struct stat *);
- X #endif
- X long time(long *);
- --- 12,32 ----
- X char *gets(char *);
- X char *getenv(char *);
- X int access(char *,int);
- + #ifndef SVR4
- X int chmod(char *,int);
- X int creat(char *,int);
- + int puts(char *);
- + #endif
- + int close(int);
- X int dup(int);
- X int fcloseall(void);
- X int isatty(int);
- X long lseek(int,long,int);
- X int read(int,char *,unsigned int);
- X #ifndef __GNUC__
- + #ifndef SVR4
- X int stat(char *,struct stat *);
- + #endif
- X int fstat(int,struct stat *);
- X #endif
- X long time(long *);
- ***************
- *** 29,35 ****
- X int write(int,char *,unsigned int);
- X #else
- X char *fgets();
- - void free();
- X char *getenv();
- X char *gets();
- X long ftell();
- --- 34,39 ----
- diff -c /export/home/wht/src/ecu312/utmpstat.c ./utmpstat.c
- *** /export/home/wht/src/ecu312/utmpstat.c Sun Aug 25 17:28:41 1991
- --- ./utmpstat.c Sun Aug 25 16:17:31 1991
- ***************
- *** 11,16 ****
- --- 11,18 ----
- X
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- + /*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
- + /*:08-21-1991-02:23-wht@n4hgf-sun port */
- X /*:08-10-1991-17:39-wht@n4hgf-US_WEGOTIT handling */
- X /*:07-25-1991-12:59-wht@n4hgf-ECU release 3.10 */
- X /*:02-13-1991-02:00-ache@hq.demos.su-swap patch 5 US_ return values */
- ***************
- *** 28,40 ****
- X #include <errno.h>
- X #include <utmp.h>
- X
- X #if !defined(ut_name) /* nobody can keep their mind made up; ... */
- X #define ut_name ut_user /* ... this is getting verry difficult, very old */
- X #endif
- X
- ! extern int errno;
- !
- X char *utmp_file = "/etc/utmp";
- X struct utmp last_utmp;
- X
- X /*+-------------------------------------------------------------------------
- --- 30,49 ----
- X #include <errno.h>
- X #include <utmp.h>
- X
- + #if defined(sun)
- + #define ut_id ut_host //* fake debug info */
- + #else
- X #if !defined(ut_name) /* nobody can keep their mind made up; ... */
- X #define ut_name ut_user /* ... this is getting verry difficult, very old */
- X #endif
- + #endif /* sun */
- X
- ! #if defined(SVR4)
- ! char *utmp_file = "/var/adm/utmp";
- ! #else
- X char *utmp_file = "/etc/utmp";
- + #endif
- +
- X struct utmp last_utmp;
- X
- X /*+-------------------------------------------------------------------------
- ***************
- *** 74,82 ****
- X utmp_status(line)
- X char *line;
- X {
- X register ufd;
- X int itmp;
- - register status = US_NOTFOUND;
- X #if defined(LOG_UTMP)
- X char logstr[128];
- X #endif
- --- 83,92 ----
- X utmp_status(line)
- X char *line;
- X {
- + register status = US_NOTFOUND;
- + #if !defined(sun)
- X register ufd;
- X int itmp;
- X #if defined(LOG_UTMP)
- X char logstr[128];
- X #endif
- ***************
- *** 142,147 ****
- --- 152,158 ----
- X #endif
- X
- X close(ufd);
- + #endif /* sun */
- X return(status);
- X
- X } /* end of utmp_status */
- Common subdirectories: /export/home/wht/src/ecu312/xsel386 and ./xsel386
- Common subdirectories: /export/home/wht/src/ecu312/z and ./z
- SHAR_EOF
- echo 'File PATCH3.01 is complete' &&
- chmod 0664 PATCH3.01 ||
- echo 'restore of PATCH3.01 failed'
- Wc_c="`wc -c < 'PATCH3.01'`"
- test 135045 -eq "$Wc_c" ||
- echo 'PATCH3.01: original size 135045, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- rm -f _shar_seq_.tmp
- echo You have unpacked the last part
- exit 0
-
- exit 0 # Just in case...
-