summaryrefslogtreecommitdiff
path: root/gr-run-waveform/run_waveform.cc
diff options
context:
space:
mode:
authorRob Savoye2010-11-25 12:01:05 -0700
committerRob Savoye2010-11-25 12:01:05 -0700
commita0ae40af9e59dc24a4c0c5ff9de69104ddb3526a (patch)
treea6669bec7cfb5b546d1e3264d5c40980554e3dd0 /gr-run-waveform/run_waveform.cc
parent617812045d62da388b464c126539aaa6fa5f59a4 (diff)
downloadgnuradio-a0ae40af9e59dc24a4c0c5ff9de69104ddb3526a.tar.gz
gnuradio-a0ae40af9e59dc24a4c0c5ff9de69104ddb3526a.tar.bz2
gnuradio-a0ae40af9e59dc24a4c0c5ff9de69104ddb3526a.zip
launch guile interpreter from standalone app, with simple example
Diffstat (limited to 'gr-run-waveform/run_waveform.cc')
-rw-r--r--gr-run-waveform/run_waveform.cc21
1 files changed, 19 insertions, 2 deletions
diff --git a/gr-run-waveform/run_waveform.cc b/gr-run-waveform/run_waveform.cc
index e83e543be..2d430766c 100644
--- a/gr-run-waveform/run_waveform.cc
+++ b/gr-run-waveform/run_waveform.cc
@@ -20,11 +20,28 @@
* Boston, MA 02110-1301, USA.
*/
-#include <stdio.h>
+#include <cstdio>
+#include <cstdlib>
+
+#include <libguile.h>
+
+static SCM
+load_waveform (void)
+{
+ return SCM_BOOL_F;
+}
+
+static void
+inner_main (void *data, int argc, char **argv)
+{
+ scm_c_define_gsubr ("load-waveform", 0, 0, 0, load_waveform);
+ scm_shell (argc, argv);
+}
int
main(int argc, char *argv[])
{
+ scm_boot_guile (argc, argv, inner_main, 0);
- printf("Hello World!\n");
+ return 0; // never reached
}