xref: /csrg-svn/usr.bin/f77/libF77/exit_.c (revision 22892)
110484Sdlw /*
2*22892Skre  * Copyright (c) 1980 Regents of the University of California.
3*22892Skre  * All rights reserved.  The Berkeley software License Agreement
4*22892Skre  * specifies the terms and conditions for redistribution.
5*22892Skre  *
6*22892Skre  *	@(#)exit_.c	5.1	06/07/85
710484Sdlw  */
810484Sdlw 
910484Sdlw 
1010484Sdlw exit_(n)
1110484Sdlw long *n;
1210484Sdlw {
1317578Sdlw 	int	exitcode;
1417578Sdlw 
1517578Sdlw #if	vax
1617578Sdlw 	if (nargs() == 0)
1717578Sdlw 		exitcode = 0;
1817578Sdlw 	else
1917578Sdlw #endif	vax
2017578Sdlw 		exitcode = *n;	/* take any segmentation violation here */
2110484Sdlw 	f_exit();
2210484Sdlw 	_cleanup();
2317578Sdlw 	exit(exitcode);
2410484Sdlw }
25