xref: /original-bsd/usr.bin/f77/libF77/exit_.c (revision 0a83ae40)
1 /*
2  * Copyright (c) 1980 Regents of the University of California.
3  * All rights reserved.  The Berkeley software License Agreement
4  * specifies the terms and conditions for redistribution.
5  *
6  *	@(#)exit_.c	5.1	06/07/85
7  */
8 
9 
10 exit_(n)
11 long *n;
12 {
13 	int	exitcode;
14 
15 #if	vax
16 	if (nargs() == 0)
17 		exitcode = 0;
18 	else
19 #endif	vax
20 		exitcode = *n;	/* take any segmentation violation here */
21 	f_exit();
22 	_cleanup();
23 	exit(exitcode);
24 }
25