From 75c52385ecc1ca66caa2986cffe9105f9532895f Mon Sep 17 00:00:00 2001
From: Rob Savoye
Date: Mon, 29 Nov 2010 10:02:58 -0700
Subject: drop the rest of the crufty old ports code, string ports are great!

---
 gr-run-waveform/xyzzy-load.c |  2 --
 gr-run-waveform/xyzzy.cc     | 21 +--------------------
 gr-run-waveform/xyzzy.h      | 12 ------------
 3 files changed, 1 insertion(+), 34 deletions(-)

(limited to 'gr-run-waveform')

diff --git a/gr-run-waveform/xyzzy-load.c b/gr-run-waveform/xyzzy-load.c
index cf3a240a5..a8ce2812c 100644
--- a/gr-run-waveform/xyzzy-load.c
+++ b/gr-run-waveform/xyzzy-load.c
@@ -297,6 +297,4 @@ scm_xyzzy_init (void)
 {
     scm_c_define_gsubr ("xyzzy-search-path", 2, 1, 0, (SCM (*)()) scm_xyzzy_search_path);
     scm_c_define_gsubr ("make-gnuradio-port", 1, 0, 0, (SCM (*)()) scm_make_gnuradio);
-
-    xyzzy_make_read_only_port("ice-9/boot-9.scm");
 }
diff --git a/gr-run-waveform/xyzzy.cc b/gr-run-waveform/xyzzy.cc
index 890696ed7..903f7563c 100644
--- a/gr-run-waveform/xyzzy.cc
+++ b/gr-run-waveform/xyzzy.cc
@@ -40,7 +40,6 @@ using namespace std;
 typedef void* handle_t;
 
 XYZZY::XYZZY()
-    : _portbits(0)
 {
     // nothing to initialize
 }
@@ -127,17 +126,6 @@ XYZZY::file_exists(const std::string &filespec)
     return false;
 }
 
-// Return a C port that will read the file contents
-SCM
-XYZZY::make_read_only_port(const std::string &filespec)
-{
-    fprintf(stderr, "TRACE %s: %d\n", __FUNCTION__, __LINE__);
-    // _portbits = scm_make_port_type(const_cast<char *>(filespec.c_str()),
-    //                                xyzzy_fill_input, xyzzy_write);
-    // scm_set_port_flush (_portbits, xyzzy_flush);
-    // scm_set_port_close (_portbits, xyzzy_close);
-}
-
 string
 XYZZY::read_string(boost::uint8_t *entry, size_t length)
 {
@@ -211,7 +199,7 @@ static XYZZY datafile;
 SCM
 make_xyzzy (SCM binary_port)
 {
-    fprintf(stderr, "TRACE %s: %d, %s\n", __FUNCTION__, __LINE__, scm_to_locale_string(binary_port));
+    // fprintf(stderr, "TRACE %s: %d, %s\n", __FUNCTION__, __LINE__, scm_to_locale_string(binary_port));
     std::string &contents = datafile.get_contents(scm_to_locale_string(binary_port));
 
     SCM port = scm_open_input_string (scm_from_locale_string (contents.c_str()));
@@ -232,12 +220,5 @@ xyzzy_file_exists(char *filespec)
 {
     return datafile.file_exists(filespec);
 }
-
-// Return a C port that will read the file contents
-SCM
-xyzzy_make_read_only_port(char *filespec)
-{
-    return datafile.make_read_only_port(filespec);
-}
     
 } // end of extern C
diff --git a/gr-run-waveform/xyzzy.h b/gr-run-waveform/xyzzy.h
index 5d9b861b7..e01a9f513 100644
--- a/gr-run-waveform/xyzzy.h
+++ b/gr-run-waveform/xyzzy.h
@@ -89,9 +89,6 @@ public:
     // Does a file with name 'filename' exist in magic filesystem?
     bool file_exists(const std::string &filespec);
 
-    // Return a C port that will read the file contents
-    SCM make_read_only_port(const std::string &filespec);
-
     /// Parse a string data structure
     static std::string read_string(boost::uint8_t *entry, size_t length);
     static std::string read_string(struct string_entry &entry);
@@ -103,25 +100,16 @@ public:
     boost::shared_ptr<struct directory_entry> read_dir_entry(boost::uint8_t *header);
 
     std::string &get_contents(const std::string &filespec) { return _contents[filespec]; };
-
-    scm_t_bits getPortBits() { return _portbits; };
     
 private:
     std::string   _filespec;
     std::map<std::string, std::string> _contents;
-    scm_t_bits   _portbits;
 };
 
 // C linkage bindings for Guile
 extern "C" {
 #endif
 
-// These are the callbacks for thw guile ports
-int  xyzzy_fill_input (SCM port);
-void xyzzy_write (SCM port, const void *data, size_t size);
-void xyzzy_flush (SCM port);
-int  xyzzy_close (SCM port);
-
 void scm_xyzzy_init (void);
     
 // Initialize with the data file produced by gen-xyzzy.
-- 
cgit