File: Termination.Mod

package info (click to toggle)
oo2c32 1.5.0-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 8,748 kB
  • ctags: 5,415
  • sloc: ansic: 95,007; sh: 473; makefile: 344; perl: 57; lisp: 21
file content (37 lines) | stat: -rw-r--r-- 1,605 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
(*	$Id: Termination.Mod,v 1.3 1999/10/03 11:49:25 ooc-devel Exp $	*)
MODULE Termination [FOREIGN "C"; LINK FILE "Termination.c" END];
(*  Provides procedures for program finalization.
    Copyright (C) 1997  Michael van Acken

    This module is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public License
    as published by the Free Software Foundation; either version 2 of
    the License, or (at your option) any later version.

    This module is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with OOC. If not, write to the Free Software Foundation,
    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*)
(* preliminary version ... *)

TYPE
  Proc* = PROCEDURE;
  
PROCEDURE RegisterProc* (proc: Proc);
(* Adds `proc' to the list of procedures executed at program termination.
   Procedures are called in reverse order of registration.  
   Note: The registered procedures will be called on normal program 
   termination, if an error signal is raised, or if an termination signal
   is raised. *)
  
PROCEDURE UnregisterProc* (proc: Proc);
(* Removes `proc' from the list of procedures executed at program termination.
   The last procedure equal to `proc' is removed.  Nothing is done if `proc'
   hasn't been registered before.  *)
  
END Termination.