gcc/libf2c/libF77/main.c
Kaveh R. Ghazi 9321813126 F77_aloc.c, [...]: Delete checks on __cplusplus.
* libF77/F77_aloc.c, libF77/exit_.c, libF77/main.c,
	libF77/s_paus.c, libF77/s_stop.c, libF77/setarg.c,
	libF77/setsig.c, libF77/sig_die.c, libF77/signal1.h0,
	libI77/close.c, libI77/dolio.c, libI77/fio.h, libI77/fmt.h,
	libI77/lio.h: Delete checks on __cplusplus.

From-SVN: r54133
2002-06-01 01:55:57 +00:00

38 lines
680 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
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);
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. */
}