home *** CD-ROM | disk | FTP | other *** search
- {*********************************************************************
- (C) Copyright 1983-92; MetaWare Incorporated; Santa Cruz, CA 95060.
- *********************************************************************}
- pragma on(Optimize_for_space);
- Export(Here);
- pragma include('system.pf');
- pragma C_include('Implement.pf');
- with Implement:[Int];
- package Here;
- pragma Routine_aliasing_convention(Implement.CLIB_aliasing);
- procedure Exit(RC:Int); External;
- procedure _Exit(RC:Int); External;
- procedure Abort(); external;
- end;
-
- package Elsewhere;
- pragma Routine_aliasing_convention(Implement.RTE_aliasing);
- procedure Restore_interrupts;External;
- end;
-
-
- program Implement_exits;
- pragma Alias(Implement_exits,Implement.RTE || 'exits');
-
- -- C library functions:
-
- procedure Exit(RC:Int);
- begin
- -- Pascal halt goes through normal termination, including
- -- calling functions registered with on_exit, if the HC run-time library
- -- was linked ahead of the Pascal run-time library (if included).
- Halt(RC); -- Pascal halt.
- end;
- procedure _Exit(RC:Int);
- begin
- #ifndef CDOS
- Elsewhere.RESTORE_interrupts;
- #endif
- System.DOS_exit(RC);
- end;
- procedure Abort;
- begin
- _exit(-1); --where -1 is the implementation defined status "unsuccessful
- --termination". This almost meets Ansi standard. Ansi wants
- --the kill function to be called, and abort should do nothing
- --if signal SIGABRT is being ignored- but we have no signals.
- end;
-
- { (C) Copyright 1983-1985; unpublished property and trade secret of }
- { MetaWare Incorporated; Santa Cruz, CA 95060; detailed notice above.}
-