xref: /original-bsd/usr.bin/f77/libF77/exit_.c (revision 08eb28af)
1 /*-
2  * Copyright (c) 1980 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.proprietary.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)exit_.c	5.2 (Berkeley) 04/12/91";
10 #endif /* not lint */
11 
12 exit_(n)
13 long *n;
14 {
15 	int	exitcode;
16 
17 #if	vax
18 	if (nargs() == 0)
19 		exitcode = 0;
20 	else
21 #endif	vax
22 		exitcode = *n;	/* take any segmentation violation here */
23 	f_exit();
24 	_cleanup();
25 	exit(exitcode);
26 }
27