PageRenderTime 35ms CodeModel.GetById 31ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Lib/guile/guilemain.i

#
Swig | 44 lines | 28 code | 6 blank | 10 comment | 0 complexity | 64fc574c502aa6338a4c38034e93f57a MD5 | raw file
 1/* -----------------------------------------------------------------------------
 2 * guilemain.i
 3 *
 4 * The main functions for a user augmented guile
 5 * version that can handle wrapped calls as generated by SWIG
 6 * ----------------------------------------------------------------------------- */
 7
 8%{
 9#include <libguile.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15/* Debugger interface (don't change the order of the following lines) */
16#define GDB_TYPE SCM
17#include <libguile/gdb_interface.h>
18GDB_INTERFACE;
19
20static void
21inner_main(void *closure, int argc, char **argv)
22{
23#ifdef SWIGINIT
24  SWIGINIT
25#else
26  SWIG_init();			/* SWIG init function */
27#endif
28  scm_shell(argc, argv);	/* scheme interpreter */
29  /* never reached: scm_shell will perform an exit */
30}
31
32#ifdef __cplusplus
33}
34#endif
35
36int
37main(int argc, char **argv)
38{
39  /* put any default initialisation code here: e.g. exit handlers */
40  scm_boot_guile(argc, argv, inner_main, 0); /* make a stack entry for the
41						garbage collector */
42  return 0; /* never reached, but avoids a warning */
43}
44%}