From f4f598d3aeca980c8519e6c8ae90a680d48f7617 Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Sat, 27 Nov 2010 15:32:46 -0700 Subject: don't use C++ data types for return or args, this is a C function --- gr-run-waveform/xyzzy.cc | 11 ++++++----- gr-run-waveform/xyzzy.h | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 11 deletions(-) (limited to 'gr-run-waveform') diff --git a/gr-run-waveform/xyzzy.cc b/gr-run-waveform/xyzzy.cc index 999282359..b5c56d463 100644 --- a/gr-run-waveform/xyzzy.cc +++ b/gr-run-waveform/xyzzy.cc @@ -260,22 +260,23 @@ xyzzy_fill_input (SCM port) } // Initialize with the data file produced by gen-xyzzy. -bool -xyzzy_init(const std::string &filespec) +int +xyzzy_init(char *filespec) { return datafile.init(filespec); } // Does a file with name 'filename' exist in magic filesystem? -bool -xyzzy_file_exists(const std::string &filespec) +int +xyzzy_file_exists(char *filespec) { + // string filename(); return datafile.file_exists(filespec); } // Return a C port that will read the file contents SCM -xyzzy_make_read_only_port(const std::string &filespec) +xyzzy_make_read_only_port(char *filespec) { return datafile.make_read_only_port(filespec); } diff --git a/gr-run-waveform/xyzzy.h b/gr-run-waveform/xyzzy.h index 2306eabf4..eb29f137c 100644 --- a/gr-run-waveform/xyzzy.h +++ b/gr-run-waveform/xyzzy.h @@ -23,6 +23,11 @@ #ifndef _XYZZY_H_ #define _XYZZY_H_ 1 + +#include + +#ifdef __cplusplus + #include #include #include @@ -34,8 +39,6 @@ #include #include -#include - using namespace std; // - Special case filenames that start with /-xyzzy-/... and search for @@ -108,7 +111,8 @@ private: // 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); @@ -116,14 +120,16 @@ void xyzzy_flush (SCM port); int xyzzy_close (SCM port); // Initialize with the data file produced by gen-xyzzy. -bool xyzzy_init(const std::string &filespec); +int xyzzy_init(char *filename); // Does a file with name 'filename' exist in magic filesystem? -bool xyzzy_file_exists(const std::string &filespec); +int xyzzy_file_exists(char *filename); // Return a C port that will read the file contents -SCM xyzzy_make_read_only_port(const std::string &filespec); +SCM xyzzy_make_read_only_port(char *filename); +#ifdef __cplusplus } // end of extern C +#endif #endif // _XYZZY_H_ 1 -- cgit