[comp.binaries.ibm.pc.d] ed editor

bobmon@iuvax.cs.indiana.edu (RAMontante) (08/29/88)

Rahul indicates that ctrl-C aborted 'ed' when he tried it.  If you look at
the source code you will see that I handled the signal() function, which
should trap ctrl-C's, extremely naively -- I just ifdef'ed it away for the
TurboC version.

Why?  At the time, I didn't know what could issue the software signals in
MSDOS, so it looked like useless code to me.  I've since figured out that
at least (only?) one signal, known variously as ctrl-C, SIGINT, or 2,
could be received without the program itself having to issue it (through a
gsignal() in TurboC...).

So I see two possible solutions.  The TurboC solution would be to use the
ctrlbrk() function.  A more general solution might be to use the signal()
function that Rahul posted a little bit ago.

Or don't hit ctrl-C :-)
-- 
--    bob,mon			(bobmon@iuvax.cs.indiana.edu)
--    "Aristotle was not Belgian..."	- Wanda