xref: /csrg-svn/usr.bin/f77/libF77/abort_.c (revision 47940)
1*47940Sbostic /*-
2*47940Sbostic  * Copyright (c) 1980 The Regents of the University of California.
3*47940Sbostic  * All rights reserved.
422808Skre  *
5*47940Sbostic  * %sccs.include.proprietary.c%
610433Sdlw  */
710433Sdlw 
8*47940Sbostic #ifndef lint
9*47940Sbostic static char sccsid[] = "@(#)abort_.c	5.3 (Berkeley) 04/12/91";
10*47940Sbostic #endif /* not lint */
11*47940Sbostic 
1210433Sdlw #include <stdio.h>
1310433Sdlw 
1410433Sdlw #if	pdp11
abort_()1510433Sdlw abort_()
1610433Sdlw {
1710433Sdlw 	fprintf(stderr, "Fortran abort routine called\n");
1810433Sdlw 	f_exit();
1910433Sdlw 	_cleanup();
2010433Sdlw 	abort();
2110433Sdlw }
2229961Smckusick #else	vax || tahoe
abort_(msg,len)2310433Sdlw abort_(msg,len)
2410433Sdlw char *msg; int len;
2510433Sdlw {
2610433Sdlw 	fprintf(stderr, "abort: ");
2710433Sdlw 	if (nargs()) while (len-- > 0) fputc(*msg++, stderr);
2810433Sdlw 	else fprintf(stderr, "called");
2910433Sdlw 	fputc('\n', stderr);
3020187Slibs 	f77_abort();
3110433Sdlw }
3229961Smckusick #endif	vax || tahoe
33