[comp.os.msdos.misc] Using EDLIN to insert ^C in a file

khawand@hoss.unl.edu (Nancy Khawand) (06/11/91)

Using EDLIN, how can I insert the ^C character into a file?  
Right now it simply terminates the edit.
--
Nancy Khawand				Internet: khawand@hoss.unl.edu
University of Nebraska - Lincoln        Phone   : (402) 472-5663
Computing Resource Center               FAX     : (402) 472-5280

buchholz@noao.edu (Nick Buchholz) (06/11/91)

From article <1991Jun10.213629.1591@unlinfo.unl.edu>, by khawand@hoss.unl.edu (Nancy Khawand):
> Using EDLIN, how can I insert the ^C character into a file?  
> Right now it simply terminates the edit.
> --
> Nancy Khawand				Internet: khawand@hoss.unl.edu
> University of Nebraska - Lincoln        Phone   : (402) 472-5663
> Computing Resource Center               FAX     : (402) 472-5280


try getting into insert mode and typeing 003 while holding down the alt key
This enters the ascii character 3 (^C) into the file.


Nick C Buchholz
buchholz@yogi.tuc.noao.edu      | "Time is an illusion, Lunchtime doubly so"
                                |                            - Ford Prefect
Time is an illusion perpetrated by the manufacturers of space.

dmm0t@holmes.acc.Virginia.EDU (Dave Meyer) (06/11/91)

>From article <1991Jun10.213629.1591@unlinfo.unl.edu>, by khawand@hoss.unl.edu (Nancy Khawand):
> Using EDLIN, how can I insert the ^C character into a file?  
> Right now it simply terminates the edit.

I'm not positive about this, since it's been a long time since
I've used EDLIN.  I think you type ^V followed by C
(i.e. control-V capital C), and it inserts a ^C.  It will
appear as ^VC when you type it in, but when you go back and
list it, it will be ^C.

-- 
David M. Meyer                                   | dmm0t@virginia.edu
Department of Mechanical & Aerospace Engineering | (804) 924-7926
University of Virginia                           |

ekman@wdl30.wdl.loral.com (Donald Ekman) (06/11/91)

In article <1991Jun11.145649.10912@noao.edu> buchholz@noao.edu (Nick Buchholz) writes:
>From article <1991Jun10.213629.1591@unlinfo.unl.edu>, by khawand@hoss.unl.edu (Nancy Khawand):
>> Using EDLIN, how can I insert the ^C character into a file?  
>> Right now it simply terminates the edit.
>> --
>> Nancy Khawand				Internet: khawand@hoss.unl.edu
>> University of Nebraska - Lincoln        Phone   : (402) 472-5663
>> Computing Resource Center               FAX     : (402) 472-5280
>
>
>try getting into insert mode and typeing 003 while holding down the alt key
>This enters the ascii character 3 (^C) into the file.
>
>
>Nick C Buchholz
>buchholz@yogi.tuc.noao.edu      | "Time is an illusion, Lunchtime doubly so"
>                                |                            - Ford Prefect
>Time is an illusion perpetrated by the manufacturers of space.

In my edlin (PC-DOS 3.3) this doesn't work.  It escapes from insert mode
just as if you had pressed Ctrl-C.

I don't know how to do it either.  I tried ^V^C, but that didn't work.
Anybody got any other ideas?

-- 
Donald E. Ekman, Space Systems/Loral, Palo Alto, CA  ekman@wdl30.wdl.loral.com

alexande@borland.com (Mark Alexander) (06/11/91)

Use DEBUG to create a one-byte file containing the Control-C, then use
COPY to concatenate it with the other text.

I use DEBUG to edit all my source files :-)

mitchell@MDI.COM (Bill Mitchell) (06/12/91)

In article <1991Jun11.161125.23246@wdl1.wdl.loral.com> ekman@wdl30.wdl.loral.com (Donald Ekman) writes:
>In article <1991Jun11.145649.10912@noao.edu> buchholz@noao.edu (Nick Buchholz) writes:

>>From article <1991Jun10.213629.1591@unlinfo.unl.edu>, by khawand@hoss.unl.edu (Nancy Khawand):
>>> Using EDLIN, how can I insert the ^C character into a file?  
>>>[...]
>>
>>
>>try getting into insert mode and typeing 003 while holding down the alt key
>>This enters the ascii character 3 (^C) into the file.
>>
>>
>>[...]
>
>In my edlin (PC-DOS 3.3) this doesn't work.  It escapes from insert mode
>just as if you had pressed Ctrl-C.
>
>I don't know how to do it either.  I tried ^V^C, but that didn't work.
>Anybody got any other ideas?
>

The only quick answer I've found is to place another char where you want
the control-c, and then use debug to edit the file and replace that char
with a byte containing 0x03.

-- 
mitchell@mdi.com (Bill Mitchell)

kevin@loki.une.oz.au (Kevin Pollard) (06/12/91)

From article <1991Jun11.165234.16777@borland.com>, by alexande@borland.com (Mark Alexander):
> 
> Use DEBUG to create a one-byte file containing the Control-C, then use
> COPY to concatenate it with the other text.
> 
> I use DEBUG to edit all my source files :-)

Hey, this not only doesn't sound silly, but it isn't silly!