www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/22/11:13:18

Xref: news2.mv.net comp.os.msdos.djgpp:4134
From: Shawn Hargreaves <slh100 AT york DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Ctrl-C arg
Date: Mon, 20 May 1996 19:48:11 +0100
Organization: The University of York, UK
Lines: 28
Message-ID: <Pine.SGI.3.91.960520151505.15841B-100000@tower.york.ac.uk>
NNTP-Posting-Host: tower.york.ac.uk
Mime-Version: 1.0
In-Reply-To: <8D75984B91@fs2.mt.umist.ac.uk>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

dunder AT nyongwa DOT montreal DOT qc DOT ca (Don Karnage) wrote: 

> ... my editor has 'emacs' keybindings, meaning I must press ^X^C for 
> exiting... Must I recompile all my editor using DJGPP v1.2 (which I 
> don't have and > > don't have the disk space for either) ...

try:

#include <sys/exceptn.h>
__djgpp_set_ctrl_c(0);

You can then read ctrl+C with the bios or conio functions. If you are 
using stdio you will also have to reopen stdin in binary mode. This 
function doesn't seem to be documented anywhere: does anyone know why 
not? Is there some reason why I shouldn't be using it?

On a related note, I can't get setcbrk() to do anything. My understanding 
is that calling setcbrk(0) should prevent ctrl+break from killing my 
program off, but it doesn't work...


/*
 *	Shawn Hargreaves.        Why is 'phonetic' spelt with a ph?
 *	Check out Allegro and FED on http://www.york.ac.uk/~slh100/
 */



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019