Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ncar!gatech!usenet.ins.cwru.edu!ncoast!davewt From: davewt@NCoast.ORG (David Wright) Newsgroups: comp.sys.amiga.programmer Subject: Re: Dumb windows from SAS/C programs on Workbench Summary: Great, but what about those darn interupts? Message-ID: <1991May17.022136.1539@NCoast.ORG> Date: 17 May 91 02:21:36 GMT References: <1991May14.164909.19186@NCoast.ORG> Organization: North Coast Public Access Un*x (ncoast) Lines: 32 In article chopps@ro-chp.UUCP (Chris Hopps) writes: >There used to be a peice of an Apprentice & Journyman included with Lattice, >in the source drawer, but when 5.x came out, it was removed. This file Darn! And after I erased my old Lattice 3.xx and 4.xx disks when I got 5.xxx (Guess it's my fault for not poking around on them). >the net result is that the window disapears. NOTE: I wouldn't advise doing >anything that uses STDIO/STDOUT if you do this, ie. printf, puts, gets... >under 1.3 it will definitaley crash! I would expect this. I don't use ANY of those functions, or any other I/O functions from lc.lib, only Amiga functions, for which I have specifically opened a file with "Open()". That's why I don't understand why they open that window for you. They should just let it alone if you run from WB, and have people handle it themselves. After all, you have to parse the WB options differently, anyway. But the big question now is how do I get to receive CTRL-[CDEF] interupts? Many people sent me instructions on how to disable the SAS default CTRL-C handler, and it has indeed allowed my program to ignore CTRL-C interupts. But what I really want to do is to be able to check to see if there has been an interupt since the last time I checked, and I used to be able to do this easily (in Draco, but then many things are easier in Draco than in C), but although the code I brought over from Draco compiles just fine, I never seem to get the break signals. What do you have to do to get things like SIG_BRKF to appear in your input stream, or, for instance, prevent a USER from breaking out by entering CTRL-C in the program, but allowing someone to use the "BREAK" CLI command to send you a CTRL-C and have it correctly (IE, call my handler only when I can safely process the event) handle it? Dave