home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume22
/
ecu
/
patch03a
< prev
next >
Wrap
Text File
|
1991-08-28
|
52KB
|
1,709 lines
Newsgroups: comp.sources.misc
From: Warren Tucker <wht@n4hgf.GA.US>
Subject: v22i070: ecu - ECU async comm package rev 3.10, Patch03a/3
Message-ID: <csm-v22i070=ecu.215803@sparky.imd.sterling.com>
X-Md4-Signature: c37bf197d018da2421244e8da56f0df4
Date: Wed, 28 Aug 1991 03:00:40 GMT
Approved: kent@sparky.imd.sterling.com
Submitted-by: Warren Tucker <wht@n4hgf.GA.US>
Posting-number: Volume 22, Issue 70
Archive-name: ecu/patch03a
Environment: SCO, XENIX, ISC, SUNOS4.1, SYSVR4
Patch-To: ecu: Volume 21, Issue 53-89
This patch to ECU 3.10 fixes some bugs and adds preliminary support
for SunOS 4.1 on Sparcs (native console and X11R4). Fixes for
XENIX and ISC reported by others have been incorporated. I did
the SunOS port. Lothar Hirschbiegel did the SYSVR4 port (to ISC).
README.P3 gives detail.
Apply the patch by
patch -p < PATCH3.01
You *must* run the updated Configure procedure and fully reinstall.
You do NOT have to be root to install under SunOS or SYSVR4 if
you have write access to all of the installed directories. There
is no need for the setuid ecuungetty program in these environments.
You must continue to have write access to the uucp lock file directory
for AnyUser for any environment.
Comments, bugs, hate mail and large bags of unmarked tens and twenties
appreciated.
I would also appreciate volunteers to hold a frequently updated
tar.Z file of the patched release for ftp. It would be nice to find
a niche where I could login via ftp and update a subdirectory with
official and experimental versions, patches, and binaries. I cannot
provide anonymous ftp access at this time.
Warren
-----
#!/bin/sh
# This is ecu/patch3a (ECU 3.10 patch 3 part 1), a shell archive (shar 3.46)
# made 08/27/1991 10:32 UTC by wht@n4hgf.GA.US
# Source directory /export/home/wht/src/ecu313a
#
# existing files will NOT be overwritten unless -c is specified
#
# This is part 1 of a multipart archive
# do not concatenate these parts, unpack them in order with /bin/sh
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 9768 -rw-rw-r-- README.P3
# 135045 -rw-rw-r-- PATCH3.01
#
if test -r _shar_seq_.tmp; then
echo 'Must unpack archives in sequence!'
echo Please unpack part `cat _shar_seq_.tmp` next
exit 1
fi
# ============= README.P3 ==============
if test -f 'README.P3' -a X"$1" != X"-c"; then
echo 'x - skipping README.P3 (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting README.P3 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'README.P3' &&
README.P3 ECU 3.10 Patch 3 Tue Aug 27 03:36:04 EDT 1991
X
This describes patch 3 to ECU 3.10, bringing the program to
version 3.13.
X
Overview
--------
X
The patch fixes some problems with the previous release, adds new
functionality and adds support for SunOS 4.1 and ISC System V
Release 4. I have tested it fairly well on a Sparc 1+ under
XX11R4 (MIT Sun server and xterm at PL18) and SunOS 4.1. I did my
best to integrate patches supplied by Lothar Hirschbiegel
(aega!lh). Lothar has ISC SVR4 and his changes worked for him,
but I had to hack them since his patches were against the
"official" 3.12 and I applied them to sources already half-ported
to the Sun. I hope they go well, but write if they don't. I want
to hear of any success you might have with other SVR4 systems, too.
X
System V Release 4
------------------
X
> I cannot offer much information on this, since Lothar sent little more than
> patches and I have no access to a system for testing.
> This is what I have:
> I've just finished porting ecu3.12 to SVR4. I have added my changes
> as a diff file, maybe this is of interest for you.
> The following points were added/changed:
>
> 1. I have included a configuration option for SVR4 in config.c
> 2. ecu works fine with "ttymon" under SVR4. This means you don't need
> FAS or something like this - bidirectional access to the serial ports
> with the stock asy drivers is ok.
> 3. Because of some strange(?) behaviour in SVR4 curses I had to use
> some terrible kludges to make it work clean. It's working as it is,
> but there is obvilously room for improvement...
> 4. SVR4 has the same set of hardware handshake ioctl's as SCO does.
> It's named differently (RTSXOFF and CTSXON), but it seems to work exactly
> the same way. I have enabled the "RTS" option for SVR4 - hopefully this
> is a standard feature (termiox) in *all* SVR4 versions, not just in
> my ISC release... :-)
> 5. I'm still working on ecusz/ecurz. Outgoing transfer is doing fine, but
> incoming transfer locks up the connection sometimes.
> As soon as I have finished this, I could send you the cdiffs too.
X
SunOS
-----
X
I brought this up in relatively short order. I may have gotten
what I paid for :-), but it seems stable. The System V support
under SunOS was pleasingly similar to the SVR3 environment ECU came
from. This release works on my Sparc 1+ with SunOS 4.1.1 and X11R4.
Some xterm VT100.Translations overrides are necessary to enable use of
certain keys unrecognized by the default xterm configuration.
Details are provided in the updated models/nonansikeys. If the
recommended changes, you can do what I did to figure out how to
get this guy going:
X
X 1. run xev and press the various function keys to see the
names you need to specify in the xterm translations.
X 2. edit the translations in nonansikeys example and put them in
your .Xdefaults file
X 3. run kbdtest3 to get a kbdtest3.out file
X 4. put this file's output into your ~/.ecu/nonansikeys file
(near the top, ahead of other xterm defs so it will be found first).
X 5. try it
X 6. when it works, send me the kbdtest3.out file along with the
VT100.Translations overrides you casme up with and a description of
the X environment you used.
X
There is also a new entry named 'sun' in models/nonansikeys for the
console.
X
Note on 'nonansikeys'
---------------------
X
This file was named when support was added to the original
SCO-only version to support keyboard/screens other than the
native multiscreen console. Since the TERM name for multiscreens
is "ansi", it seemed reasonable to name the file nonansikeys. It
now should probably be called 'nonSCOmultiscreenskeys', but that
name is too long for System V :-). Before too many more
revisions, even SCO multiscreen key definitions will be read from
nonansikeys and maybe then will be a good time to rename the
file. Anyway, this file and a good termcap definition takes you
a long way to supporting ecu on a wide variety of System V{,-ish}
platforms.
X
Fixes
-----
X
1. The ANSI SD (scroll down) sequence was broken for consoles
other than SCO multiscreens. It scrolled down n * COLS lines
instead of n lines.
X
2. Editing the null phone directory entry (pressing 'e' in an
empty directory, editing and exiting) caused a core dump. Now
you are prevented from editing a non-existent entry.
X
3. Procedure commands with switch arguments longer than 8
characters caused stack corruption (unpredictable behavior
including core dump). There is no call for switches this long,
but if present, the program should not explode. Now, switches
longer thasn 8 characters (including the hyphen) are silently
truncated. Should commands ever be added which could conceivably
evoke switch arguments that might approach the limit, either the
limit will be extended or error reporting will be added, or both,
as appropriate.
X
4. # comments to the right of nonansikey key definition lines
erroneously included the # in the definition. This may not have
been a bug in 3.12. I may have added it during 3.13 development,
but it is gone now in any case.
X
5. Previously, if the console line baud rate was not at least 4
times the tty line rate (roughly), the "no curses" mode was
forced during file transfer and could not be overridden. Since
various video driver implimentations express verious pseudo-"baud
rate" settings, this was more often a problem than a feature. If
the change causes you trouble, write me (or trying using Home pc
sz -N in lieu of Home pc sz, etc.).
X
6. Previously, an effort was made to editorialize on your choice
of a tty device name. This is no longer done. On SCO, you
should use the lower case (direct) names, like tty1a, to get the
expected lock file names, but trying to second guess all the
vendor and third-party names was an unnecessary and
counter-productive stumpling block. If you want to go for
/dev/swap, go ahead (I don't expect the ioctls to work -- or your
system :-> ).
X
7. Andrew A. Chernov (ache@hq.demos.su) said:
X
1) HDB dialers may return connect speed as return code (!= 0)
X [ and the CONNECT string built by hdbintf.c prints this code -- wht]
X [his patch used - wht]
2) Using HDB Dialcodes file for phone numbers translation now
X (\D,\T escape sequence)
X [his patch used - wht]
X
In other mail he wrote:
X
I just found little bugs:
1) XENIX standard cc doesn't understand prototypes with names:
"FILE *" is ok, but "FILE *fp" is bad. (patched sea/lint_args.h)
X [fixed - wht]
2) 'makedirs' program NEED last '/' in path name to make directory.
All Make.src patched to add '/' at the end of dirs.
X [fixed n a different way; makedirs now works as advertised - wht]
3) Some HDB dialers looks in argv[0] and change some parameters
(f.e. speed, etc.), so name "ECUdial" is invalid, and need change to
dve->dialprog. WARNING: this patch required my previous patch
(use 'token' instead of 'stripped_num')
X [his patch used - wht]
X
8. Jan-Piet Mens <logixwi.uucp!jpm> reported problems
with VT-220 support due to it's necessity of passing characters
with the sign bit set. As of now, characters are read by ecu and kept
8-bit intact until they have been passed through the key mapping filter.
Keys actually input to the program or sent over the line are
limited to 7 bits for now (sorry to my international friends) since
characters with the sign-bit have internal significance to ECU.
This is a primary example of "American's Disease" (7-bit ASCII) and I'll get
it out of here as soon as I get over "Warren's Disease" (laziness).
X
He also reported:
> In README.P1, you write that the "nonansikeys" file may be put in
> ECULIBDIR. This is incorrect: it is searched for in
> ECULIBDIR/.ecu [Line 193 nonansikey.c]
X
Acknowledgments
---------------
X
I've already mentioned Lothar's work in a matter-of-fact manner,
but here is the place for extreme words of appreciation. SVR4 is
very important and kudos to him for the leg up.
X
Robert E. Laughlin, Naval Ocean Systems Center (NOSC), bel@trout.nosc.mil,
reported various successes and failures. We had a good and continuing
dialog. His interest, suggestions and moral support did more for me than my
support of ECU did for him.
X
Andrew Chernov, of Relcom fame, made important suggestions and
fixes for XENIX support and for the product as a whole. He made
some important suggestions for an older revision as well, some of
which I put in and some not (Variously, I was too lazy, busy or
the code had gone too far away from what he was patching from).
His work is laudable and important for many reasons far exceeding
his support of this little program. Keep him in your thoughts
through these strange and wonderous times.
X
It was good to hear from these folks for their comments asnd fixes:
X
X Andy Hall <relay.EU.net!ncduk!andyh>
X Dave Hammond <dsix2!daveh
X Greg Wilkins <sir-alan!gregw>
X Michael P. Deignan <anomaly.sbs.com!mpd>
X Michael Traub <rtf.bt.co.uk!traub>
X cmcl2.NYU.EDU!panix!tbetz (Tom Betz)
X Jan-Piet Mens <logixwi.uucp!jpm>
X mudos.ann-arbor.mi.us!mju (Marc Unangst)
X lll-winken.llnl.gov!abhg!tao!tempest!whitemp
X ucsd!jadpc.cts.com!jdeitch
X
This file is harder to write than all of the code changes. Not
only is it hard to remember what all bugs were reported by whom
and what changes were fixed by whom, I hope I haven't missed
crediting anyone. if I did, please forgive me.
X
Keep dem cards and letters coming.
X
----------------------------------------------------------------------------
Warren Tucker, TuckerWare, Mountain Park, GA wht@n4hgf.Mt-Park.GA.US
"Given any new technology for transmitting information, we seem bound to
use it for great quantities of small talk. We are only saved by music
from being overwhelmed by nonsense." -- Lewis Thomas, _The Lives of a Cell_
X
SHAR_EOF
chmod 0664 README.P3 ||
echo 'restore of README.P3 failed'
Wc_c="`wc -c < 'README.P3'`"
test 9768 -eq "$Wc_c" ||
echo 'README.P3: original size 9768, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= PATCH3.01 ==============
if test -f 'PATCH3.01' -a X"$1" != X"-c"; then
echo 'x - skipping PATCH3.01 (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting PATCH3.01 (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'PATCH3.01' &&
diff -c /export/home/wht/src/ecu312/Configure ./Configure
*** /export/home/wht/src/ecu312/Configure Tue Aug 6 15:05:00 1991
--- ./Configure Tue Aug 27 03:12:05 1991
***************
*** 6,11 ****
--- 6,12 ----
X # vendor-supplied header file hacking.
X #----------------------------------------------------------------------
X #+:EDITS:
+ #:08-25-1991-05:11-wht@n4hgf2-added Sun n4hgf2 WHT automation
X #:08-06-1991-05:05-wht@n4hgf-change FASI_IN_USE to FASI
X #:07-12-1991-14:05-wht@n4hgf-ensure config.c compiles properly
X #:04-29-1991-02:39-wht@n4hgf-document/clean
***************
*** 25,35 ****
X SYSTEM=
X [ -f /etc/systemid ] && SYSTEM=`cat /etc/systemid`
X [ "$SYSTEM" = "n4hgf" ] && CFLAGS='-DWHT -DPEDANTIC -DMORSE -DFASI'
X
X echo Please wait while I compile the config program.
X rm -rf ./config
X cc $CFLAGS config.c -o config > /tmp/config.cc.log 2>&1
X ./config
- rm -rf /tmp/config.cc.log
X
X #end of Configure
--- 26,39 ----
X SYSTEM=
X [ -f /etc/systemid ] && SYSTEM=`cat /etc/systemid`
X [ "$SYSTEM" = "n4hgf" ] && CFLAGS='-DWHT -DPEDANTIC -DMORSE -DFASI'
+ [ -f /etc/hostname.le0 ] && SYSTEM=`cat /etc/hostname.le0`
+ [ "$SYSTEM" = "n4hgf2" ] && CFLAGS='-DWHT'
X
X echo Please wait while I compile the config program.
X rm -rf ./config
X cc $CFLAGS config.c -o config > /tmp/config.cc.log 2>&1
+ [ -x ./config ] && rm -rf /tmp/config.cc.log
+ [ -x ./config ] || echo '/tmp/config.cc.log has compile errors'
X ./config
X
X #end of Configure
diff -c /export/home/wht/src/ecu312/Make.src ./Make.src
*** /export/home/wht/src/ecu312/Make.src Sun Aug 25 17:28:13 1991
--- ./Make.src Tue Aug 27 02:57:59 1991
***************
*** 6,17 ****
X #
X # This Makefile and other ECU Makefiles have the ability to remake
X # lint_args.h by 'make protos'' ... but don't do it on other than an
! # SCO XENIX/386 system since Microsoft C 4.x is needed. MSC 5 cc
! # (SCO UNIX) -Zg has been broken since at least 5/89 and cannot do
! # the job .... if you do try to remake lint_args.h, please do
! # squirrel away the release copy first.
X #--------------------------------------------------------------------
! #+:EDITS:*/
X #:07-25-1991-12:55-wht@n4hgf-ECU release 3.10
X #:04-21-1991-12:43-wht@n4hgf-convert to Make.src
X
--- 6,19 ----
X #
X # This Makefile and other ECU Makefiles have the ability to remake
X # lint_args.h by 'make protos'' ... but don't do it on other than an
! # SCO XENIX/386 or UNIX system since Microsoft C is needed. MSC 5 cc
! # (SCO UNIX) -Zg has been broken since at least 5/89 and needs a hack
! # to do the job ... You must have the 286 compiler installed for it
! # to work on SCO UNIX. If you do try to remake lint_args.h, please do
! # squirrel away the release copy first. See zgcc for the -p1 hack.
X #--------------------------------------------------------------------
! #+:EDITS:
! #:08-23-1991-13:35-wht@n4hgf-sun porting (3.13)
X #:07-25-1991-12:55-wht@n4hgf-ECU release 3.10
X #:04-21-1991-12:43-wht@n4hgf-convert to Make.src
X
***************
*** 23,30 ****
X .SUFFIXES: .o .c .h .l
X .c.o:; $(BINTIME) $(CC) -c $(CFLAGS) $*.c
X
! ECUSHARNAME=ecu311
! MANSHARNAME=ecuman311
X
X SRC = \
X bamboozle.c\
--- 25,32 ----
X .SUFFIXES: .o .c .h .l
X .c.o:; $(BINTIME) $(CC) -c $(CFLAGS) $*.c
X
! ECUSHARNAME=ecu313
! MANSHARNAME=ecuman313
X
X SRC = \
X bamboozle.c\
***************
*** 153,159 ****
X Make.src */Make.src \
X *.[ch] \
X bperr/bperr.c \
! help/{*.[ch],*.src} \
X ecuungetty/*.[ch] \
X z/*.[ch]\
X sea/{*.[ch],*.{doc,imp}} \
--- 155,161 ----
X Make.src */Make.src \
X *.[ch] \
X bperr/bperr.c \
! help/{*.[ch],ecuhelp.src} \
X ecuungetty/*.[ch] \
X z/*.[ch]\
X sea/{*.[ch],*.{doc,imp}} \
***************
*** 208,214 ****
X cd bperr;make bperr
X
X ecuug:
! cd ecuungetty;make
X
X proc_error.c: ecuerror.h
X make bperr/bperr
--- 210,218 ----
X cd bperr;make bperr
X
X ecuug:
! if [ $(USE_ECUUNGETTY) = yes ]; then \
! cd ecuungetty;make; \
! fi
X
X proc_error.c: ecuerror.h
X make bperr/bperr
***************
*** 242,248 ****
X
X # install everything
X install: all makedirs iecu ecuhelp ecuz ecus #run as root
! cd ecuungetty; make install
X cd z; make install
X cd sea; make install
X cd help; make install
--- 246,254 ----
X
X # install everything
X install: all makedirs iecu ecuhelp ecuz ecus #run as root
! if [ $(USE_ECUUNGETTY) = yes ]; then \
! cd ecuungetty; make install; \
! fi
X cd z; make install
X cd sea; make install
X cd help; make install
***************
*** 266,272 ****
X # tools for making ecu
X $(LBIN)/sysdep: sysdep.c # uname -m undocumented on UNIX but works
X @echo 'building sysdep for' `uname -p`
! [ `uname -m` != i80286 ] || $(CC) -O -M2 sysdep.c -o $@
X [ `uname -m` = i80286 ] || $(CC) -O $(ISC) sysdep.c -o $@
X
X $(LBIN)/afterlint: afterlint.c
--- 272,278 ----
X # tools for making ecu
X $(LBIN)/sysdep: sysdep.c # uname -m undocumented on UNIX but works
X @echo 'building sysdep for' `uname -p`
! [ `uname -m` = i80286 ] || $(CC) -O -M2 sysdep.c -o $@
X [ `uname -m` = i80286 ] || $(CC) -O $(ISC) sysdep.c -o $@
X
X $(LBIN)/afterlint: afterlint.c
***************
*** 285,291 ****
X cd help;make neat
X cd z;make neat
X cd sea;make neat
! cd ecuungetty;make neat
X
X clean: neat
X rm -f $(OBJ)
--- 291,299 ----
X cd help;make neat
X cd z;make neat
X cd sea;make neat
! if [ $(USE_ECUUNGETTY) = yes ]; then \
! cd ecuungetty;make neat; \
! fi
X
X clean: neat
X rm -f $(OBJ)
***************
*** 292,298 ****
X cd help;make clean
X cd z;make clean
X cd sea;make clean
! cd ecuungetty;make clean
X
X clobber: clean
X rm -f $(PROGRAM) $(PROGRAM)~
--- 300,308 ----
X cd help;make clean
X cd z;make clean
X cd sea;make clean
! if [ $(USE_ECUUNGETTY) = yes ]; then \
! cd ecuungetty;make clean; \
! fi
X
X clobber: clean
X rm -f $(PROGRAM) $(PROGRAM)~
***************
*** 299,305 ****
X cd help;make clobber
X cd z;make clobber
X cd sea;make clobber
! cd ecuungetty;make clobber
X
X #regenerate .o:.h dependencies automatically
X depend:
--- 309,317 ----
X cd help;make clobber
X cd z;make clobber
X cd sea;make clobber
! if [ $(USE_ECUUNGETTY) = yes ]; then \
! cd ecuungetty;make clobber
! fi
X
X #regenerate .o:.h dependencies automatically
X depend:
***************
*** 312,324 ****
X >> depend.tmp) ;\
X fi
X
! echo '/^# DO NOT DELETE THIS LINE' >exdep.tmp
! echo '.+1,$$d' >>exdep.tmp
! echo 'r depend.tmp' >> exdep.tmp
! echo 'w' >> exdep.tmp
X cp Makefile Makefile.new
! ex Makefile.new < exdep.tmp
! rm exdep.tmp depend.tmp
X echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
X echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
X echo '# see make depend above'>>Makefile.new
--- 324,336 ----
X >> depend.tmp) ;\
X fi
X
! echo '/^# DO NOT DELETE THIS LINE' >eddep.tmp
! echo '.+1,$$d' >>eddep.tmp
! echo 'r depend.tmp' >> eddep.tmp
! echo 'w' >> eddep.tmp
X cp Makefile Makefile.new
! ed Makefile.new < eddep.tmp
! rm eddep.tmp depend.tmp
X echo '# DEPENDENCIES MUST END AT END OF FILE' >>Makefile.new
X echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY'>>Makefile.new
X echo '# see make depend above'>>Makefile.new
***************
*** 327,333 ****
X cd help;make depend
X cd z;make depend
X cd sea;make depend
! cd ecuungetty;make depend
X
X # DO NOT DELETE THIS LINE
X # DEPENDENCIES MUST END AT END OF FILE
--- 339,347 ----
X cd help;make depend
X cd z;make depend
X cd sea;make depend
! if [ $(USE_ECUUNGETTY) = yes ]; then \
! cd ecuungetty;make depend; \
! fi
X
X # DO NOT DELETE THIS LINE
X # DEPENDENCIES MUST END AT END OF FILE
Only in .: PATCH3.01
diff -c /export/home/wht/src/ecu312/README ./README
*** /export/home/wht/src/ecu312/README Sat Jul 27 15:36:00 1991
--- ./README Sun Aug 25 23:33:07 1991
***************
*** 1,5 ****
X .--------------------------------------------------------.
! | ecu README - last revised Thu Jul 18 07:55:10 EDT 1991 |
X `--------------------------------------------------------'
X
X This is ecu revision 3.10. Ecu is a asynchronous communications
--- 1,5 ----
X .--------------------------------------------------------.
! | ecu README - last revised Sun Aug 25 22:56:51 EDT 1991 |
X `--------------------------------------------------------'
X
X This is ecu revision 3.10. Ecu is a asynchronous communications
***************
*** 12,17 ****
--- 12,23 ----
X production version of SCO UNIX or ODT. Preliminary support for ISC
X 386/ix 2.2 seems to be at least partially functional.
X
+ At patchlevel 3 or higher, at least partial (useful) support
+ is provided for SunOS 4.1 X11 users on a Sparc and for ISC System
+ V Release 4. I did the sun port. Lothar Hirschbiegel
+ (aega84!lh) did the SVR4 port -- THANKS, Lothar!
+ See README.P3 for elaboration on this new support.
+
X Support for "non-ANSI" consoles is relatively stable and more
X mature. I use it (almost exclusively now) with a Metro Link X11R4
X xterm. Bugs are expected and reports will be greatly appreciated.
***************
*** 21,27 ****
X the manual and the note below named "KBDTEST3".
X
X Gcc is supported for all programs in the release. See the
! configuration section and the note on gcc for important caveats
X
X More progress has been made for a port to ISC 2.2. The program
X compiles properly with the gcc or native cc compiler, but very
--- 27,33 ----
X the manual and the note below named "KBDTEST3".
X
X Gcc is supported for all programs in the release. See the
! configuration section and the note on gcc for important caveats.
X
X More progress has been made for a port to ISC 2.2. The program
X compiles properly with the gcc or native cc compiler, but very
Only in .: README.P2
Only in .: README.P3
Common subdirectories: /export/home/wht/src/ecu312/bperr and ./bperr
diff -c /export/home/wht/src/ecu312/config.c ./config.c
*** /export/home/wht/src/ecu312/config.c Sun Aug 25 17:28:13 1991
--- ./config.c Sun Aug 25 14:39:24 1991
***************
*** 1,5 ****
X /* CHK=0xD40E */
! char *rev = "3.10";
X /*+-------------------------------------------------------------------------
X config.c - Makefile configuration program for ECU
X wht@n4hgf.Mt-Park.GA.US
--- 1,5 ----
X /* CHK=0xD40E */
! char *rev = "3.13";
X /*+-------------------------------------------------------------------------
X config.c - Makefile configuration program for ECU
X wht@n4hgf.Mt-Park.GA.US
***************
*** 15,20 ****
--- 15,21 ----
X gen_gcc_cflags()
X gen_isc_ldflags()
X gen_sco_ldflags()
+ gen_svr4_ldflags()
X generate_config(mdir)
X goodbye(sig)
X main(argc,argv)
***************
*** 26,31 ****
--- 27,34 ----
X
X --------------------------------------------------------------------------*/
X /*+:EDITS:*/
+ /*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
+ /*:08-23-1991-01:37-wht@n4hgf-sun port */
X /*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
X /*:07-12-1991-14:02-wht@n4hgf-GCC140 update */
X /*:05-02-1991-02:46-wht@n4hgf-take out M_TERMCAP in favor of ecucurses.h */
***************
*** 41,46 ****
--- 44,51 ----
X
X #define S_SCO 0
X #define S_ISC 1
+ #define S_SUN 2
+ #define S_SVR4 3
X
X #define X_X286 0
X #define X_X386 1
***************
*** 56,62 ****
--- 61,69 ----
X char *makedirs[] = {
X ".",
X "./ecufriend",
+ #ifndef sun
X "./ecuungetty",
+ #endif
X "./gendial",
X "./help",
X "./sea",
***************
*** 120,126 ****
--- 127,135 ----
X "\t-v\\\n",
X #endif
X "\t-fstrength-reduce -fpcc-struct-return -fwritable-strings\\\n",
+ #if defined(i386) || defined(M_I286) || defined(M_SYSV) || defined(ISC)
X "\t-fcall-used-ax -fcall-used-bx -fcall-used-cx -fcall-used-dx\\\n",
+ #endif
X "\t-finline-functions -fforce-mem -fforce-addr\\\n",
X "\t-W -Wunused -Wpointer-arith -Wcast-qual\\\n",
X (char *)0
***************
*** 134,143 ****
X \t-DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5\\\n\
X \t-DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix\\\n",
X };
! char *isc_cc_opts = "\t-O -DISC -DISC22\\\n";
! char *isc_gcc_opts = "\t-DISC -DISC22\\\n";
X char *isc_sigtype = "\t-DSIGTYPE=void\\\n";
X
X /*
X * LIBS
X */
--- 143,160 ----
X \t-DM_INTERNAT -DM_SDATA -DM_STEXT -DM_SYS3 -DM_SYS5\\\n\
X \t-DM_SYSIII -DM_SYSV -DM_UNIX -DM_WORDSWAP -DM_XENIX -Dunix\\\n",
X };
! char *isc_cc_opts = "\t-O -DISC -DISC22 -DSYSV\\\n";
! char *isc_gcc_opts = "\t-DISC -DISC22 -DSYSV\\\n";
X char *isc_sigtype = "\t-DSIGTYPE=void\\\n";
X
+ char *sun_cc_opts = "\t-O -DBSD\\\n";
+ char *sun_gcc_opts = "\t-O -DBSD\\\n";
+ char *sun_sigtype = "\t-DSIGTYPE=void\\\n";
+
+ char *svr4_cc_opts = "\t-O -DSVR4 -DSYSV\\\n";
+ char *svr4_gcc_opts = "\t-DSVR4 -DSYSV\\\n";
+ char *svr4_sigtype = "\t-DSIGTYPE=void\\\n";
+
X /*
X * LIBS
X */
***************
*** 149,154 ****
--- 166,175 ----
X
X char *isc_libs = "-lcurses -linet -lx -lmalloc";
X
+ char *sun_libs = "-lcurses -ltermcap";
+
+ char *svr4_libs = "-lcurses -lx -lmalloc";
+
X char *sco_system[] = {
X "XENIX/286",
X "XENIX/386",
***************
*** 157,167 ****
--- 178,193 ----
X
X char *isc_system = "ISC-2.2";
X
+ char *sun_system = "SunOS-4.1";
+
+ char *svr4_system = "SVR4.0";
+
X char *malloc_3x = "\t-DMALLOC_3X\\\n";
X
X char *bindir = "/usr/local/bin";
X char *libdir = "/usr/local/lib/ecu";
X char *symbolic = "";
+ char *use_ecuungetty = "yes";
X
X int sys = -1;
X int compiler = -1;
***************
*** 270,279 ****
X fputs(malloc_3x,fpmake);
X fputs(isc_sigtype,fpmake);
X break;
X }
X fputs("\t-DECULIBDIR='\"$(ECULIBDIR)\"'\\\n",fpmake);
! #if defined(WHT)
X fputs("\t-DWHT -DMORSE -DFASI -g\\\n",fpmake);
X #else
X #if defined(MORSE)
X fputs("\t-DMORSE -g\\\n",fpmake);
--- 296,319 ----
X fputs(malloc_3x,fpmake);
X fputs(isc_sigtype,fpmake);
X break;
+ case S_SUN:
+ fputs(sun_cc_opts,fpmake);
+ fputs(malloc_3x,fpmake);
+ fputs(isc_sigtype,fpmake);
+ break;
+ case S_SVR4:
+ fputs(svr4_cc_opts,fpmake);
+ fputs(malloc_3x,fpmake);
+ fputs(svr4_sigtype,fpmake);
+ break;
X }
X fputs("\t-DECULIBDIR='\"$(ECULIBDIR)\"'\\\n",fpmake);
! #if defined(WHT)
! #if defined(sun)
! fputs("\t-DWHT -DAUDIO -g\\\n",fpmake);
! #else
X fputs("\t-DWHT -DMORSE -DFASI -g\\\n",fpmake);
+ #endif
X #else
X #if defined(MORSE)
X fputs("\t-DMORSE -g\\\n",fpmake);
***************
*** 305,310 ****
--- 345,360 ----
X fputs(malloc_3x,fpmake);
X fputs(isc_sigtype,fpmake);
X break;
+ case S_SUN:
+ fputs(sun_gcc_opts,fpmake);
+ fputs(malloc_3x,fpmake);
+ fputs(sun_sigtype,fpmake);
+ break;
+ case S_SVR4:
+ fputs(svr4_gcc_opts,fpmake);
+ fputs(malloc_3x,fpmake);
+ fputs(svr4_sigtype,fpmake);
+ break;
X }
X fputs("\t-DECULIBDIR='\"$(ECULIBDIR)\"'\\\n",fpmake);
X #if defined(WHT)
***************
*** 353,358 ****
--- 403,426 ----
X }
X
X void
+ gen_sun_ldflags()
+ {
+ fputs("LDFLAGS = \\\n",fpmake);
+ fputs("\t$(SYMBOLIC) $(LDFLAGS_EXTRA)\n\n",fpmake);
+
+ fprintf(fpmake,"LIBS = %s\n\n",sun_libs);
+ }
+
+ void
+ gen_svr4_ldflags()
+ {
+ fputs("LDFLAGS = \\\n",fpmake);
+ fputs("\t$(SYMBOLIC) $(LDFLAGS_EXTRA)\n\n",fpmake);
+
+ fprintf(fpmake,"LIBS = %s\n\n",svr4_libs);
+ }
+
+ void
X generate_config(mdir)
X char *mdir;
X {
***************
*** 411,416 ****
--- 479,490 ----
X case S_ISC:
X gen_isc_ldflags();
X break;
+ case S_SUN:
+ gen_sun_ldflags();
+ break;
+ case S_SVR4:
+ gen_svr4_ldflags();
+ break;
X }
X
X fprintf(fpmake,"LBIN = %s\n",bindir);
***************
*** 419,430 ****
--- 493,516 ----
X {
X case S_SCO:
X fprintf(fpmake,"SYSTEM = %s\n",sco_system[sco_type]);
+ use_ecuungetty = "yes";
X break;
X case S_ISC:
X fprintf(fpmake,"SYSTEM = %s\n",isc_system);
+ use_ecuungetty = "yes";
X break;
+ case S_SUN:
+ fprintf(fpmake,"SYSTEM = %s\n",sun_system);
+ use_ecuungetty = "no";
+ break;
+ case S_SVR4:
+ fprintf(fpmake,"SYSTEM = %s\n",svr4_system);
+ use_ecuungetty = "no";
+ break;
X }
X
+
+ fprintf(fpmake,"USE_ECUUNGETTY = %s\n",use_ecuungetty);
X #if !defined(WHT)
X fputs("#",fpmake);
X #endif
***************
*** 456,462 ****
X setbuf(stdin,NULL);
X setbuf(stdout,NULL);
X
! while((itmp = getopt(argc,argv,"dsi23ugcb:l:")) != -1)
X {
X switch(itmp)
X {
--- 542,548 ----
X setbuf(stdin,NULL);
X setbuf(stdout,NULL);
X
! while((itmp = getopt(argc,argv,"dsiS234ugcb:l:")) != -1)
X {
X switch(itmp)
X {
***************
*** 464,469 ****
--- 550,557 ----
X
X case 's': sys = S_SCO; break;
X case 'i': sys = S_ISC; break;
+ case 'S': sys = S_SUN; break;
+ case '4': sys = S_SVR4; break;
X
X case '2': sco_type = X_X286; break;
X case '3': sco_type = X_X386; break;
***************
*** 505,514 ****
X
X if(sys < 0)
X {
! switch(tgetopt("Is this an SCO or ISC system","si"))
X {
X case 's': sys = S_SCO; break;
X case 'i': sys = S_ISC; break;
X }
X }
X
--- 593,605 ----
X
X if(sys < 0)
X {
! switch(tgetopt("Is this an SCO, ISC, SunOS 4.1, or SVR4 system",
! "siS4"))
X {
X case 's': sys = S_SCO; break;
X case 'i': sys = S_ISC; break;
+ case 'S': sys = S_SUN; break;
+ case 'f': sys = S_SVR4; break;
X }
X }
X
***************
*** 554,560 ****
X if(!getopt_bindir)
X {
X printf(
! "\nWhere do you want the public executables placed [%s]: ",bindir);
X tgets(s128);
X if(s128[0])
X bindir = strdup(s128);
--- 645,652 ----
X if(!getopt_bindir)
X {
X printf(
! "\nWhere do you want the public executables placed [%s]\n: ",
! bindir);
X tgets(s128);
X if(s128[0])
X bindir = strdup(s128);
***************
*** 563,569 ****
X if(!getopt_libdir)
X {
X printf(
! "\nWhere do you want the ECU library placed [%s]: ",libdir);
X tgets(s128);
X if(s128[0])
X libdir = strdup(s128);
--- 655,661 ----
X if(!getopt_libdir)
X {
X printf(
! "\nWhere do you want the ECU library placed [%s]\n: ",libdir);
X tgets(s128);
X if(s128[0])
X libdir = strdup(s128);
diff -c /export/home/wht/src/ecu312/dialprog.h ./dialprog.h
*** /export/home/wht/src/ecu312/dialprog.h Thu Jul 25 12:55:00 1991
--- ./dialprog.h Tue Aug 27 03:09:53 1991
***************
*** 3,11 ****
--- 3,23 ----
X wht@n4hgf.Mt-Park.GA.US
X --------------------------------------------------------------------------*/
X /*+:EDITS:*/
+ /*:08-27-1991-03:08-ache@hq.demos.su-dialer enhancement */
X /*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
X /*:08-14-1990-20:39-wht@n4hgf-ecu3.00-flush old edit history */
X
+ /* Return code masks:
+ * 0x80 bit = 1 if connection failed
+ * 0x10 bit = 1 if line is also used for dialin #ifndef HDUU
+ * 0x0f if msb=1: error code
+ * if msb=0: connected baud rate (0=same as dialed baud)
+ */
+ /* return codes: these are set up so that an abort signal at any time can */
+ /* set the fail bit and return to the caller with the correct status */
+ #define RC_BAUD 0x0f /* CBAUD connected at (0=same as dialed speed)*/
+ #define RC_ENABLED 0x10 /* enabled flag: 1 = ungetty -r required to */
+ /* restore the line */
X #define RC_FAIL 0x80 /* 1 = failed to connect */
X #define RCE_NULL 0 /* general purpose or unknown error code */
X #define RCE_INUSE 1 /* line in use */
Common subdirectories: /export/home/wht/src/ecu312/doc and ./doc
diff -c /export/home/wht/src/ecu312/dvent.h ./dvent.h
*** /export/home/wht/src/ecu312/dvent.h Thu Jul 25 12:55:00 1991
--- ./dvent.h Sun Aug 25 13:02:44 1991
***************
*** 14,19 ****
--- 14,20 ----
X uint low_baud; /* lowest baud rate */
X uint high_baud; /* highest baud rate */
X char *dialprog; /* dialer program */
+ char *token; /* token to be passed to the dialer */
X };
X
X struct dvent *getdvent();
diff -c /export/home/wht/src/ecu312/ecu.c ./ecu.c
*** /export/home/wht/src/ecu312/ecu.c Sun Aug 25 17:29:11 1991
--- ./ecu.c Mon Aug 26 13:29:15 1991
***************
*** 71,77 ****
X int hz; /* HZ from environ or sys/param.h */
X ulong hzmsec; /* clock period in msec rounded up */
X struct timeb starting_timeb;
! #ifdef WHT
X char *sbrk();
X char *startbrk;
X #endif
--- 71,77 ----
X int hz; /* HZ from environ or sys/param.h */
X ulong hzmsec; /* clock period in msec rounded up */
X struct timeb starting_timeb;
! #ifdef MALLOC_3X
X char *sbrk();
X char *startbrk;
X #endif
***************
*** 150,161 ****
X (void)mallopt(M_MXFAST,256+4);
X (void)mallopt(M_NLBLKS,64);
X (void)mallopt(M_GRAIN,sizeof(ESD) + 8);
- #ifdef WHT
X startbrk = sbrk(0);
- #endif /* WHT */
X #endif
X
X setbuf(stderr,NULL);
X
X ftime(&starting_timeb); /* get startup time */
X xmtr_pid = getpid();
--- 150,160 ----
X (void)mallopt(M_MXFAST,256+4);
X (void)mallopt(M_NLBLKS,64);
X (void)mallopt(M_GRAIN,sizeof(ESD) + 8);
X startbrk = sbrk(0);
X #endif
X
X setbuf(stderr,NULL);
+ xmtr_signals(); /* catch xmtr signals */
X
X ftime(&starting_timeb); /* get startup time */
X xmtr_pid = getpid();
***************
*** 221,228 ****
X
X make_ecu_subdir(); /* needs to be very early before lots of init */
X
- xmtr_signals(); /* catch xmtr signals */
-
X get_curr_dir(curr_dir,sizeof(curr_dir));
X cd_array_init(); /* read %cd directory list */
X
--- 220,225 ----
***************
*** 278,288 ****
X strcat(shm->Lline,"tty");
X strcat(shm->Lline,optarg);
X #else
- #if defined(ISC)
X strcat(shm->Lline,optarg);
- #else
- # include "need.porting.attention.here"
- #endif /* ISC */
X #endif /* M_SYSV */
X break;
X case 'p':
--- 275,281 ----
***************
*** 311,331 ****
X }
X
X ttyinit(shm->ttyinit_param); /* init console tty mode handler */
! ttymode(4); /* put user console in `raw' mode */
X tcap_clear_screen();
X #ifdef WHT
X xterm_title("ECU",0);
X #endif
X ff(se,"%s\r\n",hello_str);
- if(kbd_is_7bit && !tty_not_char_special)
- {
- /*
- tcap_cursor(tcap_LINES - 3,0);
- */
- ff(se,
- "No problem, but just to warn you, the keyboard has parity enabled\r\n");
- Nap(500L);
- }
X
X /* check out line */
X if(!shm->Lline[0])
--- 304,315 ----
X }
X
X ttyinit(shm->ttyinit_param); /* init console tty mode handler */
! ttymode(3); /* put user console in `raw' mode but SIGINT terms prog */
X tcap_clear_screen();
X #ifdef WHT
X xterm_title("ECU",0);
X #endif
X ff(se,"%s\r\n",hello_str);
X
X /* check out line */
X if(!shm->Lline[0])
diff -c /export/home/wht/src/ecu312/ecu.h ./ecu.h
*** /export/home/wht/src/ecu312/ecu.h Sun Aug 25 17:29:11 1991
--- ./ecu.h Sun Aug 25 14:39:25 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 /*:08-13-1991-13:53-wht@n4hgf-UNIX and ISC nap() broken; XENIX still wins */
X /*:08-09-1991-11:07-wht@n4hgf-configurable lock directory */
X /*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
***************
*** 148,160 ****
X #define LOPEN_UNKPID -2 /* unknown pid using line */
X #define LOPEN_LCKERR -3 /* lock file open error */
X #define LOPEN_NODEV -4 /* device does not exist */
! #define LOPEN_OPNFAIL -5 /* could not open line */
X #define LOPEN_ALREADY -6 /* line already open */
X #define LOPEN_ENABLED -7 /* line enabled for login */
X #define LOPEN_ENABLED_IN_USE -8 /* line in use by incoming login */
X #define LOPEN_DIALOUT_IN_USE -9 /* line in use by another dial out */
X #define LOPEN_NOPTY -10 /* pty not supported */
! #define LOPEN_WE_GOT_IT -11 /* not rerally an error: we already
X * own the line (used by check_utmp())
X */
X
--- 149,161 ----
X #define LOPEN_UNKPID -2 /* unknown pid using line */
X #define LOPEN_LCKERR -3 /* lock file open error */
X #define LOPEN_NODEV -4 /* device does not exist */
! #define LOPEN_OPNFAIL -5 /* could not access line */
X #define LOPEN_ALREADY -6 /* line already open */
X #define LOPEN_ENABLED -7 /* line enabled for login */
X #define LOPEN_ENABLED_IN_USE -8 /* line in use by incoming login */
X #define LOPEN_DIALOUT_IN_USE -9 /* line in use by another dial out */
X #define LOPEN_NOPTY -10 /* pty not supported */
! #define LOPEN_WE_GOT_IT -11 /* not really an error: we already
X * own the line (used by check_utmp())
X */
X
***************
*** 195,206 ****
X /*
X * lock file directory
X */
X #if defined(M_SYSV) /* SCO */
X #define LOCK_DIR_NAME "/usr/spool/uucp"
! #endif
X #if defined(ISC)
X #define LOCK_DIR_NAME "/usr/spool/locks"
! #endif
X extern char *lock_dir_name; /* defined in ecuLCK.c */
X
X /*
--- 196,216 ----
X /*
X * lock file directory
X */
+ #if !defined(LOCK_DIR_NAME)
X #if defined(M_SYSV) /* SCO */
X #define LOCK_DIR_NAME "/usr/spool/uucp"
! #else
! #if defined(sun) || defined(SVR4)
! #define LOCK_DIR_NAME "/var/spool/locks"
! #else
X #if defined(ISC)
X #define LOCK_DIR_NAME "/usr/spool/locks"
! #else
! # include "porting.attention.required.here"
! #endif /* ISC */
! #endif /* sun */
! #endif /* M_SYSV */
! #endif /* LOCK_DIR_NAME */
X extern char *lock_dir_name; /* defined in ecuLCK.c */
X
X /*
***************
*** 208,218 ****
X */
X #if !defined(DEFAULT_TTY)
X #if defined(M_SYSV) /* SCO */
! #define DEFAULT_TTY "/dev/tty1a"
! #endif
X #if defined(ISC)
! #define DEFAULT_TTY "/dev/acu00"
! #endif
X #endif /*!defined(DEFAULT_TTY)
X extern char *lock_dir_name; /* defined in ecu.c */
X
--- 218,237 ----
X */
X #if !defined(DEFAULT_TTY)
X #if defined(M_SYSV) /* SCO */
! #define DEFAULT_TTY "/dev/tty1a"
! #else
! #if defined(sun)
! #define DEFAULT_TTY "/dev/cua0"
! #else
! #if defined(SVR4)
! #define DEFAULT_TTY "/dev/tty00"
! #else
X #if defined(ISC)
! #define DEFAULT_TTY "/dev/acu00"
! #endif /* ISC */
! #endif /* SVR4 */
! #endif /* sun */
! #endif /* M_SYSV */
X #endif /*!defined(DEFAULT_TTY)
X extern char *lock_dir_name; /* defined in ecu.c */
X
***************
*** 238,244 ****
X int bufsize; /* size of buffer */
X int count; /* from proc, count rcvd */
X char *delim; /* ending string for lgets_timeout_or_delim */
! int echo; /* echo incoming chars to screen */
X } LRWT;
X
X
--- 257,263 ----
X int bufsize; /* size of buffer */
X int count; /* from proc, count rcvd */
X char *delim; /* ending string for lgets_timeout_or_delim */
! int echo_flag; /* echo incoming chars to screen */
X } LRWT;
X
X
diff -c /export/home/wht/src/ecu312/ecuDCE.c ./ecuDCE.c
*** /export/home/wht/src/ecu312/ecuDCE.c Sun Aug 25 17:29:13 1991
--- ./ecuDCE.c Fri Aug 23 14:21:35 1991
***************
*** 318,324 ****
X lr.buffer = s32;
X lr.bufsize = sizeof(s32);
X lr.delim = (char *)0;
! lr.echo = 0;
X lgets_timeout(&lr);
X
X /* reset any interrupt indication since we look at string */
--- 318,324 ----
X lr.buffer = s32;
X lr.bufsize = sizeof(s32);
X lr.delim = (char *)0;
! lr.echo_flag = 0;
X lgets_timeout(&lr);
X
X /* reset any interrupt indication since we look at string */
***************
*** 961,967 ****
X lr.buffer = s128;
X lr.bufsize = sizeof(s128);
X lr.delim = (char *)0;
! lr.echo = 0;
X lgets_timeout(&lr);
X if(lr.count != 3)
X return(-1);
--- 961,967 ----
X lr.buffer = s128;
X lr.bufsize = sizeof(s128);
X lr.delim = (char *)0;
! lr.echo_flag = 0;
X lgets_timeout(&lr);
X if(lr.count != 3)
X return(-1);
***************
*** 993,999 ****
X lr.buffer = s128;
X lr.bufsize = sizeof(s128);
X lr.delim = (char *)0;
! lr.echo = 0;
X lgets_timeout(&lr);
X value2 = DCE_get_sreg_value(regnum);
X if(value2 < 0)
--- 993,999 ----
X lr.buffer = s128;
X lr.bufsize = sizeof(s128);
X lr.delim = (char *)0;
! lr.echo_flag = 0;
X lgets_timeout(&lr);
X value2 = DCE_get_sreg_value(regnum);
X if(value2 < 0)
diff -c /export/home/wht/src/ecu312/ecuLCK.c ./ecuLCK.c
*** /export/home/wht/src/ecu312/ecuLCK.c Sun Aug 25 17:28:20 1991
--- ./ecuLCK.c Sun Aug 25 14:39:25 1991
***************
*** 16,21 ****
--- 16,23 ----
X check for both.
X ------------------------------------------------------------------------*/
X /*+:EDITS:*/
+ /*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
+ /*:08-21-1991-03:37-wht@n4hgf-kill LOPEN_INVALID check */
X /*:08-11-1991-18:06-wht@n4hgf-SCO_TTY_NAMING considerations */
X /*:08-09-1991-11:07-wht@n4hgf-configurable lock directory */
X /*:08-07-1991-14:41-wht@n4hgf-race with ecuungetty over lock resolved */
***************
*** 27,32 ****
--- 29,39 ----
X
X #include "ecu.h"
X #include "utmpstatus.h"
+ #ifdef SVR4
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/sysmacros.h>
+ #endif
X
X extern int errno;
X extern char ungetty_ttyname[];
***************
*** 40,52 ****
X char *ttyname;
X char *lock_file_name;
X {
X
! if((ulindex(ttyname,"/dev/tty")) != 0)
! return(LOPEN_INVALID);
X
X strcpy(lock_file_name,lock_dir_name);
X strcat(lock_file_name,"/LCK..");
X strcat(lock_file_name,ttyname + 5);
X return(0);
X
X } /* end of make_lock_name */
--- 47,71 ----
X char *ttyname;
X char *lock_file_name;
X {
+ #ifdef SVR4
+ struct stat tbuf;
X
! if(stat(ttyname, &tbuf) < 0)
! {
! if(errno == ENOENT)
! return(LOPEN_NODEV); /* device does not exist */
! else
! return(LOPEN_OPNFAIL); /* could not access line */
! }
! sprintf(lock_file_name,"%s/LK.%03u.%03u.%03u",
! lock_dir_name,major(tbuf.st_dev),
! tbuf.st_rdev >> 18, minor(tbuf.st_rdev));
! #else
X
X strcpy(lock_file_name,lock_dir_name);
X strcat(lock_file_name,"/LCK..");
X strcat(lock_file_name,ttyname + 5);
+ #endif
X return(0);
X
X } /* end of make_lock_name */
***************
*** 143,151 ****
X char *ttyname;
X {
X register itmp;
! char lock_file_name[64];
X
! make_lock_name(ttyname,lock_file_name);
X if(itmp = is_active_lock(lock_file_name))
X return(itmp);
X
--- 162,172 ----
X char *ttyname;
X {
X register itmp;
! char lock_file_name[128];
X
! if(itmp = make_lock_name(ttyname,lock_file_name))
! return(itmp);
!
X if(itmp = is_active_lock(lock_file_name))
X return(itmp);
X
diff -c /export/home/wht/src/ecu312/ecucmd.h ./ecucmd.h
*** /export/home/wht/src/ecu312/ecucmd.h Sun Aug 25 17:28:21 1991
--- ./ecucmd.h Fri Aug 23 14:21:37 1991
***************
*** 3,8 ****
--- 3,9 ----
X wht@n4hgf.Mt-Park.GA.US
X --------------------------------------------------------------------------*/
X /*+:EDITS:*/
+ /*:08-17-1991-16:41-wht@n4hgf-add kbdtest */
X /*:07-29-1991-17:57-wht@n4hgf-add memstat */
X /*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
X /*:07-04-1991-20:07-wht@n4hgf-add procedure rlog cmd */
***************
*** 73,78 ****
--- 74,80 ----
X #define CTpushd 59
X #define CTpopd 60
X #define CTmemstat 61
+ #define CTkbdtest 62
X
X #define CTdummy1 120
X #define CTdummy2 121
***************
*** 262,267 ****
--- 264,270 ----
X { "ifs", 0,0, "", pcmd_ifs, 0 },
X { "ifz", 0,0, "", pcmd_ifz, 0 },
X { "insline",0,0, "", pcmd_insline,0 },
+ { "kbdtest",4,CTkbdtest,"", 0, 0 },
X { "lbreak", 0,0, "", pcmd_lbreak,0 },
X { "llp", 2,CTllp, "set session log to /dev/lp", 0, ccG },
X { "lgets", 0,0, "", pcmd_lgets, 0 },
diff -c /export/home/wht/src/ecu312/ecudump.c ./ecudump.c
*** /export/home/wht/src/ecu312/ecudump.c Thu Jul 25 12:55:00 1991
--- ./ecudump.c Fri Aug 23 14:21:39 1991
***************
*** 87,92 ****
--- 87,93 ----
X if 'title' not NULL, title is printed... 'terse_flag'
X controls whether or not the title is "conspicuous" with
X hyphens before and after it making title line >70 chars long
+ If len negative, print no buffer offsets.
X ------------------------------------------------------------------*/
X void
X hex_dump_fp(fp,str,len,title,terse_flag)
***************
*** 96,105 ****
X char *title;
X int terse_flag;
X {
- int istr;
X register ipos = 0;
X register itmp;
X
X dumpfp = fp;
X
X if(title && (istr = strlen(title)))
--- 97,110 ----
X char *title;
X int terse_flag;
X {
X register ipos = 0;
X register itmp;
+ int istr;
+ int print_offset = (len > 0);
X
+ if(!print_offset)
+ len = -len;
+
X dumpfp = fp;
X
X if(title && (istr = strlen(title)))
***************
*** 106,112 ****
X {
X if(!terse_flag)
X {
! ipos = (73 - istr) / 2;
X itmp = ipos;
X while(itmp--)
X dump_putc('-');
--- 111,117 ----
X {
X if(!terse_flag)
X {
! ipos = (((print_offset) ? 73 : 67) - istr) / 2;
X itmp = ipos;
X while(itmp--)
X dump_putc('-');
***************
*** 131,138 ****
X istr = 0;
X while(istr < len)
X {
! hex_dump16(istr);
! dump_putc(' ');
X for(itmp = 0; itmp < 16; ++itmp)
X {
X ipos = istr + itmp;
--- 136,146 ----
X istr = 0;
X while(istr < len)
X {
! if(print_offset)
! {
! hex_dump16(istr);
! dump_puts(" ");
! }
X for(itmp = 0; itmp < 16; ++itmp)
X {
X ipos = istr + itmp;
***************
*** 142,151 ****
X dump_puts(" ");
X continue;
X }
! dump_putc(' ');
X hex_dump8(str[ipos]);
X }
! dump_puts(" | ");
X for(itmp = 0; itmp < 16; ++itmp)
X {
X ipos = istr + itmp;
--- 150,160 ----
X dump_puts(" ");
X continue;
X }
! if(itmp)
! dump_putc(' ');
X hex_dump8(str[ipos]);
X }
! dump_puts(" | ");
X for(itmp = 0; itmp < 16; ++itmp)
X {
X ipos = istr + itmp;
diff -c /export/home/wht/src/ecu312/ecuerror.h ./ecuerror.h
*** /export/home/wht/src/ecu312/ecuerror.h Thu Jul 25 12:55:00 1991
--- ./ecuerror.h Sun Aug 25 23:45:41 1991
***************
*** 6,11 ****
--- 6,12 ----
X error numbers should be <= 0x7FFF to avoid problems with M_I286 versions
X --------------------------------------------------------------------------*/
X /*+:EDITS:*/
+ /*:08-25-1991-23:45-root@n4hgf2-add eSwitchesTooLong */
X /*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
X /*:08-14-1990-20:40-wht@n4hgf-ecu3.00-flush old edit history */
X
***************
*** 63,68 ****
--- 64,70 ----
X #define eNoSuchVariable 0x403C /* variable by this name not defined */
X #define eInvalidLogicOp 0x403D /* invalid logical operator */
X #define eExpectRespondFail 0x403E /* expect-respond failed */
+ #define eSwitchesTooLong 0x403F /* switches too long */
X
X /* DO attention getter */
X #define e_ProcAttn 0x7000
diff -c /export/home/wht/src/ecu312/ecufkey.c ./ecufkey.c
*** /export/home/wht/src/ecu312/ecufkey.c Thu Jul 25 12:55:00 1991
--- ./ecufkey.c Fri Aug 23 14:21:41 1991
***************
*** 3,8 ****
--- 3,9 ----
X wht@n4hgf.Mt-Park.GA.US
X
X Defined functions:
+ kde_text(kde)
X ffso(str)
X kde_fgets(buf,bufsize,fp)
X keyset_define_key(bufptr)
***************
*** 36,41 ****
--- 37,43 ----
X GCC 1.40 fixed the bug, so #ifdef GCC140, don't use the kludge.
X ------------------------------------------------------------------*/
X /*+:EDITS:*/
+ /*:08-16-1991-00:11-wht@n4hgf-keyset_init loads default keyset if found */
X /*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
X /*:07-12-1991-13:57-wht@n4hgf-GCC140 fix update */
X /*:05-21-1991-00:45-wht@n4hgf-added -3 error code to keyset_read */
***************
*** 121,126 ****
--- 123,130 ----
X tkde->str[0] = 0x7F; /* this key is intercepted by kbd read routine */
X tkde->count = 0;
X
+ keyset_read("default");
+
X } /* end of keyset_init */
X
X /*+-------------------------------------------------------------------------
***************
*** 214,219 ****
--- 218,286 ----
X }
X return(-1);
X } /* end of xf_to_KDEt */
+
+ /*+-------------------------------------------------------------------------
+ kde_text(kde) - kde value to text
+ --------------------------------------------------------------------------*/
+ char *
+ kde_text(kde)
+ int kde;
+ {
+ struct XF_KDE_NAME *xkn = xf_kde_name;
+
+ while(xkn->xf)
+ {
+ if(xkn->kde == (char)kde)
+ return(xkn->name);
+ xkn++;
+ }
+ return("??");
+ } /* end of xf_to_KDEt */
+
+ /*+-------------------------------------------------------------------------
+ xf_text(xf) - XFkey to text
+ --------------------------------------------------------------------------*/
+ char *
+ xf_text(xf)
+ uchar xf;
+ {
+ static char sc8[8];
+
+ switch(xf)
+ {
+ case XFcurup: return("CUU");
+ case XFcurdn: return("CUD");
+ case XFcurrt: return("CUR");
+ case XFcurlf: return("CUL");
+ case XFcur5: return("CU5");
+ case XFend: return("End");
+ case XFpgdn: return("PgDn");
+ case XFhome: return("Home");
+ case XFpgup: return("PgUp");
+ case XFins: return("Ins");
+ case XF1: return("F1");
+ case XF2: return("F2");
+ case XF3: return("F3");
+ case XF4: return("F4");
+ case XF5: return("F5");
+ case XF6: return("F6");
+ case XF7: return("F7");
+ case XF8: return("F8");
+ case XF9: return("F9");
+ case XF10: return("F10");
+ case XF11: return("F11");
+ case XF12: return("F12");
+ case XFbktab: return("BkTab");
+ }
+
+ if((xf >= XF_ALTA) && (xf <= XF_ALTZ))
+ {
+ sprintf(sc8,"Alt-%c",'a' + xf - XF_ALTA);
+ return(sc8);
+ }
+ sprintf(sc8,"XF_%02x\n",xf);
+ return(sc8);
+ } /* end of xf_text */
X
X /*+-------------------------------------------------------------------------
X keyset_define_key(bufptr)
diff -c /export/home/wht/src/ecu312/ecufkey.h ./ecufkey.h
*** /export/home/wht/src/ecu312/ecufkey.h Thu Jul 25 12:55:00 1991
--- ./ecufkey.h Fri Aug 23 14:21:42 1991
***************
*** 55,61 ****
X char str[KDE_OUTSTR_MAX];
X } KDE;
X
! /* when an count is not a count but an action: */
X #define KACT_COMMAND -1
X #define KACT_LOCAL_SHELL -2
X #define KACT_REDISPLAY -3
--- 55,61 ----
X char str[KDE_OUTSTR_MAX];
X } KDE;
X
! /* when a count is not a count but an action: */
X #define KACT_COMMAND -1
X #define KACT_LOCAL_SHELL -2
X #define KACT_REDISPLAY -3
Common subdirectories: /export/home/wht/src/ecu312/ecufriend and ./ecufriend
diff -c /export/home/wht/src/ecu312/ecuicmd.c ./ecuicmd.c
*** /export/home/wht/src/ecu312/ecuicmd.c Sun Aug 25 17:28:22 1991
--- ./ecuicmd.c Mon Aug 26 13:30:04 1991
***************
*** 9,14 ****
--- 9,16 ----
X
X ------------------------------------------------------------------------*/
X /*+:EDITS:*/
+ /*:08-25-1991-14:39-wht@n4hgf-SVR4 port thanks to aega84!lh */
+ /*:08-17-1991-18:29-wht@n4hgf-add kbdtest command */
X /*:07-29-1991-20:56-wht@n4hgf-turn off memstat after frustrating evening */
X /*:07-29-1991-17:57-wht@n4hgf-add memstat */
X /*:07-25-1991-12:56-wht@n4hgf-ECU release 3.10 */
***************
*** 33,38 ****
SHAR_EOF
true || echo 'restore of PATCH3.01 failed'
fi
echo 'End of ecu/patch part 1'
echo 'File PATCH3.01 is continued in part 2'
echo 2 > _shar_seq_.tmp
exit 0
exit 0 # Just in case...