summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-run-waveform/Makefile.am10
-rw-r--r--gr-run-waveform/load.x9
-rw-r--r--gr-run-waveform/xyzzy-load.c21
3 files changed, 25 insertions, 15 deletions
diff --git a/gr-run-waveform/Makefile.am b/gr-run-waveform/Makefile.am
index a2040ec66..a6e237bc4 100644
--- a/gr-run-waveform/Makefile.am
+++ b/gr-run-waveform/Makefile.am
@@ -21,26 +21,26 @@
ACLOCAL_AMFLAGS = -I config
DIST_SUBDIRS = config
-EXTRA_DIST = gen-xyzzy load.x
+EXTRA_DIST = gen-xyzzy
# build the standalone waveform application
bin_PROGRAMS = run_waveform
# Rather than build a library, we just use a variable so the same code
# can be used in test cases, as well as the run-waveform application.
-SRCS = xyzzy.cc # xyzzy-load.c
+SRCS = xyzzy.cc xyzzy-load.c
# This is where the data file created by gen-xyzzy gets installed. This file
# is needed by run-waveform and the test case.
filesystemdir = $(datarootdir)/gnuradio/gr-run-waveform
-# libpath is to support xyzzy-load.c, filesystem.dat is the data file
+# libpath is to support xyzzy-load.cc, filesystem.dat is the data file
BUILT_SOURCES = libpath.h filesystem.dat
dist_filesystem_DATA = filesystem.dat
# A unit test case for the XYZZY class
check_PROGRAMS = test_xyzzy
-test_xyzzy_SOURCES = test_xyzzy.cc $(SRCS)
+test_xyzzy_SOURCES = test_xyzzy.cc xyzzy.cc xyzzy-load.c #$(SRCS)
test_xyzzy_CPPFLAGS = $(GUILE_CFLAGS) \
-DSRCDIR=\"$(srcdir)\" \
-DDATAROOTDIR=\"$(datarootdir)\"
@@ -107,4 +107,4 @@ libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status
# that this requires GNU Radio to be installed before the outout will be correct.
filesystem.dat:
-$(RM) -f filesystem.dat
- $(PYTHON) $(srcdir)/gen-xyzzy $(GUILE_INSTALL_PATH) $(datarootdir)/guile/site > filesystem.dat
+ python $(srcdir)/gen-xyzzy $(GUILE_INSTALL_PATH) $(datarootdir)/guile/site > filesystem.dat
diff --git a/gr-run-waveform/load.x b/gr-run-waveform/load.x
deleted file mode 100644
index 1b53a60f9..000000000
--- a/gr-run-waveform/load.x
+++ /dev/null
@@ -1,9 +0,0 @@
-/* cpp arguments: load.c -DHAVE_CONFIG_H -I.. -I.. -I.. -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -Wall -Wmissing-prototypes */
- scm_c_define_gsubr (s_scm_primitive_load, 1, 0, 0, (SCM (*)()) scm_primitive_load); ;
- scm_c_define_gsubr (s_scm_sys_package_data_dir, 0, 0, 0, (SCM (*)()) scm_sys_package_data_dir); ;
- scm_c_define_gsubr (s_scm_sys_library_dir, 0, 0, 0, (SCM (*)()) scm_sys_library_dir); ;
- scm_c_define_gsubr (s_scm_sys_site_dir, 0, 0, 0, (SCM (*)()) scm_sys_site_dir); ;
- scm_c_define_gsubr (s_scm_parse_path, 1, 1, 0, (SCM (*)()) scm_parse_path); ;
- scm_c_define_gsubr (s_scm_search_path, 2, 1, 0, (SCM (*)()) scm_search_path); ;
- scm_c_define_gsubr (s_scm_sys_search_load_path, 1, 0, 0, (SCM (*)()) scm_sys_search_load_path); ;
- scm_c_define_gsubr (s_scm_primitive_load_path, 1, 0, 0, (SCM (*)()) scm_primitive_load_path); ;
diff --git a/gr-run-waveform/xyzzy-load.c b/gr-run-waveform/xyzzy-load.c
index 3e4ba5307..bf814fbd1 100644
--- a/gr-run-waveform/xyzzy-load.c
+++ b/gr-run-waveform/xyzzy-load.c
@@ -90,6 +90,8 @@ SCM_DEFINE (scm_xyzzy_primitive_load, "primitive-load", 1, 0, 0,
SCM hook = *scm_loc_load_hook;
SCM_VALIDATE_STRING (1, filename);
+ fprintf(stderr, "TRACE %s: %d: %s\n", __FUNCTION__, __LINE__, scm_to_locale_string(filename));
+
if (scm_is_true (hook) && scm_is_false (scm_procedure_p (hook)))
SCM_MISC_ERROR ("value of %load-hook is neither a procedure nor #f",
SCM_EOL);
@@ -333,6 +335,8 @@ SCM_DEFINE (scm_xyzzy_search_path, "search-path", 2, 1, 0,
filename_len = strlen (filename_chars);
scm_dynwind_free (filename_chars);
+ fprintf(stderr, "TRACE %s: %d: %s\n", __FUNCTION__, __LINE__, filename_chars);
+
/* Look in the fake filesystem for this file */
if (xyzzy_file_exists(filename_chars)) {
fprintf(stderr, "TRACE %s exists in filesystem.dat!\n", filename_chars);
@@ -473,6 +477,8 @@ SCM_DEFINE (scm_sys_search_load_path, "%search-load-path", 1, 0, 0,
SCM exts = *scm_loc_load_extensions;
SCM_VALIDATE_STRING (1, filename);
+ fprintf(stderr, "TRACE %s: %d:\n", __FUNCTION__, __LINE__);
+
if (scm_ilength (path) < 0)
SCM_MISC_ERROR ("%load-path is not a proper list", SCM_EOL);
if (scm_ilength (exts) < 0)
@@ -495,6 +501,8 @@ SCM_DEFINE (scm_xyzzy_primitive_load_path, "primitive-load-path", 1, 0, 0,
char *filename_chars;
size_t filename_len;
+ fprintf(stderr, "TRACE %s: %d: %s\n", __FUNCTION__, __LINE__, filename_chars);
+
filename_chars = scm_to_locale_string (filename);
filename_len = strlen (filename_chars);
scm_dynwind_free (filename_chars);
@@ -512,6 +520,7 @@ SCM_DEFINE (scm_xyzzy_primitive_load_path, "primitive-load-path", 1, 0, 0,
SCM
scm_c_primitive_load_path (const char *filename)
{
+ fprintf(stderr, "TRACE %s: %d: %s\n", __FUNCTION__, __LINE__, filename);
return scm_xyzzy_primitive_load_path (scm_from_locale_string (filename));
}
@@ -554,7 +563,17 @@ scm_init_load ()
init_build_info ();
-#include "load.x"
+ /* cpp arguments: load.c -DHAVE_CONFIG_H -I.. -I.. -I.. -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -Wall -Wmissing-prototypes */
+ scm_c_define_gsubr (s_scm_xyzzy_primitive_load, 1, 0, 0, (SCM (*)()) scm_xyzzy_primitive_load); ;
+ scm_c_define_gsubr (s_scm_sys_package_data_dir, 0, 0, 0, (SCM (*)()) scm_sys_package_data_dir); ;
+ scm_c_define_gsubr (s_scm_sys_library_dir, 0, 0, 0, (SCM (*)()) scm_sys_library_dir); ;
+ scm_c_define_gsubr (s_scm_sys_site_dir, 0, 0, 0, (SCM (*)()) scm_sys_site_dir); ;
+ scm_c_define_gsubr (s_scm_parse_path, 1, 1, 0, (SCM (*)()) scm_parse_path); ;
+ scm_c_define_gsubr (s_scm_xyzzy_search_path, 2, 1, 0, (SCM (*)()) scm_xyzzy_search_path); ;
+ scm_c_define_gsubr (s_scm_sys_search_load_path, 1, 0, 0, (SCM (*)()) scm_sys_search_load_path); ;
+ scm_c_define_gsubr (s_scm_xyzzy_primitive_load_path, 1, 0, 0, (SCM (*)()) scm_xyzzy_primitive_load_path); ;
+
+ /* #include "load.x" */
}
/*