diff options
author | jmasso <jmasso@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-06-03 09:20:39 +0000 |
---|---|---|
committer | jmasso <jmasso@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-06-03 09:20:39 +0000 |
commit | 6670038e623dc0d486f24ae72ebfc0d9b1a8d3a1 (patch) | |
tree | 227065555e2406957406320f0e672b0df0560430 /src/main/OverloadMain.c | |
parent | aa389873c96c22f911ef6de3116e95e38b7b42c6 (diff) |
SOme more
git-svn-id: http://svn.cactuscode.org/flesh/trunk@544 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/OverloadMain.c')
-rw-r--r-- | src/main/OverloadMain.c | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/src/main/OverloadMain.c b/src/main/OverloadMain.c new file mode 100644 index 00000000..b65ad9ad --- /dev/null +++ b/src/main/OverloadMain.c @@ -0,0 +1,83 @@ + /*@@ + @file Overload.c + @date Thu Feb 4 09:01:18 1999 + @author Tom Goodale + @desc + Contains routines to overload the main functions. + Uses the overload macros to make sure of consistency and + to save typing ! + @enddesc + @@*/ + +#include <stdio.h> +#include <stdlib.h> + +#include "flesh.h" +#include "OverloadMacros.h" + +static char *rcsid="$Header$"; + +/* Define the prototypes for the dummy functions. */ +#define OVERLOADABLE(name) OVERLOADABLE_DUMMYPROTOTYPE(name) + + /* These ones actually have defaults. */ +#define CCTK_DummyInitialise CactusDefaultInitialise +#define CCTK_DummyEvolve CactusDefaultEvolve +#define CCTK_DummyShutdown CactusDefaultShutdown + +#include "MainOverloadables.h" + + /* Reset the #define to prevent complications. */ +#undef CCTK_DummyInitialise +#undef CCTK_DummyEvolve +#undef CCTK_DummyShutdown + +#undef OVERLOADABLE + + +/* Create the overloadable function variables and the + * functions allowing the variables to be set. + */ +#define OVERLOADABLE(name) OVERLOADABLE_FUNCTION(name) + +#include "MainOverloadables.h" + +#undef OVERLOADABLE + + /*@@ + @routine SetupMainFunctions + @date Thu Feb 4 09:02:49 1999 + @author Tom Goodale + @desc + Set any main function which hasn't been overloaded to the default. + @enddesc + @calls + @calledby + @history + + @endhistory + +@@*/ +int SetupMainFunctions(void) +{ + +#define OVERLOADABLE(name) OVERLOADABLE_CHECK(name) + + /* These ones actually have defaults. */ +#define CCTK_DummyInitialise CactusDefaultInitialise +#define CCTK_DummyEvolve CactusDefaultEvolve +#define CCTK_DummyShutdown CactusDefaultShutdown + +#include "MainOverloadables.h" + + /* Reset the #define to prevent complications. */ +#undef CCTK_DummyInitialise +#undef CCTK_DummyEvolve +#undef CCTK_DummyShutdown + +#undef OVERLOADABLE + + return 0; +} + + |