diff options
Diffstat (limited to 'contrib/libf2c/libF77/main.c')
-rw-r--r-- | contrib/libf2c/libF77/main.c | 67 |
1 files changed, 17 insertions, 50 deletions
diff --git a/contrib/libf2c/libF77/main.c b/contrib/libf2c/libF77/main.c index 17bf449e4024..a3955cbc1a76 100644 --- a/contrib/libf2c/libF77/main.c +++ b/contrib/libf2c/libF77/main.c @@ -3,66 +3,33 @@ #include <stdio.h> #include "signal1.h" -#ifndef KR_headers -#undef VOID #include <stdlib.h> -#endif - -#ifndef VOID -#define VOID void -#endif -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef NO__STDC -#define ONEXIT onexit -extern VOID f_exit(); -#else -#ifndef KR_headers -extern void f_exit(void); +extern void f_exit (void); #ifndef NO_ONEXIT #define ONEXIT atexit -extern int atexit(void (*)(void)); -#endif -#else -#ifndef NO_ONEXIT -#define ONEXIT onexit -extern VOID f_exit(); -#endif -#endif -#endif - -#ifdef KR_headers -extern VOID f_init(); -extern int MAIN__(); -#else -extern void f_init(void); -extern int MAIN__(void); +extern int atexit (void (*)(void)); #endif -#ifdef __cplusplus - } -#endif +extern void f_init (void); +extern int MAIN__ (void); +extern void f_setarg (int, char **); +extern void f_setsig (void); -#ifdef KR_headers -main(argc, argv) int argc; char **argv; -#else -main(int argc, char **argv) -#endif +int +main (int argc, char **argv) { -f_setarg(argc, argv); -f_setsig(); -f_init(); + f_setarg (argc, argv); + f_setsig (); + f_init (); #ifndef NO_ONEXIT -ONEXIT(f_exit); + ONEXIT (f_exit); #endif -MAIN__(); + MAIN__ (); #ifdef NO_ONEXIT -f_exit(); + 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. */ + 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. */ } |