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