OLD | NEW |
(Empty) | |
| 1 #include <stdio.h> |
| 2 #include <pthread.h> |
| 3 |
| 4 /* |
| 5 * ___VERSION must match the version number of the Gambit header file. |
| 6 */ |
| 7 |
| 8 #define ___VERSION 407000 |
| 9 #include "gambit.h" |
| 10 |
| 11 extern void repl(); |
| 12 |
| 13 /* |
| 14 * Define SCHEME_LIBRARY_LINKER as the name of the Scheme library |
| 15 * prefixed with "____20_" and suffixed with "__". This is the |
| 16 * function that initializes the Scheme library. |
| 17 */ |
| 18 |
| 19 #define SCHEME_LIBRARY_LINKER ____20_repl__ |
| 20 |
| 21 ___BEGIN_C_LINKAGE |
| 22 extern ___mod_or_lnk SCHEME_LIBRARY_LINKER (___global_state_struct*); |
| 23 ___END_C_LINKAGE |
| 24 |
| 25 int gambc_main(int argc, char **argv) |
| 26 { |
| 27 /* |
| 28 * Setup the Scheme library by calling "___setup" with appropriate |
| 29 * parameters. The call to "___setup_params_reset" sets all parameters |
| 30 * to their default setting. |
| 31 */ |
| 32 |
| 33 ___setup_params_struct setup_params; |
| 34 ___setup_params_reset (&setup_params); |
| 35 setup_params.version = ___VERSION; |
| 36 setup_params.linker = SCHEME_LIBRARY_LINKER; |
| 37 ___setup (&setup_params); |
| 38 |
| 39 repl(); |
| 40 |
| 41 ___cleanup (); |
| 42 return 0; |
| 43 } |
OLD | NEW |