1998-02-01 09:37:08 +08:00
|
|
|
/* 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
|
|
|
|
|
1998-05-22 18:32:18 +08:00
|
|
|
extern void f_init(void);
|
1998-02-01 09:37:08 +08:00
|
|
|
extern int MAIN__(void);
|
|
|
|
|
|
|
|
main(int argc, char **argv)
|
|
|
|
{
|
1998-05-22 18:32:18 +08:00
|
|
|
f_setarg(argc, argv);
|
|
|
|
f_setsig();
|
1998-02-01 09:37:08 +08:00
|
|
|
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. */
|
|
|
|
}
|