Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.2 KiB

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