summaryrefslogtreecommitdiff
path: root/doc/example-smob/myguile.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/example-smob/myguile.c')
-rw-r--r--doc/example-smob/myguile.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/example-smob/myguile.c b/doc/example-smob/myguile.c
new file mode 100644
index 000000000..7234b9846
--- /dev/null
+++ b/doc/example-smob/myguile.c
@@ -0,0 +1,17 @@
+#include <libguile.h>
+#include "image-type.h"
+
+static void
+inner_main (void *closure, int argc, char **argv)
+{
+ /* module initializations would go here */
+ init_image_type();
+ scm_shell (argc, argv);
+}
+
+int
+main (int argc, char **argv)
+{
+ scm_boot_guile (argc, argv, inner_main, 0);
+ return 0; /* never reached */
+}