summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-03-05 16:08:08 -0500
committerTom Rondeau <trondeau@vt.edu>2013-03-05 16:08:08 -0500
commite2452caaf2e7f5fb640cda92b87f49f8f4d18c86 (patch)
tree417ce934b251ad7a9a86b1725b865ce82f4641ec
parentb279da79d17ab8cd1bb011c5e6c0305c2a506462 (diff)
parentbf343e58bc5b4ef026bb4c8722312a6f123becf2 (diff)
Merge branch 'master' into next
Conflicts: gnuradio-core/src/lib/general/gr_prefs.cc
-rw-r--r--gnuradio-core/src/lib/general/gr_prefs.cc14
-rw-r--r--gnuradio-core/src/lib/general/gr_prefs.h22
-rw-r--r--gnuradio-core/src/lib/general/gr_prefs.i22
-rw-r--r--gr-blocks/lib/stream_pdu_base.cc4
-rw-r--r--gr-blocks/lib/tcp_connection.h1
-rw-r--r--gr-utils/python/modtool/modtool_newmod.py2
6 files changed, 35 insertions, 30 deletions
diff --git a/gnuradio-core/src/lib/general/gr_prefs.cc b/gnuradio-core/src/lib/general/gr_prefs.cc
index 1308949fa8..5d9544f112 100644
--- a/gnuradio-core/src/lib/general/gr_prefs.cc
+++ b/gnuradio-core/src/lib/general/gr_prefs.cc
@@ -132,14 +132,14 @@ gr_prefs::option_to_env(std::string section, std::string option)
}
bool
-gr_prefs::has_section(const std::string section)
+gr_prefs::has_section(const std::string &section)
{
size_t t = d_configs.find("[" + section + "]#");
return t != std::string::npos;
}
bool
-gr_prefs::has_option(const std::string section, const std::string option)
+gr_prefs::has_option(const std::string &section, const std::string &option)
{
if(option_to_env(section, option))
return true;
@@ -155,8 +155,8 @@ gr_prefs::has_option(const std::string section, const std::string option)
}
const std::string
-gr_prefs::get_string(const std::string section, const std::string option,
- const std::string default_val)
+gr_prefs::get_string(const std::string &section, const std::string &option,
+ const std::string &default_val)
{
char *env = option_to_env(section, option);
if(env)
@@ -179,7 +179,7 @@ gr_prefs::get_string(const std::string section, const std::string option,
}
bool
-gr_prefs::get_bool(const std::string section, const std::string option, bool default_val)
+gr_prefs::get_bool(const std::string &section, const std::string &option, bool default_val)
{
if(has_option(section, option)) {
std::string str = get_string(section, option, "");
@@ -200,7 +200,7 @@ gr_prefs::get_bool(const std::string section, const std::string option, bool def
}
long
-gr_prefs::get_long(const std::string section, const std::string option, long default_val)
+gr_prefs::get_long(const std::string &section, const std::string &option, long default_val)
{
if(has_option(section, option)) {
std::string str = get_string(section, option, "");
@@ -218,7 +218,7 @@ gr_prefs::get_long(const std::string section, const std::string option, long def
}
double
-gr_prefs::get_double(const std::string section, const std::string option, double default_val)
+gr_prefs::get_double(const std::string &section, const std::string &option, double default_val)
{
if(has_option(section, option)) {
std::string str = get_string(section, option, "");
diff --git a/gnuradio-core/src/lib/general/gr_prefs.h b/gnuradio-core/src/lib/general/gr_prefs.h
index d9b0c791ba..68957faab9 100644
--- a/gnuradio-core/src/lib/general/gr_prefs.h
+++ b/gnuradio-core/src/lib/general/gr_prefs.h
@@ -46,39 +46,39 @@ public:
/*!
* \brief Does \p section exist?
*/
- virtual bool has_section(const std::string section);
+ virtual bool has_section(const std::string &section);
/*!
* \brief Does \p option exist?
*/
- virtual bool has_option(const std::string section, const std::string option);
+ virtual bool has_option(const std::string &section, const std::string &option);
/*!
* \brief If option exists return associated value; else default_val.
*/
- virtual const std::string get_string(const std::string section,
- const std::string option,
- const std::string default_val);
+ virtual const std::string get_string(const std::string &section,
+ const std::string &option,
+ const std::string &default_val);
/*!
* \brief If option exists and value can be converted to bool, return it; else default_val.
*/
- virtual bool get_bool(const std::string section,
- const std::string option,
+ virtual bool get_bool(const std::string &section,
+ const std::string &option,
bool default_val);
/*!
* \brief If option exists and value can be converted to long, return it; else default_val.
*/
- virtual long get_long(const std::string section,
- const std::string option,
+ virtual long get_long(const std::string &section,
+ const std::string &option,
long default_val);
/*!
* \brief If option exists and value can be converted to double, return it; else default_val.
*/
- virtual double get_double(const std::string section,
- const std::string option,
+ virtual double get_double(const std::string &section,
+ const std::string &option,
double default_val);
protected:
diff --git a/gnuradio-core/src/lib/general/gr_prefs.i b/gnuradio-core/src/lib/general/gr_prefs.i
index cfb4cdb4e3..b21d47f3b0 100644
--- a/gnuradio-core/src/lib/general/gr_prefs.i
+++ b/gnuradio-core/src/lib/general/gr_prefs.i
@@ -31,39 +31,39 @@ public:
/*!
* \brief Does \p section exist?
*/
- virtual bool has_section(const std::string section);
+ virtual bool has_section(const std::string &section);
/*!
* \brief Does \p option exist?
*/
- virtual bool has_option(const std::string section, const std::string option);
+ virtual bool has_option(const std::string &section, const std::string &option);
/*!
* \brief If option exists return associated value; else default_val.
*/
- virtual const std::string get_string(const std::string section,
- const std::string option,
- const std::string default_val);
+ virtual const std::string get_string(const std::string &section,
+ const std::string &option,
+ const std::string &default_val);
/*!
* \brief If option exists and value can be converted to bool, return it; else default_val.
*/
- virtual bool get_bool(const std::string section,
- const std::string option,
+ virtual bool get_bool(const std::string &section,
+ const std::string &option,
bool default_val);
/*!
* \brief If option exists and value can be converted to long, return it; else default_val.
*/
- virtual long get_long(const std::string section,
- const std::string option,
+ virtual long get_long(const std::string &section,
+ const std::string &option,
long default_val);
/*!
* \brief If option exists and value can be converted to double, return it; else default_val.
*/
- virtual double get_double(const std::string section,
- const std::string option,
+ virtual double get_double(const std::string &section,
+ const std::string &option,
double default_val);
};
diff --git a/gr-blocks/lib/stream_pdu_base.cc b/gr-blocks/lib/stream_pdu_base.cc
index ed3dfcde10..0c4e7e0863 100644
--- a/gr-blocks/lib/stream_pdu_base.cc
+++ b/gr-blocks/lib/stream_pdu_base.cc
@@ -28,6 +28,10 @@
#include <io.h>
#endif
+#ifdef HAVE_WINDOWS_H
+#include <winsock2.h>
+#endif
+
#include <blocks/pdu.h>
#include <gr_basic_block.h>
#include "stream_pdu_base.h"
diff --git a/gr-blocks/lib/tcp_connection.h b/gr-blocks/lib/tcp_connection.h
index 94755e847a..ba57de0783 100644
--- a/gr-blocks/lib/tcp_connection.h
+++ b/gr-blocks/lib/tcp_connection.h
@@ -23,6 +23,7 @@
#ifndef INCLUDED_TCP_CONNECTION_H
#define INCLUDED_TCP_CONNECTION_H
+#include <boost/array.hpp>
#include <boost/asio.hpp>
#include <gruel/pmt.h>
diff --git a/gr-utils/python/modtool/modtool_newmod.py b/gr-utils/python/modtool/modtool_newmod.py
index 102d83d8df..0613d5fbe1 100644
--- a/gr-utils/python/modtool/modtool_newmod.py
+++ b/gr-utils/python/modtool/modtool_newmod.py
@@ -66,7 +66,7 @@ class ModToolNewModule(ModTool):
print 'The given directory exists.'
exit(2)
if options.srcdir is None:
- options.srcdir = '/usr/local/share/gnuradio/modtool/gr-newmod',
+ options.srcdir = '/usr/local/share/gnuradio/modtool/gr-newmod'
self._srcdir = gr.prefs().get_string('modtool', 'newmod_path', options.srcdir)
if not os.path.isdir(self._srcdir):
print 'Error: Could not find gr-newmod source dir.'