moorel@eglin-vax@caip.RUTGERS.EDU (02/26/86)
From: "LYNNE C MOORE" <moorel@eglin-vax> New topic of controversy: I was reading the README file that comes with the Lattice C compiler for the Amiga, and found the section on program termination. Since I will be using the ROM kernel routines to allocate and deallocate memory blocks, I need to use the <ctrl>c signal to abort my process properly. The README file stated that I needed to have a non-zero entry in the external integer Enable_Abort, and could then poll Check_Abort() to detect the input. I cannot find references to either the integer or to the function in any of the manuals, and when I tried it in a test program, it didn't work. What did work was a small code fragment in the libraries/dos.h header file (buried in a comment line :-}), which defined signal bits for the control codes and gave an example using: if (SetSignal(0,0) & SIGBREAKF_CTRL_C) cleanup_and_exit(); which worked in the test case I ran. Did I just misunderstand the reference in the documentation, or is there a Check_Abort function in one of the libraries? The documentation is woefully inaccurate about a number of critical points, and there are very few examples. Any examples of graceful program terminations (without using getchar() or one of the stdio functions), please send them directly to me. Thanks in advance, Lynne C. Moore <moorel@eglin-vax.arpa> ------