xref: /original-bsd/usr.bin/f77/libF77/abort_.c (revision cd18b70b)
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  *	@(#)abort_.c	5.2	11/03/86
7  */
8 
9 #include <stdio.h>
10 
11 #if	pdp11
12 abort_()
13 {
14 	fprintf(stderr, "Fortran abort routine called\n");
15 	f_exit();
16 	_cleanup();
17 	abort();
18 }
19 #else	vax || tahoe
20 abort_(msg,len)
21 char *msg; int len;
22 {
23 	fprintf(stderr, "abort: ");
24 	if (nargs()) while (len-- > 0) fputc(*msg++, stderr);
25 	else fprintf(stderr, "called");
26 	fputc('\n', stderr);
27 	f77_abort();
28 }
29 #endif	vax || tahoe
30