[fpc-pascal]CTRL + Break

Lee, John LeeJ at logica.com
Fri Jul 20 14:18:10 CEST 2001


oops ... sorry - I had the lines in my file but deleted them before I sent
it (& didn't check!) because thought they weren't needed! J

> -----Original Message-----
> From: dirk at verwiebe.de [mailto:dirk at verwiebe.de]
> Sent: 20 July 2001 13:23
> To: fpc-pascal at deadlock.et.tudelft.nl
> Subject: RE: [fpc-pascal]CTRL + Break
> 
> 
> Antwort auf Mail von Lee, John vom 20.07.2001 10:59:31:
> 
> 
> Hi John,
> 
> thank you for your hint.
> 
> Catching CTRL+Break now works.
> I modified your program a little bit.
> 
> regards 
> 
> Dirk Verwiebe
> 
> >program tst;
> >
> >uses ctrl_c;
> 
> should be. 
> uses dpmiexcp;
> 
> >
> >var  NewSignal,OldSigSegm,OldSigInt : SignalHandler;
> >Function CatchSignal(Sig : longint):longint;
> >begin
> >  case Sig of
> >   SIGSEGV : begin
> >             { Temporary message - until we get an error number... }
> >               writeln ('Panic : Internal compiler error, exiting.');
> >               Halt(99);
> >             end;
> >    SIGINT : begin
> >              WriteLn('Ctrl-C Signaled!');
> >              Halt(1);
> >             end;
> >  end;
> >  CatchSignal:=0;
> >end;
> >
> >begin
> 
> These lines are missing.
> 
> NewSignal:=SignalHandler(@CatchSignal);
> OldSigInt:=Signal (SIGINT,NewSignal);
> 
> >{must be doing i/o otherwise ctrl/c does not work}
> > repeat write('.'); until false;
> >end.
> 
> 




More information about the fpc-pascal mailing list