xref: /csrg-svn/usr.bin/f77/libF77/exit_.c (revision 47940)
1*47940Sbostic /*-
2*47940Sbostic  * Copyright (c) 1980 The Regents of the University of California.
3*47940Sbostic  * All rights reserved.
422892Skre  *
5*47940Sbostic  * %sccs.include.proprietary.c%
610484Sdlw  */
710484Sdlw 
8*47940Sbostic #ifndef lint
9*47940Sbostic static char sccsid[] = "@(#)exit_.c	5.2 (Berkeley) 04/12/91";
10*47940Sbostic #endif /* not lint */
1110484Sdlw 
exit_(n)1210484Sdlw exit_(n)
1310484Sdlw long *n;
1410484Sdlw {
1517578Sdlw 	int	exitcode;
1617578Sdlw 
1717578Sdlw #if	vax
1817578Sdlw 	if (nargs() == 0)
1917578Sdlw 		exitcode = 0;
2017578Sdlw 	else
2117578Sdlw #endif	vax
2217578Sdlw 		exitcode = *n;	/* take any segmentation violation here */
2310484Sdlw 	f_exit();
2410484Sdlw 	_cleanup();
2517578Sdlw 	exit(exitcode);
2610484Sdlw }
27