PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Lib/guile/guilemain.i

#
Swig | 44 lines | 28 code | 6 blank | 10 comment | 0 complexity | 64fc574c502aa6338a4c38034e93f57a MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  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. #include <libguile.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. /* Debugger interface (don't change the order of the following lines) */
  13. #define GDB_TYPE SCM
  14. #include <libguile/gdb_interface.h>
  15. GDB_INTERFACE;
  16. static void
  17. inner_main(void *closure, int argc, char **argv)
  18. {
  19. #ifdef SWIGINIT
  20. SWIGINIT
  21. #else
  22. SWIG_init(); /* SWIG init function */
  23. #endif
  24. scm_shell(argc, argv); /* scheme interpreter */
  25. /* never reached: scm_shell will perform an exit */
  26. }
  27. #ifdef __cplusplus
  28. }
  29. #endif
  30. int
  31. main(int argc, char **argv)
  32. {
  33. /* put any default initialisation code here: e.g. exit handlers */
  34. scm_boot_guile(argc, argv, inner_main, 0); /* make a stack entry for the
  35. garbage collector */
  36. return 0; /* never reached, but avoids a warning */
  37. }
  38. %}