CSIGNAL.LST 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. Listing:
  2. 1 (* Release 3.10 *)
  3. 2 (*-------------------------------------------------------------------------*
  4. 3 * *
  5. 4 * CSIGNAL.DEF - Modula-2 interface to SIGNAL.H *
  6. 5 * *
  7. 6 * COPYRIGHT (C) 1989..1992 Clarion Software Corporation. *
  8. 7 * All Rights Reserved *
  9. 8 * *
  10. 9 *--------------------------------------------------------------------------*)
  11. 10
  12. 11 (*# project("#set tsc='on'") *)
  13. 12 (*# call(o_a_size=>off, o_a_copy=>off, c_conv=>on, result_optional=>on) *)
  14. 13 (*# module(implementation=>off, init_code=>off) *)
  15. 14 (*# name(prefix=>c) *)
  16. 15
  17. 16
  18. 17 DEFINITION MODULE csignal;
  19. 18
  20. 19 CONST
  21. 20 NSIG = 23; (* maximum signal number + 1 *)
  22. 21 SIGINT = 2; (* interrupt - corresponds to DOS 3.x int 23H *)
  23. 22 SIGILL = 4; (* illegal opcode *)
  24. 23 SIGFPE = 8; (* floating point error *)
  25. 24 SIGSEGV = 11; (* segment violation *)
  26. 25 SIGTERM = 15; (* software termination signal from kill *)
  27. 26 SIGUSR1 = 16; (* user defined signal 1 *)
  28. 27 SIGUSR2 = 17; (* user defined signal 2 *)
  29. 28 SIGUSR3 = 20; (* user defined signal 3 *)
  30. 29 SIGABRT = 22; (* abnormal termination triggered by abort call *)
  31. 30
  32. 31 TYPE
  33. 32 SigProc = PROCEDURE(INTEGER);
  34. ***** ^ not supported yet
  35. ***** ^ not supported yet
  36. 33 CONST
  37. 34 SIG_DFL = 0;
  38. 35 SIG_IGN = 1;
  39. 36 SIG_SGE = 3;
  40. 37 SIG_ACK = 4;
  41. 38 SIG_ERR = -1;
  42. 39
  43. 40 PROCEDURE signal(SigNo: INTEGER; P: SigProc): SigProc;
  44. 41 PROCEDURE raise(_sig: INTEGER);
  45. 42
  46. 43 END csignal.
  47. ***** ^ not supported yet
  48. 3 errors