gcc/libf2c/libF77/main.c
Kaveh R. Ghazi 4d85a6fea6 *: Delete KR_headers cruft.
* libF77/*: Delete KR_headers cruft.
	* libI77/*: Likewise.
	* libU77/*: Likewise.

From-SVN: r54132
2002-06-01 01:53:53 +00:00

46 lines
750 B
C

/* STARTUP PROCEDURE FOR UNIX FORTRAN PROGRAMS */
#include <stdio.h>
#include "signal1.h"
#undef VOID
#include <stdlib.h>
#ifndef VOID
#define VOID void
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern void f_exit(void);
#ifndef NO_ONEXIT
#define ONEXIT atexit
extern int atexit(void (*)(void));
#endif
extern void f_init(void);
extern int MAIN__(void);
#ifdef __cplusplus
}
#endif
main(int argc, char **argv)
{
f_setarg(argc, argv);
f_setsig();
f_init();
#ifndef NO_ONEXIT
ONEXIT(f_exit);
#endif
MAIN__();
#ifdef NO_ONEXIT
f_exit();
#endif
exit(0); /* exit(0) rather than return(0) to bypass Cray bug */
return 0; /* For compilers that complain of missing return values; */
/* others will complain that this is unreachable code. */
}