[comp.sys.ibm.pc] OOPS -- BETTER CED v1.0C patches for ^U & ^W

landauer@sun.uucp (Doug Landauer) (05/21/87)

Isn't it fun to program in hex? 

I posted a previous version of this article a bit too soon.  The patches
in this article work much better than the ones in the previous version,
so if you did get both, get rid of the earlier version.  Sorry.

This article contains a patch to CED (see below) to make control-U
be the line-kill character *instead of ESCape*, and to add a new
word-kill character (control-W).

	Note:  I said *instead of ESCape*.  That is, ^U will
	erase the line.  ESCape will no longer have that
	function.

Several people have posted patches to various versions of IBM's PC-DOS
(IBMDOS.COM) to make control-U be the line-kill character, and
control-W be the word-kill character.  I've seen others suggesting that
you should use CED instead, or that patching CED is "a better idea".
I've even seen Colin Kelly's wonderful patch (thanks, Colin!) to make
control-U work in CED.

What I haven't yet seen anyone mention is that the IBMDOS.COM patches
*will not work* if you use CED -- they'll be totally ineffective.
So if you want to keep using CED, the IBMDOS.COM patches are useless.
(Also, having a PC-DOS version 3.X that already does the right thing
with these characters is just as useless.)

    [
	For those of you who've never heard of it, "CED" is a "Command
	EDitor" -- it's a program that gives you a kind of command-
	history mechanism (more like the Korn shell's than like csh's),
	accessible using the arrow keys on the IBM-PC.  It is fairly
	easy to use, and is or was available on many BBSs -- I believe
	that a uuencoded copy of CED version 1.0C was posted here in
	net.micro.pc some time last year.  (Sorry, I no longer have the
	original article.)
    ]

So, here is an extension of Colin's CED patch that implements a
word-kill character and the line-kill character.  You need to start
with CED version 1.0C.

For reference, Colin's articles were
      <378@vu-vlsi.UUCP>, dated 12 Oct 86,
and   <584@vu-vlsi.UUCP>, dated 26 Jan 87

Sorry, it's not a shar file.
------------------ MKCEDCUW.BAT-----------------------------

goto begin
e 644 15

a 650
	jmp e24


e e10 "ced1.0c(c)CJDunford" 0d

a e24
	cmp al,17
	jz e35
	call 751
	ret
	call 7ae
	cmp byte -1[di],20
	jz e3b
	cmp di,[04cd]
	jnz e2c
	ret

n cedcuw.com
w
q

This file patches CED 1.0c to use ^U as the line kill character
*instead of ESCape*, and ^W as the (new) word-kill character.

The modified file is written out as CEDCUW.COM.  Make sure you
check that it works before copying it over your original CED.COM!

Thanks to Colin Kelley ({cbmvax,pyrnj,psuvax1,bpa}!vu-vlsi!colin)
for finding the right places to put the patch.
   -- -- -- -- -- -- -- -- -- -- -- --
	Doug Landauer      ARPA Internet:       landauer@sun.com
	UUCP:  {amdahl, decwrl, hplabs, seismo, ...}!sun!landauer

:begin
debug ced.com < mkcedcuw.bat

dsd@hpsadla.UUCP (06/09/87)

Please post it.

Donald St. Denis