home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-07-02 | 45.0 KB | 1,650 lines |
- Newsgroups: comp.sources.misc
- subject: v13i085: ecu 2.80 patch 4
- From: wht@gatech.edu@n4hgf.Mt-Park.GA.US.UUCP (Warren Tucker)
- Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
-
- Posting-number: Volume 13, Issue 85
- Submitted-by: wht@gatech.edu@n4hgf.Mt-Park.GA.US.UUCP (Warren Tucker)
- Archive-name: ecu2.80/patch04
-
- Changes since ecu 2.80 patchlevel 3
-
- 1. A problem with passing arguments to an initial procedure was
- fixed. Getopt() is now used, which requires that all switch
- command arguments must precede the non-switch arguments.
- This was not true in previous revisions of ecu.
-
- 2. A new (non-standard) escape sequence has been added to the
- expresp procedure command. \m### causes a ### millisecond delay.
- Note this adds an ambiguity to the syntax of the send string:
- you may not follow an \m delay with a literal digit to send.
- For example, suppose you wish to delay 300 missileconds then
- send "4A". \m3004A will delay for 3004 (approximately) milliseconds,
- then send an "A". You must, instead, use \m300\034A to achieve
- the desired result.
-
- 3. The method of choosing a shared memory segment key changed.
- Previously, ftok() was used. Now, the algorithm is
- 0xEC000000L | getpid();
-
- 4. The -D switch has been added to cause ecu to terminate
- unconditionally upon completion of an initial procedure (-p).
-
- 5. Other minor unreported bugs were fixed.
-
- #!/bin/sh
- # This is ecu2.80/patch03, a shell archive (shar 3.31)
- # made 07/02/1990 00:14 UTC by wht@n4hgf.Mt-Park.GA.US
- # Source directory /u1/src/ecu
- #
- # existing files WILL be overwritten
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 9366 -rw-r--r-- ecu.c
- # 2587 -rw-r--r-- help/lint_args.h
- # 28750 -rw-r--r-- ECU280.P04
- # 470 -rwxr-xr-x APPLY.P04
- #
- if touch 2>&1 | fgrep 'mmdd' > /dev/null
- then TOUCH=touch
- else TOUCH=true
- fi
- # ============= ecu.c ==============
- echo "x - extracting ecu.c (Text)"
- sed 's/^X//' << 'SHAR_EOF' > ecu.c &&
- X/* CHK=0x130C */
- X/*+-----------------------------------------------------------------------
- X ecu.c
- X wht%n4hgf@gatech.edu
- X
- X Defined functions:
- X main(argc,argv,envp)
- X xmtr()
- X
- X------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:07-01-1990-19:06-wht@n4hgf-add -D switch */
- X/*:06-09-1990-02:32-wht@n4hgf-overhaul argv processing */
- X/*:05-10-1990-16:44-wht@n4hgf-move patchlevel to hello_str from ecuicmd.c */
- X/*:05-07-1990-21:23-wht@n4hgf---- 2.80 --- */
- X/*:04-19-1990-03:07-wht@n4hgf-GCC run found unused vars -- rm them */
- X/*:03-27-1990-15:18-wht@n4hgf-overhaul for/wait/SIGCLD handling */
- X/*:03-26-1990-15:11-wht@n4hgf-better diag when line choice fails with HDB */
- X/*:03-25-1990-14:11-wht@n4hgf------ x2.70 ------- */
- X/*:03-16-1990-04:30-wht@n4hgf-make ftime call for starting_timeb */
- X/*:02-20-1990-03:50-wht-per doc, do not assume timeval unmodified by select */
- X/*:10-14-1989-21:10-wht-allow user to change ecu color choices */
- X/*:07-03-1989-22:57-wht------ x2.00 ----- */
- X/*:06-24-1989-16:52-wht-flush edits --- ecu 1.95 */
- X
- X#define DECLARE_LINEVARS_PUBLIC
- X#include "ecu.h"
- X#include "esd.h"
- X#include "proc.h"
- X#include "ecukey.h"
- X#include "ecuxkey.h"
- X#include "ecuhangup.h"
- X#include "patchlevel.h"
- X
- Xchar *getenv();
- X
- Xextern char *makedate; /* temporary make date */
- Xextern char *numeric_revision; /* ecunumrev.c */
- Xextern char *revision_modifier; /* ecunumrev.c */
- Xextern ESD *icmd_prompt;
- Xextern char kbdeof; /* current input EOF */
- Xextern char kbdeol2; /* current secondary input EOL */
- Xextern char kbdeol; /* current input EOL */
- Xextern char kbderase; /* current input ERASE */
- Xextern char kbdintr; /* current input INTR */
- Xextern char kbdkill; /* current input KILL */
- Xextern char kbdquit; /* current input QUIT */
- Xextern ulong colors_current;
- Xextern int there_is_hdb_on_this_machine;
- Xextern char lopen_err_str[];
- X
- Xchar curr_dir[258]; /* current working directory of process */
- Xchar hello_str[80]; /* msg printed upon BOJ */
- Xchar errmsg[128];
- Xchar modem_ctl_fname[128];
- Xchar initial_procedure[128] = "";
- Xint init_proc_argc = 0;
- Xchar *init_proc_argv[MAX_PARGV];
- Xint quiet = 0; /* don't shut up is default */
- Xint rcvr_pid = -1; /* pid for rcvr process (-1 == no proc active) */
- X /* ... -2 == special flag for modem control/timed-read procedures */
- Xint xmtr_pid = 0;
- Xint quit_on_init_proc_fail = 0;
- Xint quit_on_init_proc_done = 0;
- Xstruct timeb starting_timeb;
- X
- X/*-----------------------*/
- Xint nice_value = 3; /* go for hi priority */
- Xushort geteuid();
- Xushort getuid();
- Xushort euid;
- Xushort uid;
- X/*-----------------------*/
- X
- X/*+-----------------------------------------------------------------------
- X xmtr() -- copy stdin to comm line
- X
- X THE INITIAL PROCESS EXECUTES THIS PROCESS UNTIL PROGRAM TERMINATION
- X
- X TTY input lines beginning with % have special significance
- X (see ecuicmd.c)
- X------------------------------------------------------------------------*/
- Xint
- Xxmtr()
- X{
- Xuchar xmtr_char;
- Xuchar nlchar = NL;
- Xvoid xmtr_SIGINT_handler();
- X
- X ttymode(1);
- X xmtr_signals();
- X while(1)
- X {
- X/* bug somewhere ... may be SIGINT too rapidly causing SIG_IGN ????? */
- X signal(SIGINT,xmtr_SIGINT_handler); /* so make sure */
- X xmtr_char = ttygetc(1);
- X
- X if(xmtr_char & 0x80)
- X {
- X kbd_escape(xmtr_char);
- X continue;
- X }
- X
- X lputc(xmtr_char);
- X if(shm->Lfull_duplex == 0) /* echo character if asked */
- X write(TTYERR,&xmtr_char,1);
- X
- X if(xmtr_char == CR)
- X {
- X if(shm->Ladd_nl_outgoing)
- X lputc('\n');
- X if(shm->Lfull_duplex == 0)
- X write(TTYERR,&nlchar,1);
- X }
- X } /* end of while we can read a character */
- X return(HANGUP_XMTR_LOGIC_ERROR); /* should not have gotten here */
- X
- X} /* end of xmtr */
- X
- X/*+-------------------------------------------------------------------------
- X main(argc,argv,envp)
- X
- X main() program forks to create rcvr process; then main()
- X becomes the xmtr process
- X------------------------------------------------------------------------*/
- Xmain(argc,argv,envp)
- Xint argc;
- Xchar **argv;
- Xchar **envp;
- X{
- Xint swchar;
- Xint itmp;
- Xulong colors_save;
- Xchar *get_ttyname();
- Xextern char *optarg;
- Xextern int optind;
- X
- X setbuf(stderr,NULL);
- X ttyinit(); /* init console tty mode handler */
- X clear_screen();
- X xmtr_pid = getpid();
- X ftime(&starting_timeb); /* get startup time */
- X
- X/* get this off quick, cause we'll be busy for a little while on 286 */
- X sprintf(hello_str,"ecu %s.%02d%s by wht@n4hgf (pid %d)",
- X numeric_revision,PATCHLEVEL,revision_modifier,xmtr_pid);
- X ff(se,"%s\n",hello_str);
- X
- X/* if we are root (as we should be on 286 versions), nice to very bad
- X and set uid to real uid */
- X
- X uid = getuid();
- X euid = geteuid();
- X if((euid == 0) || (uid == 0)) /* if root running or prog text ... */
- X { /* ... sets to root, then grab gusto */
- X int old_nice = nice(0) + 20;
- X nice(-old_nice + nice_value);
- X if(uid != euid) /* but if user not really root ... */
- X {
- X if(setuid(uid)) /* ... take away the privilege */
- X {
- X ff(se,"\r\n");
- X perror("setuid");
- X ff(se,"\r\n");
- X exit(-1);
- X }
- X }
- X }
- X
- X shm_init(); /* open shared segment */
- X
- X keyset_init(); /* intialize keyset */
- X
- X make_ecu_subdir(); /* needs to be very early before lots of init */
- X
- X xmtr_signals(); /* catch xmtr signals */
- X
- X get_curr_dir(curr_dir,sizeof(curr_dir));
- X cd_array_init(); /* read %cd directory list */
- X
- X hdb_init();
- X
- X var_init(); /* initialize procedure variables */
- X poutput_init(); /* initialize procedure output */
- X
- X icmd_prompt = make_esd(64);
- X set_default_escape_prompt();
- X ttymode(1); /* put user console in `raw' mode */
- X
- X/* init line variables */
- X shm->Lline[0] = 0; /* no line chosen yet */
- X shm->Liofd = -1; /* no line open now */
- X shm->Lbaud = DEFAULT_BAUD_RATE; /* see ecu.h */
- X shm->Lparity = 0; /* no parity selected ... default NONE */
- X shm->Ltelno[0] = 0; /* no telephone number for remote yet */
- X shm->Llogical[0] = 0; /* no logical name for remote yet */
- X shm->Lrname[0] = 0; /* no logical name for remote yet */
- X shm->Ldescr[0] = 0; /* no description for remote yet */
- X shm->Lmodem_off_hook = 0; /* assume modem on hook */
- X shm->Ladd_nl_incoming = 0; /* dont add nl to incoming cr */
- X shm->Ladd_nl_outgoing = 0; /* dont add nl to outgoing cr */
- X shm->Lfull_duplex = 1; /* assume full duplex */
- X shm->Lmodem_already_init = 0; /* modem has not been initialized */
- X shm->Lxonxoff = IXON | IXOFF; /* default to xon/xoff protocol */
- X shm->xmtr_pid = getpid();
- X shm->xmtr_ppid = getppid();
- X shm->xmtr_pgrp = getpgrp(0);
- X strcpy(shm->tty_name,get_ttyname());
- X shm->shm_revision = SHM_REV;
- X
- X while((swchar = getopt(argc,argv,"c:p:l:b:hfdDteo")) != -1)
- X {
- X switch(swchar)
- X {
- X case 'b':
- X if(valid_baud_rate(shm->Lbaud = atoi(optarg)) < 0)
- X {
- X ff(se,"invalid baud rate %u\r\n",shm->Lbaud);
- X usage();
- X }
- X break;
- X case 'c':
- X strcpy(modem_ctl_fname,optarg);
- X break;
- X case 'l':
- X shm->Lline[0] = 0;
- X if(strncmp(optarg,"/dev/tty",8))
- X strcpy(shm->Lline,"/dev/tty");
- X strcat(shm->Lline,optarg);
- X break;
- X case 'p':
- X strcpy(initial_procedure,optarg);
- X break;
- X case 'h': shm->Lfull_duplex = 0; break;
- X case 'f': shm->Lfull_duplex = 1; break;
- X case 'd': quit_on_init_proc_fail = 1; break;
- X case 'D': quit_on_init_proc_done = 1; break;
- X case 't': shm->Ladd_nl_incoming = 1;
- X shm->Ladd_nl_outgoing = 1; break;
- X case 'e': shm->Lparity = 'e'; break;
- X case 'o': shm->Lparity = 'o'; break;
- X case '?': usage();
- X }
- X }
- X
- X/* check out line */
- X if(!shm->Lline[0])
- X {
- X if(!there_is_hdb_on_this_machine)
- X strcpy(shm->Lline,"/dev/tty1a");
- X else
- X {
- X choose_line(shm->Lbaud);
- X if(!shm->Lline[0])
- X {
- X ff(se,"\r\n");
- X ff(se,"\r\n");
- X stand_out();
- X ff(se,"[no available Devices line at %u baud]",shm->Lbaud);
- X stand_end();
- X ff(se,"\r\n");
- X strcpy(shm->Lline,"/dev/tty1a");
- X }
- X }
- X }
- X
- X if(initial_procedure[0])
- X {
- X init_proc_argv[0] = initial_procedure;
- X init_proc_argc = 1;
- X for(itmp = optind; itmp < argc; itmp++)
- X {
- X if(*argv[itmp] != '-')
- X {
- X if(init_proc_argc == MAX_PARGV)
- X {
- X ff(se,"too many arguments to initial procedure\r\n");
- X hangup(HANGUP_USAGE);
- X }
- X init_proc_argv[init_proc_argc++] = argv[itmp];
- X }
- X }
- X
- X /* wierd bug fixed by this ... I know not why */
- X windows_start();
- X windows_end2();
- X fflush(so);
- X
- X ttymode(2);
- X if(do_proc(init_proc_argc,init_proc_argv))
- X {
- X if(quit_on_init_proc_fail || quit_on_init_proc_done)
- X hangup(HANGUP_INIT_PROC_ERROR);
- X }
- X proc_file_reset();
- X colors_save = colors_current;
- X setcolor(colors_notify);
- X fputs("[procedure finished]",se);
- X setcolor(colors_save);
- X ff(se,"\r\n");
- X if(quit_on_init_proc_done)
- X hangup(0);
- X if(shm->Liofd < 0)
- X {
- X ff(se,"\r\n");
- X ff(se,"\r\n");
- X stand_out();
- X ff(se, "[no line attached by initial procedure]");
- X stand_end();
- X ff(se,"\r\n");
- X if(quit_on_init_proc_fail)
- X hangup(HANGUP_INIT_PROC_ERROR);
- X stand_out();
- X ff(se, "[press ESC to exit or SPACE for setup menu]");
- X stand_end();
- X itmp = ttygetc(0);
- X ff(se,"\r\n");
- X if(itmp == ESC)
- X hangup(1);
- X ttymode(1);
- X setup_screen((char *)0);
- X }
- X else
- X {
- X
- X ttymode(1);
- X start_rcvr_process(0);
- X }
- X }
- X else /* no initial procedure */
- X {
- X ttymode(1);
- X setup_screen((optind < argc) ? argv[optind] : (char *)0);
- X }
- X
- X hangup(xmtr()); /* enter xmtr operation */
- X /*NOTREACHED*/
- X} /* end of main */
- X
- X/* end of ecu.c */
- X/* vi: set tabstop=4 shiftwidth=4: */
- SHAR_EOF
- $TOUCH -am 0701191590 ecu.c &&
- chmod 0644 ecu.c ||
- echo "restore of ecu.c failed"
- set `wc -c ecu.c`;Wc_c=$1
- if test "$Wc_c" != "9366"; then
- echo original size 9366, current size $Wc_c
- fi
- # ============= help/lint_args.h ==============
- if test ! -d 'help'; then
- echo "x - creating directory help"
- mkdir 'help'
- fi
- echo "x - extracting help/lint_args.h (Text)"
- sed 's/^X//' << 'SHAR_EOF' > help/lint_args.h &&
- X/* CHK=0x83EF */
- X/*+-----------------------------------------------------------------------
- X lint_args.h
- X------------------------------------------------------------------------*/
- X/*+:EDITS:*/
- X/*:07-01-1990-19:18-afterlint-creation */
- X
- X#ifndef BUILDING_LINT_ARGS
- X#ifdef LINT_ARGS
- X
- X/* helpgen.c */
- Xint cmd_baud(void );
- Xint cmd_break(void );
- Xint cmd_cd(void );
- Xint cmd_clrx(void );
- Xint cmd_cls(void );
- Xint cmd_color(void );
- Xint cmd_continue(void );
- Xint cmd_cursor(void );
- Xint cmd_delline(void );
- Xint cmd_dial(void );
- Xint cmd_do(void );
- Xint cmd_duplex(void );
- Xint cmd_echo(void );
- Xint cmd_eeol(void );
- Xint cmd_else(void );
- Xint cmd_exit(void );
- Xint cmd_expresp(void );
- Xint cmd_fchmod(void );
- Xint cmd_fclose(void );
- Xint cmd_fdel(void );
- Xint cmd_fgetc(void );
- Xint cmd_fgets(void );
- Xint cmd_fkey(void );
- Xint cmd_flush(void );
- Xint cmd_fopen(void );
- Xint cmd_fputc(void );
- Xint cmd_fputs(void );
- Xint cmd_fread(void );
- Xint cmd_fseek(void );
- Xint cmd_fwrite(void );
- Xint cmd_getf(void );
- Xint cmd_goto(void );
- Xint cmd_gotob(void );
- Xint cmd_hangup(void );
- Xint cmd_hexdump(void );
- Xint cmd_home(void );
- Xint cmd_icolor(void );
- Xint cmd_ifi(void );
- Xint cmd_ifs(void );
- Xint cmd_insline(void );
- Xint cmd_lbreak(void );
- Xint cmd_lgets(void );
- Xint cmd_logevent(void );
- Xint cmd_lookfor(void );
- Xint cmd_mkvar(void );
- Xint cmd_nap(void );
- Xint cmd_parity(void );
- Xint cmd_pclose(void );
- Xint cmd_plog(void );
- Xint cmd_popen(void );
- Xint cmd_prompt(void );
- Xint cmd_ptrace(void );
- Xint cmd_putf(void );
- Xint cmd_return(void );
- Xint cmd_rk(void );
- Xint cmd_rname(void );
- Xint cmd_rs(void );
- Xint cmd_rx(void );
- Xint cmd_ry(void );
- Xint cmd_rz(void );
- Xint cmd_scrdump(void );
- Xint cmd_send(void );
- Xint cmd_set(void );
- Xint cmd_sk(void );
- Xint cmd_ss(void );
- Xint cmd_sx(void );
- Xint cmd_sy(void );
- Xint cmd_system(void );
- Xint cmd_sz(void );
- Xint cmd_vidcolor(void );
- Xint cmd_vidnorm(void );
- Xint cmd_vidrev(void );
- Xint cmd_whilei(void );
- Xint cmd_whiles(void );
- Xint cmd_xon(void );
- Xint main(int ,char **,char **);
- Xint usage(void );
- Xstruct p_cmd *search_cmd_list(char *);
- Xvoid build_ecudoc(void );
- Xvoid build_ecuhelp(void );
- Xvoid build_ecutxt(void );
- Xvoid show_cmds(void );
- Xvoid test_help(void );
- X/* util.c */
- Xchar to_lower(char );
- Xchar to_upper(char );
- Xvoid pad_zstr_to_len(char *,int );
- X
- X#else /* compiler doesn't know about prototyping */
- X
- X/* helpgen.c */
- Xstruct p_cmd *search_cmd_list();
- Xvoid build_ecudoc();
- Xvoid build_ecuhelp();
- Xvoid build_ecutxt();
- Xvoid show_cmds();
- Xvoid test_help();
- X/* util.c */
- Xchar to_lower();
- Xchar to_upper();
- Xvoid pad_zstr_to_len();
- X
- X#endif /* LINT_ARGS */
- X#endif /* BUILDING_LINT_ARGS */
- X
- X/* end of lint_args.h */
- SHAR_EOF
- $TOUCH -am 0701191890 help/lint_args.h &&
- chmod 0644 help/lint_args.h ||
- echo "restore of help/lint_args.h failed"
- set `wc -c help/lint_args.h`;Wc_c=$1
- if test "$Wc_c" != "2587"; then
- echo original size 2587, current size $Wc_c
- fi
- # ============= ECU280.P04 ==============
- echo "x - extracting ECU280.P04 (Text)"
- sed 's/^X//' << 'SHAR_EOF' > ECU280.P04 &&
- X#-------------------------------------------------------
- X# ECU280.P04
- X# miscellaneous (see README)
- X# created by gendiff x1.03 on 02 Jul 1990 00:09 UTC
- X#-------------------------------------------------------
- X*** /u4/ecurel/Make.ecu Sun Jul 1 20:08:15 1990
- X--- Make.ecu Mon Jun 25 02:37:50 1990
- X***************
- X*** 81,87
- X .c.o:; /bin/time cc -c $(CFLAGS) $*.c
- X
- X SHARFLS = README Make.ecu *.c *.h \
- X! help/Makefile help/*.{c,src} \
- X ecufriend/{Makefile,*.{c,h}} \
- X ecuungetty/Makefile ecuungetty/*.{c,h} \
- X mapkey/README mapkey/keys.usa.ecu.d\
- X
- X--- 81,87 -----
- X .c.o:; /bin/time cc -c $(CFLAGS) $*.c
- X
- X SHARFLS = README Make.ecu *.c *.h \
- X! help/Makefile help/*.{h,c,src} \
- X ecufriend/{Makefile,*.{c,h}} \
- X ecuungetty/Makefile ecuungetty/*.{c,h} \
- X mapkey/README mapkey/keys.usa.ecu.d\
- X*** /u4/ecurel/README Sun Jul 1 20:08:16 1990
- X--- README Sun Jul 1 19:46:21 1990
- X***************
- X*** 341,343
- X
- X 2. The built-in help file (ecuhelp.data) was revised.
- X
- X
- X--- 341,374 -----
- X
- X 2. The built-in help file (ecuhelp.data) was revised.
- X
- X+ Changes since ecu 2.80 patchlevel 2
- X+
- X+ 1. Patch 3 added a window mode selection to the sz file transfer menu;
- X+ also, the unacknowledged data quantity (called "window") was
- X+ added to the sz file transfer display.
- X+
- X+ Changes since ecu 2.80 patchlevel 3
- X+
- X+ 1. A problem with passing arguments to an initial procedure was
- X+ fixed. Getopt() is now used, which requires that all switch
- X+ command arguments must precede the non-switch arguments.
- X+ This was not true in previous revisions of ecu.
- X+
- X+ 2. A new (non-standard) escape sequence has been added to the
- X+ expresp procedure command. \m### causes a ### millisecond delay.
- X+ Note this adds an ambiguity to the syntax of the send string:
- X+ you may not follow an \m delay with a literal digit to send.
- X+ For example, suppose you wish to delay 300 missileconds then
- X+ send "4A". \m3004A will delay for 3004 (approximately) milliseconds,
- X+ then send an "A". You must, instead, use \m300\034A to achieve
- X+ the desired result.
- X+
- X+ 3. The method of choosing a shared memory segment key changed.
- X+ Previously, ftok() was used. Now, the algorithm is
- X+ 0xEC000000L | getpid();
- X+
- X+ 4. The -D switch has been added to cause ecu to terminate
- X+ unconditionally upon completion of an initial procedure (-p).
- X+
- X+ 5. Other minor unreported bugs were fixed.
- X+
- X*** /u4/ecurel/doc/_features.txt Fri Apr 20 00:43:00 1990
- X--- doc/_features.txt Sun Jun 10 13:35:44 1990
- X***************
- X*** 262,268
- X process concept through commands and functions which allow
- X .BL
- X .LI
- X! passing the ECU shared memory segment id (shmid) to a called
- X program,
- X .LI
- X reading a single character or string of characters from
- X
- X--- 262,268 -----
- X process concept through commands and functions which allow
- X .BL
- X .LI
- X! passing the ECU shared memory segment id (%shmid) to a called
- X program,
- X .LI
- X reading a single character or string of characters from
- X***************
- X*** 273,278
- X reading and writing of characters, short or long integers and
- X strings in the 1024-byte "friend" shared memory data area.
- X .LE
- X
- X This facility allows batch and interactive applications
- X to be developed with C programs which would be
- X
- X--- 273,295 -----
- X reading and writing of characters, short or long integers and
- X strings in the 1024-byte "friend" shared memory data area.
- X .LE
- X+
- X+ The algorithm for obtaining the shared memory segment key is
- X+ .DS L
- X+ 0xEC000000L + transmitter process id
- X+ .DE
- X+ Thus a "friend" process may either use a %shmid
- X+ .B
- X+ shared memory key
- X+ .R
- X+ passed as an argument or obtain the
- X+ .B
- X+ shared memory key
- X+ .R
- X+ by using:
- X+ .DS L
- X+ key_t shmkey = 0xEC000000L | getppid();
- X+ .DE
- X
- X This facility allows batch and interactive applications
- X to be developed with C programs which would be
- X*** /u4/ecurel/doc/_p_cmd.txt Sun Jul 1 20:07:13 1990
- X--- doc/_p_cmd.txt Sun Jun 10 14:00:30 1990
- X***************
- X*** 455,460
- X \\\c - no new-line
- X \\\n - send new-line
- X \\\nnn - send octal number
- X Speed - Hayes-specific speed-adaptive connect handler
- X .DE
- X
- X
- X--- 455,462 -----
- X \\\c - no new-line
- X \\\n - send new-line
- X \\\nnn - send octal number
- X+ \\\m## - delay ## milliseconds (NOT SUPPORTED BY DIALERS;
- X+ SEE BELOW)
- X Speed - Hayes-specific speed-adaptive connect handler
- X .DE
- X
- X***************
- X*** 464,469
- X The resolution for timeouts is limited to the basic tick time of
- X your system (HZ, 10 msec for UNIX/386, 20 msec for XENIX/386 and XENIX/286).
- X The timeout for 'Speed' expects is fixed at 90 seconds.
- X
- X .*s 3 "fchmod"
- X
- X
- X--- 466,480 -----
- X The resolution for timeouts is limited to the basic tick time of
- X your system (HZ, 10 msec for UNIX/386, 20 msec for XENIX/386 and XENIX/286).
- X The timeout for 'Speed' expects is fixed at 90 seconds.
- X+
- X+
- X+ \\\m### causes a ### millisecond delay. Note this adds an ambiguity to
- X+ the syntax of the send string: you may not follow an \m delay with a
- X+ literal digit to send. For example, suppose you wish to delay 300
- X+ missileconds then send "4A". \\\m3004A will delay for 3004
- X+ (approximately) milliseconds, then send an "A". You must, instead, use
- X+ \\\m300\\\034A to achieve the desired result.
- X+
- X
- X .*s 3 "fchmod"
- X
- X*** /u4/ecurel/doc/_startup.txt Sat Apr 14 23:24:00 1990
- X--- doc/_startup.txt Sun Jul 1 19:12:17 1990
- X***************
- X*** 107,114
- X .DS I
- X ecu [-lxx] [-b<baud>] [-h] [-e|-o] [-t] <tel-number>
- X ecu [-lxx] [-b<baud>] [-h] [-e|-o] [-t]
- X! ecu [-t] <logical>
- X! ecu [-lxx] [-b<baud>] [-h] [-e|-o] [-d] -p <proc> [<arg> ...]
- X .DE
- X
- X .*s 3 "-l"
- X
- X--- 107,114 -----
- X .DS I
- X ecu [-lxx] [-b<baud>] [-h] [-e|-o] [-t] <tel-number>
- X ecu [-lxx] [-b<baud>] [-h] [-e|-o] [-t]
- X! ecu [-t] [-h] <logical>
- X! ecu [-lxx] [-b<baud>] [-h] [-e|-o] [-d] [-D] -p <proc> [<arg> ...]
- X .DE
- X
- X .*s 3 "Non-Switch Arguments"
- X***************
- X*** 111,116
- X ecu [-lxx] [-b<baud>] [-h] [-e|-o] [-d] -p <proc> [<arg> ...]
- X .DE
- X
- X .*s 3 "-l"
- X
- X When ECU starts up, it normally chooses a line as described later
- X
- X--- 111,159 -----
- X ecu [-lxx] [-b<baud>] [-h] [-e|-o] [-d] [-D] -p <proc> [<arg> ...]
- X .DE
- X
- X+ .*s 3 "Non-Switch Arguments"
- X+
- X+ Only one type of non-switch argument may be used on the command line.
- X+ <tel-number> or <logical> may appear when the -p switch is absent.
- X+ One or more <arg> arguments may appear when the -p switch is used.
- X+
- X+ .*s 3 "<tel-number>"
- X+
- X+ This type of argument has a digit as its initial character and
- X+ represents an actual telephone number to be passed to a modem
- X+ dialer program or Dialers chat script. The string may contain
- X+ non-numeric characters if appropriate for a dialer program,
- X+ such as dialTBIT. For example:
- X+ .DS L
- X+ ecu -l/dev/tty2a -b 19200 -e 5551212UC
- X+ .DE
- X+ uses tty2a (assumed to be connected to a Trailblazer modem) and
- X+ establishes a 19200 baud, even parity PEP Compressed connection
- X+ after dialing 5551212.
- X+
- X+ .*s 3 "<logical>"
- X+
- X+ This type of argument has an alphabetic initial character and
- X+ causes the dialing directory entry by that name to be dialed.
- X+ The line may be specified by '-l', but if the dialing directory
- X+ specifies a line (tty field contaions other than 'Any'), the
- X+ dialing directory entry will override it. The '-b', '-e' and '-o'
- X+ switches are ignored; the values specified by the dialing directory
- X+ entry are used. The '-t' and '-h' switches are valid and honored
- X+ if present.
- X+
- X+ .*s 3 "<arg>"
- X+
- X+ This type of argument is passed to an initial procedure when
- X+ the -p switch is present.
- X+
- X+ .DS L
- X+ ecu -p unixlogin user pwd ansi43
- X+ .DE
- X+ executes unixlogin.ep with arguments 'user' 'pwd' 'ansi43'
- X+
- X+ For more detail, refer to the description of -p, -d and -D below.
- X+
- X .*s 3 "-l"
- X
- X When ECU starts up, it normally chooses a line as described later
- X***************
- X*** 172,178
- X -d switch
- X .R
- X instructs ECU to "die" (terminate with error status) if
- X! any specified initial procedure fails. This switch ensures a batch
- X ECU execution will hang up any connection and terminate if
- X a procedure error occurs.
- X
- X
- X--- 215,221 -----
- X -d switch
- X .R
- X instructs ECU to "die" (terminate with error status) if
- X! an initial procedure (-p) fails. This switch ensures a batch
- X ECU execution will hang up any connection and terminate if
- X a procedure error occurs. See also -D below.
- X
- X***************
- X*** 174,180
- X instructs ECU to "die" (terminate with error status) if
- X any specified initial procedure fails. This switch ensures a batch
- X ECU execution will hang up any connection and terminate if
- X! a procedure error occurs.
- X
- X Absence of the
- X .B
- X
- X--- 217,223 -----
- X instructs ECU to "die" (terminate with error status) if
- X an initial procedure (-p) fails. This switch ensures a batch
- X ECU execution will hang up any connection and terminate if
- X! a procedure error occurs. See also -D below.
- X
- X Absence of the
- X .B -d
- X***************
- X*** 177,185
- X a procedure error occurs.
- X
- X Absence of the
- X! .B
- X! -d switch
- X! .R
- X causes ecu (upon any completion of the
- X initial procedure) to enter the 1) interactive mode if a line
- X was successfully attached by the procedure or 2) the setup menu
- X
- X--- 220,229 -----
- X a procedure error occurs. See also -D below.
- X
- X Absence of the
- X! .B -d
- X! and
- X! .B -D
- X! switches
- X causes ecu (upon any completion of the
- X initial procedure) to enter the 1) interactive mode if a line
- X was successfully attached by the procedure or 2) the setup menu
- X***************
- X*** 183,189
- X causes ecu (upon any completion of the
- X initial procedure) to enter the 1) interactive mode if a line
- X was successfully attached by the procedure or 2) the setup menu
- X! if not line was attached.
- X
- X .*s 3 "-t"
- X
- X
- X--- 227,242 -----
- X causes ecu (upon any completion of the
- X initial procedure) to enter the 1) interactive mode if a line
- X was successfully attached by the procedure or 2) the setup menu
- X! if no line was attached.
- X!
- X! .*s 3 "-D"
- X!
- X! The
- X! .B
- X! -D switch
- X! .R
- X! instructs ECU to unconditionally terminate when an
- X! initial procedure finishes.
- X
- X .*s 3 "-t"
- X
- X*** /u4/ecurel/doc/_top.txt Sun Jul 1 20:07:14 1990
- X--- doc/_top.txt Sun Jun 10 13:57:32 1990
- X***************
- X*** 27,33
- X .sp 1i
- X .ce 100
- X Technical Description
- X! Revision 1.23 (ecu 2.80.01)
- X \n(mo/\n(dy/\n(yr
- X .ce 0
- X .ls 1
- X
- X--- 27,33 -----
- X .sp 1i
- X .ce 100
- X Technical Description
- X! Revision 1.24 (ecu 2.80.04)
- X \n(mo/\n(dy/\n(yr
- X .ce 0
- X .ls 1
- X*** /u4/ecurel/ecufork.c Wed May 9 09:16:00 1990
- X--- ecufork.c Sat Jun 9 01:37:06 1990
- X***************
- X*** 174,180
- X static int path_count = 0;
- X char *cptr;
- X char *getenv();
- X- char *str_token();
- X
- X if(path_buf == (char *)0)
- X {
- X
- X--- 174,179 -----
- X static int path_count = 0;
- X char *cptr;
- X char *getenv();
- X
- X if(path_buf == (char *)0)
- X {
- X*** /u4/ecurel/ecuicmd.c Sun Jul 1 20:08:17 1990
- X--- ecuicmd.c Mon Jun 4 17:16:15 1990
- X***************
- X*** 10,15
- X
- X ------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X /*:05-10-1990-16:44-wht@n4hgf-move patchlevel to ecu.c hello_str */
- X /*:05-07-1990-21:23-wht@n4hgf---- 2.80 --- */
- X /*:04-17-1990-15:26-wht@n4hgf-add icmd call to icmd_history_add */
- X
- X--- 10,16 -----
- X
- X ------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X+ /*:05-30-1990-01:04-wht@n4hgf-split stat "Connected" line into two lines */
- X /*:05-10-1990-16:44-wht@n4hgf-move patchlevel to ecu.c hello_str */
- X /*:05-07-1990-21:23-wht@n4hgf---- 2.80 --- */
- X /*:04-17-1990-15:26-wht@n4hgf-add icmd call to icmd_history_add */
- X***************
- X*** 512,520
- X (shm->Lparity) ? to_upper(shm->Lparity) : 'N');
- X if(shm->Lmodem_off_hook)
- X {
- X! ff(se,"Connected to %s: %s (%s) at %s (elapsed %s)\r\n",
- X! shm->Lrname,
- X! shm->Ldescr,shm->Ltelno,
- X epoch_secs_to_str(shm->Loff_hook_time,1,s80),
- X get_elapsed_time(time((long *)0) - shm->Loff_hook_time));
- X }
- X
- X--- 513,521 -----
- X (shm->Lparity) ? to_upper(shm->Lparity) : 'N');
- X if(shm->Lmodem_off_hook)
- X {
- X! ff(se,"Connected to %s: %s (%s)\r\n",
- X! shm->Lrname,shm->Ldescr,shm->Ltelno);
- X! ff(se,"at %s (elapsed %s)\r\n",
- X epoch_secs_to_str(shm->Loff_hook_time,1,s80),
- X get_elapsed_time(time((long *)0) - shm->Loff_hook_time));
- X }
- X*** /u4/ecurel/eculine.c Sun Jul 1 20:07:33 1990
- X--- eculine.c Sun Jun 24 19:31:11 1990
- X***************
- X*** 8,13
- X lbreak()
- X lclear_xmtr_xoff()
- X lclose()
- X lflush(flush_type)
- X lget_xon_xoff(ixon,ixoff)
- X lgetc_timeout(msec)
- X
- X--- 8,14 -----
- X lbreak()
- X lclear_xmtr_xoff()
- X lclose()
- X+ ldraino(inflush_flag)
- X lflush(flush_type)
- X lget_xon_xoff(ixon,ixoff)
- X lgetc_timeout(msec)
- X***************
- X*** 35,40
- X
- X ------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X /*:05-07-1990-21:23-wht@n4hgf---- 2.80 --- */
- X /*:04-19-1990-03:07-wht@n4hgf-GCC run found unused vars -- rm them */
- X /*:04-10-1990-17:34-wht@n4hgf-provisions for ecu xmtr logging when rcvr dead */
- X
- X--- 36,42 -----
- X
- X ------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X+ /*:05-31-1990-15:56-wht@n4hgf-add ldraino */
- X /*:05-07-1990-21:23-wht@n4hgf---- 2.80 --- */
- X /*:04-19-1990-03:07-wht@n4hgf-GCC run found unused vars -- rm them */
- X /*:04-10-1990-17:34-wht@n4hgf-provisions for ecu xmtr logging when rcvr dead */
- X***************
- X*** 556,561
- X ioctl(shm->Liofd,TCSETA,(char *)&Ltermio);
- X
- X } /* end of lreset_ksr */
- X
- X /*+-----------------------------------------------------------------------
- X lputc(lchar) -- write lchar to comm line
- X
- X--- 558,576 -----
- X ioctl(shm->Liofd,TCSETA,(char *)&Ltermio);
- X
- X } /* end of lreset_ksr */
- X+
- X+ /*+-------------------------------------------------------------------------
- X+ ldraino(inflush_flag) - wait for output to drain
- X+
- X+ If inflush_flag is set, also flush input after output drains
- X+ --------------------------------------------------------------------------*/
- X+ void
- X+ ldraino(inflush_flag)
- X+ int inflush_flag;
- X+ {
- X+ ioctl(shm->Liofd,(inflush_flag) ? TCSETAF : TCSETAW,(char *)&Ltermio);
- X+
- X+ } /* end of ldraino */
- X
- X /*+-----------------------------------------------------------------------
- X lputc(lchar) -- write lchar to comm line
- X*** /u4/ecurel/ecunumrev.c Sun Jul 1 20:08:19 1990
- X--- ecunumrev.c Sun Jun 24 19:13:17 1990
- X***************
- X*** 16,22
- X #endif
- X
- X #ifdef WHT
- X! char *numeric_revision = "twx280.07";
- X #else
- X #ifdef SCO
- X char *numeric_revision = "sco2.80";
- X
- X--- 16,22 -----
- X #endif
- X
- X #ifdef WHT
- X! char *numeric_revision = "twx280.14";
- X #else
- X #ifdef SCO
- X char *numeric_revision = "sco2.80";
- X*** /u4/ecurel/ecushm.c Mon May 7 23:33:00 1990
- X--- ecushm.c Sun Jun 10 15:47:12 1990
- X***************
- X*** 19,24
- X
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X /*:05-07-1990-21:23-wht@n4hgf---- 2.80 --- */
- X /*:04-19-1990-03:07-wht@n4hgf-GCC run found unused vars -- rm them */
- X /*:03-25-1990-14:11-wht@n4hgf------ x2.70 ------- */
- X
- X--- 19,25 -----
- X
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X+ /*:06-02-1990-11:51-wht@n4hgf-new key determination */
- X /*:05-07-1990-21:23-wht@n4hgf---- 2.80 --- */
- X /*:04-19-1990-03:07-wht@n4hgf-GCC run found unused vars -- rm them */
- X /*:03-25-1990-14:11-wht@n4hgf------ x2.70 ------- */
- X***************
- X*** 56,63
- X extern int rcvr_log_gen_title;
- X
- X ECU_SDS FAR *shm; /* shared segment pointer */
- X! char shm_name[130] = ""; /* filename from which to derive key */
- X! key_t shm_key;
- X int shm_shmid;
- X
- X /*+-------------------------------------------------------------------------
- X
- X--- 57,63 -----
- X extern int rcvr_log_gen_title;
- X
- X ECU_SDS FAR *shm; /* shared segment pointer */
- X! key_t shm_key;
- X int shm_shmid;
- X
- X /*+-------------------------------------------------------------------------
- X***************
- X*** 66,73
- X --------------------------------------------------------------------------*/
- X shm_init()
- X {
- X- uint old_umask = umask(0);
- X- int fd;
- X char FAR *shmat();
- X
- X sprintf(shm_name,"/tmp/ecu%05d.shm",getpid());
- X
- X--- 66,71 -----
- X --------------------------------------------------------------------------*/
- X shm_init()
- X {
- X char FAR *shmat();
- X
- X shm_key = 0xEC000000L | getpid();
- X***************
- X*** 70,84
- X int fd;
- X char FAR *shmat();
- X
- X! sprintf(shm_name,"/tmp/ecu%05d.shm",getpid());
- X! if((fd = open(shm_name,O_CREAT | O_RDWR,0600)) < 0)
- X! {
- X! fputs("creation of ",se);
- X! perror(shm_name);
- X! umask(old_umask);
- X! exit(11);
- X! }
- X! close(fd);
- X
- X if((shm_key = ftok(shm_name,1)) < 0)
- X {
- X
- X--- 68,74 -----
- X {
- X char FAR *shmat();
- X
- X! shm_key = 0xEC000000L | getpid();
- X
- X if((shm_shmid = shmget(shm_key,sizeof(ECU_SDS),IPC_CREAT | 0600)) < 0)
- X {
- X***************
- X*** 80,95
- X }
- X close(fd);
- X
- X- if((shm_key = ftok(shm_name,1)) < 0)
- X- {
- X- fputs("ftok of ",se);
- X- perror(shm_name);
- X- umask(old_umask);
- X- unlink(shm_name);
- X- exit(11);
- X- }
- X- unlink(shm_name);
- X-
- X if((shm_shmid = shmget(shm_key,sizeof(ECU_SDS),IPC_CREAT | 0600)) < 0)
- X {
- X perror("shmget");
- X
- X--- 70,75 -----
- X
- X shm_key = 0xEC000000L | getpid();
- X
- X if((shm_shmid = shmget(shm_key,sizeof(ECU_SDS),IPC_CREAT | 0600)) < 0)
- X {
- X perror("shmget");
- X***************
- X*** 93,99
- X if((shm_shmid = shmget(shm_key,sizeof(ECU_SDS),IPC_CREAT | 0600)) < 0)
- X {
- X perror("shmget");
- X- umask(old_umask);
- X exit(11);
- X }
- X
- X
- X--- 73,78 -----
- X if((shm_shmid = shmget(shm_key,sizeof(ECU_SDS),IPC_CREAT | 0600)) < 0)
- X {
- X perror("shmget");
- X exit(11);
- X }
- X
- X***************
- X*** 100,106
- X if(((char FAR *)shm = shmat(shm_shmid,(char FAR *)0,0)) == (char FAR *)-1)
- X {
- X perror("shmat");
- X- umask(old_umask);
- X exit(11);
- X }
- X
- X
- X--- 79,84 -----
- X if(((char FAR *)shm = shmat(shm_shmid,(char FAR *)0,0)) == (char FAR *)-1)
- X {
- X perror("shmat");
- X exit(11);
- X }
- X
- X***************
- X*** 103,110
- X umask(old_umask);
- X exit(11);
- X }
- X-
- X- umask(old_umask);
- X
- X shm->xcmd = 0; /* signal from xmtr to rcvr SIGUSR2 */
- X shm->xi1 = 0; /* parameters */
- X
- X--- 81,86 -----
- X perror("shmat");
- X exit(11);
- X }
- X
- X shm->xcmd = 0; /* signal from xmtr to rcvr SIGUSR2 */
- X shm->xi1 = 0; /* parameters */
- X*** /u4/ecurel/ecuusage.c Mon May 7 23:33:00 1990
- X--- ecuusage.c Sun Jul 1 19:06:42 1990
- X***************
- X*** 10,15
- X
- X ------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X /*:05-07-1990-21:24-wht@n4hgf---- 2.80 --- */
- X /*:03-25-1990-14:11-wht@n4hgf------ x2.70 ------- */
- X /*:07-03-1989-22:57-wht------ x2.00 ----- */
- X
- X--- 10,16 -----
- X
- X ------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X+ /*:07-01-1990-19:06-wht@n4hgf-add -D usage information */
- X /*:05-07-1990-21:24-wht@n4hgf---- 2.80 --- */
- X /*:03-25-1990-14:11-wht@n4hgf------ x2.70 ------- */
- X /*:07-03-1989-22:57-wht------ x2.00 ----- */
- X***************
- X*** 26,32
- X
- X char *usage_text[] =
- X {
- X! "usage: ecu [-l /dev/tty<ttynum>] [-b <baud_rate>] [-e] [-o]\r\n",
- X " [-c <filename>] [-h] [-k] [-t] [-v[vv...]]\r\n",
- X " [-p <initial_proc> | <phone_number>]\r\n",
- X "Default: 2400,N,8 (use -e for even parity, -o for odd 7 data bits)\r\n",
- X
- X--- 27,33 -----
- X
- X char *usage_text[] =
- X {
- X! "usage: ecu [-l /dev/tty<ttynum>] [-b <baud_rate>] [-e] [-o] [-d]\r\n",
- X " [-c <filename>] [-h] [-k] [-t] [-v[vv...]]\r\n",
- X " [-p <initial_proc> | <phone_number>]\r\n",
- X "Default: 2400,N,8 (use -e for even parity, -o for odd 7 data bits)\r\n",
- X***************
- X*** 33,38
- X "-c <filename> use this file rather than ~/.ecumodem\r\n",
- X "-h half duplex ... default is full duplex\r\n",
- X "-v verbosity ... the more 'v's the more verbosity.\r\n",
- X "\r\n",
- X "For a list of built in commands, type HOME?<ENTER> once program started\r\n",
- X "\r\n",
- X
- X--- 34,41 -----
- X "-c <filename> use this file rather than ~/.ecumodem\r\n",
- X "-h half duplex ... default is full duplex\r\n",
- X "-v verbosity ... the more 'v's the more verbosity.\r\n",
- X+ "-d stop execution if -p initial procedure fails\r\n",
- X+ "-D unconditionally stop execution when -p initial procedure is done\r\n",
- X "\r\n",
- X "For a list of built in commands, type HOME?<ENTER> once program started\r\n",
- X "\r\n",
- X*** /u4/ecurel/ecuutil.c Mon May 7 23:33:00 1990
- X--- ecuutil.c Thu Jun 7 15:38:52 1990
- X***************
- X*** 31,36
- X
- X ------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X /*:05-07-1990-21:24-wht@n4hgf---- 2.80 --- */
- X /*:05-02-1990-13:25-wht@n4hgf-added double quote to shell metachar list */
- X /*:04-19-1990-14:56-wht@n4hgf-my GCC is uses XENIX libs/turn on mkdir for it */
- X
- X--- 31,37 -----
- X
- X ------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X+ /*:06-07-1990-15:38-wht@n4hgf-^? w/o true incl_3_char left gg unterminated */
- X /*:05-07-1990-21:24-wht@n4hgf---- 2.80 --- */
- X /*:05-02-1990-13:25-wht@n4hgf-added double quote to shell metachar list */
- X /*:04-19-1990-14:56-wht@n4hgf-my GCC is uses XENIX libs/turn on mkdir for it */
- X***************
- X*** 404,409
- X gg[1] = '?';
- X if(incl_3char)
- X strcpy(&gg[2]," DEL");
- X }
- X else
- X {
- X
- X--- 405,412 -----
- X gg[1] = '?';
- X if(incl_3char)
- X strcpy(&gg[2]," DEL");
- X+ else
- X+ gg[2] = 0;
- X }
- X else
- X {
- X*** /u4/ecurel/ecuxenix.c Wed May 9 09:49:00 1990
- X--- ecuxenix.c Thu May 31 17:04:48 1990
- X***************
- X*** 545,550
- X if(narg < 3)
- X {
- X fputs(" usage: sgr mode cmd\r\n",se);
- X return;
- X }
- X if((fplog = fopen(fname,"a")) == NULL)
- X
- X--- 545,552 -----
- X if(narg < 3)
- X {
- X fputs(" usage: sgr mode cmd\r\n",se);
- X+ fputs("mode = 0 for sanitized response, 1 == raw\r\n",se);
- X+ fputs("cmd = 'Send' style string (see /usr/lib/uucp/Dialers)\r\n",se);
- X return;
- X }
- X if((fplog = fopen(fname,"a")) == NULL)
- X***************
- X*** 570,587
- X
- X fputs("\r\n",se);
- X
- X! fprintf(fplog,"\nMode: %d ",mode);
- X! fputs("Stimulus: ",fplog);
- X! for(iarg = 2; iarg < narg; iarg++)
- X! {
- X! fputs(arg[iarg],fplog);
- X! lputs_paced(20,arg[iarg]);
- X! if(iarg != (narg - 1))
- X! {
- X! fputc(' ',fplog);
- X! lputc_paced(20,' ');
- X! }
- X! }
- X fputs("\nResponse: \n",fplog);
- X lputc_paced(20,'\r');
- X
- X
- X--- 572,579 -----
- X
- X fputs("\r\n",se);
- X
- X! fprintf(fplog,"\nMode: %d Stimulus: %s",mode,arg[2]);
- X! fputs("Response: \r\n",se);
- X fputs("\nResponse: \n",fplog);
- X respond(arg[2]);
- X lgets_timeout(&lr);
- X***************
- X*** 583,590
- X }
- X }
- X fputs("\nResponse: \n",fplog);
- X! lputc_paced(20,'\r');
- X!
- X lgets_timeout(&lr);
- X itmp = lr.count;
- X cptr = strchr(buf,'\n') + 1;
- X
- X--- 575,581 -----
- X fprintf(fplog,"\nMode: %d Stimulus: %s",mode,arg[2]);
- X fputs("Response: \r\n",se);
- X fputs("\nResponse: \n",fplog);
- X! respond(arg[2]);
- X lgets_timeout(&lr);
- X itmp = lr.count;
- X cptr = strchr(buf,'\n') + 1;
- X***************
- X*** 589,595
- X itmp = lr.count;
- X cptr = strchr(buf,'\n') + 1;
- X itmp -= (int)(cptr - buf);
- X! hex_dump_fp(fplog,cptr,itmp,(char *)0,1);
- X
- X itmp = lr.count;
- X cptr = buf;
- X
- X--- 580,587 -----
- X itmp = lr.count;
- X cptr = strchr(buf,'\n') + 1;
- X itmp -= (int)(cptr - buf);
- X! hex_dump_fp(fplog,cptr,itmp,(char *)0,(itmp <= 16));
- X! fclose(fplog);
- X
- X itmp = lr.count;
- X cptr = buf;
- X***************
- X*** 600,606
- X fputc(*cptr++,se);
- X }
- X
- X- fclose(fplog);
- X if(rcvr_alive)
- X start_rcvr_process(0);
- X } /* end of send_get_response */
- X
- X--- 592,597 -----
- X fputc(*cptr++,se);
- X }
- X
- X if(rcvr_alive)
- X start_rcvr_process(0);
- X } /* end of send_get_response */
- X*** /u4/ecurel/ecuxfer.c Sun Jul 1 20:08:20 1990
- X--- ecuxfer.c Wed May 30 15:17:42 1990
- X***************
- X*** 466,471
- X p_overwrite = 1; /* assume overwrite */
- X p_xfernew = 0; /* assume send only newer */
- X p_filelist[0] = 0; /* no filenames yet */
- X zwindw_size = 0; /* assume full streaming sz */
- X
- X switch(to_lower(*(argv[0] + 1)))
- X
- X--- 466,474 -----
- X p_overwrite = 1; /* assume overwrite */
- X p_xfernew = 0; /* assume send only newer */
- X p_filelist[0] = 0; /* no filenames yet */
- X+ #ifdef WHT
- X+ zwindw_size = 16384; /* my preference */
- X+ #else
- X zwindw_size = 0; /* assume full streaming sz */
- X #endif
- X
- X***************
- X*** 467,472
- X p_xfernew = 0; /* assume send only newer */
- X p_filelist[0] = 0; /* no filenames yet */
- X zwindw_size = 0; /* assume full streaming sz */
- X
- X switch(to_lower(*(argv[0] + 1)))
- X {
- X
- X--- 470,476 -----
- X zwindw_size = 16384; /* my preference */
- X #else
- X zwindw_size = 0; /* assume full streaming sz */
- X+ #endif
- X
- X switch(to_lower(*(argv[0] + 1)))
- X {
- X*** /u4/ecurel/expresp.c Mon May 7 23:33:00 1990
- X--- expresp.c Thu May 31 16:23:32 1990
- X***************
- X*** 16,21
- X \c - no new-line
- X \n - send new-line
- X \nnn - send octal number
- X Speed - Hayes-specific speed-adaptive connect handler
- X
- X Defined functions:
- X
- X--- 16,22 -----
- X \c - no new-line
- X \n - send new-line
- X \nnn - send octal number
- X+ \m### - sleep ### (decimal) milliseconds (non-standard)
- X Speed - Hayes-specific speed-adaptive connect handler
- X
- X Defined functions:
- X***************
- X*** 26,31
- X
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X /*:05-07-1990-21:24-wht@n4hgf---- 2.80 --- */
- X /*:04-02-1990-02:17-wht@n4hgf-Dialers support appears to work */
- X /*:04-01-1990-19:28-wht@n4hgf-more work */
- X
- X--- 27,33 -----
- X
- X --------------------------------------------------------------------------*/
- X /*+:EDITS:*/
- X+ /*:05-31-1990-15:59-wht@n4hgf-add 'm'illisec pause and ldraino use */
- X /*:05-07-1990-21:24-wht@n4hgf---- 2.80 --- */
- X /*:04-02-1990-02:17-wht@n4hgf-Dialers support appears to work */
- X /*:04-01-1990-19:28-wht@n4hgf-more work */
- X***************
- X*** 46,51
- X #define ERDEBUG(verb,str,arg) if(expresp_verbosity >= verb) \
- X pprintf(str,arg);
- X
- X extern int proctrace;
- X extern int interrupt;
- X
- X
- X--- 48,55 -----
- X #define ERDEBUG(verb,str,arg) if(expresp_verbosity >= verb) \
- X pprintf(str,arg);
- X
- X+ long atol();
- X+
- X extern int proctrace;
- X extern int interrupt;
- X
- X***************
- X*** 175,180
- X register char *str;
- X {
- X int itmp;
- X char s4[4];
- X int send_no_cr = 0;
- X
- X
- X--- 179,185 -----
- X register char *str;
- X {
- X int itmp;
- X+ long ltmp;
- X char s4[4];
- X int send_no_cr = 0;
- X
- X***************
- X*** 189,195
- X strncpy(s4,str,3);
- X s4[3] = 0;
- X sscanf(s4,"%o",&itmp);
- X! str += strspn(s4,"01234567");
- X lputc((char)itmp);
- X }
- X else switch(*str)
- X
- X--- 194,200 -----
- X strncpy(s4,str,3);
- X s4[3] = 0;
- X sscanf(s4,"%o",&itmp);
- X! str += strspn(s4,"01234567") - 1; /* -1 cause str++ later */
- X lputc((char)itmp);
- X }
- X else switch(*str)
- X***************
- X*** 195,200
- X else switch(*str)
- X {
- X case 'p': /* pause (approximately 1/4-1/2 second delay) */
- X nap(400L);
- X break;
- X case 'd': /* delay (2 seconds) */
- X
- X--- 200,206 -----
- X else switch(*str)
- X {
- X case 'p': /* pause (approximately 1/4-1/2 second delay) */
- X+ ldraino(0); /* wait for output to drain */
- X nap(400L);
- X break;
- X case 'm': /* nap a while (non-standard) */
- X***************
- X*** 197,202
- X case 'p': /* pause (approximately 1/4-1/2 second delay) */
- X nap(400L);
- X break;
- X case 'd': /* delay (2 seconds) */
- X nap(2000L);
- X break;
- X
- X--- 203,214 -----
- X ldraino(0); /* wait for output to drain */
- X nap(400L);
- X break;
- X+ case 'm': /* nap a while (non-standard) */
- X+ ltmp = atol(str + 1);
- X+ str += strspn(str + 1,"0123456789");
- X+ ldraino(0); /* wait for output to drain */
- X+ nap(ltmp);
- X+ break;
- X case 'd': /* delay (2 seconds) */
- X ldraino(0); /* wait for output to drain */
- X nap(2000L);
- X***************
- X*** 198,203
- X nap(400L);
- X break;
- X case 'd': /* delay (2 seconds) */
- X nap(2000L);
- X break;
- X case 'D': /* phone number/token */
- X
- X--- 210,216 -----
- X nap(ltmp);
- X break;
- X case 'd': /* delay (2 seconds) */
- X+ ldraino(0); /* wait for output to drain */
- X nap(2000L);
- X break;
- X case 'D': /* phone number/token */
- X***************
- X*** 242,247
- X
- X if(expresp_echo_check)
- X {
- X nap(40L); /* fake it */
- X lflush(0); /* flush input */
- X }
- X
- X--- 255,261 -----
- X
- X if(expresp_echo_check)
- X {
- X+ ldraino(1); /* wait for output to drain, then flush input */
- X nap(40L); /* fake it */
- X }
- X str++;
- X***************
- X*** 243,249
- X if(expresp_echo_check)
- X {
- X nap(40L); /* fake it */
- X- lflush(0); /* flush input */
- X }
- X str++;
- X }
- X
- X--- 257,262 -----
- X {
- X ldraino(1); /* wait for output to drain, then flush input */
- X nap(40L); /* fake it */
- X }
- X str++;
- X }
- SHAR_EOF
- $TOUCH -am 0701201490 ECU280.P04 &&
- chmod 0644 ECU280.P04 ||
- echo "restore of ECU280.P04 failed"
- set `wc -c ECU280.P04`;Wc_c=$1
- if test "$Wc_c" != "28750"; then
- echo original size 28750, current size $Wc_c
- fi
- # ============= APPLY.P04 ==============
- echo "x - extracting APPLY.P04 (Text)"
- sed 's/^X//' << 'SHAR_EOF' > APPLY.P04 &&
- X:
- X#--------------------------------------------------------------
- X# APPLY.P04 - ensure patch 3 already applied and apply patch 4
- X#--------------------------------------------------------------
- Xif fgrep 'PATCHLEVEL 3' patchlevel.h > /dev/null 2>&1
- X then
- X echo 'Applying patch 4';
- X else
- X echo 'You must apply patch 3 first (or patch 4 already applied)';
- X exit 1;
- Xfi
- Xpatch -p < ECU280.P04
- Xcat > patchlevel.h << PLEOF
- X#define PATCHLEVEL 4
- XPLEOF
- Xexit 0
- SHAR_EOF
- $TOUCH -am 0701200190 APPLY.P04 &&
- chmod 0755 APPLY.P04 ||
- echo "restore of APPLY.P04 failed"
- set `wc -c APPLY.P04`;Wc_c=$1
- if test "$Wc_c" != "470"; then
- echo original size 470, current size $Wc_c
- fi
- exit 0
-
-