summaryrefslogtreecommitdiffstats
path: root/buildrun.cxx
diff options
context:
space:
mode:
authorfche <fche>2006-11-08 17:51:32 +0000
committerfche <fche>2006-11-08 17:51:32 +0000
commit72dbc9153036800cefdb5f2970666acc82cdb732 (patch)
treec9cb188d1c502a37a9089909e92d1194694a7792 /buildrun.cxx
parentf8399ba29877a2529d4f841f775382345095e2d3 (diff)
downloadsystemtap-steved-72dbc9153036800cefdb5f2970666acc82cdb732.tar.gz
systemtap-steved-72dbc9153036800cefdb5f2970666acc82cdb732.tar.xz
systemtap-steved-72dbc9153036800cefdb5f2970666acc82cdb732.zip
2006-11-08 Frank Ch. Eigler <fche@elastic.org>
* util.h (lex_cast_qstring): Move def'n here. Also quote \. (stringify, lex_cast, lex_cast_hex): Move defn here. * buildrun.cxx, elaborate.cxx, main.cxx, staptree.cxx: Adapt.
Diffstat (limited to 'buildrun.cxx')
-rw-r--r--buildrun.cxx33
1 files changed, 1 insertions, 32 deletions
diff --git a/buildrun.cxx b/buildrun.cxx
index 969ba352..3673a9b0 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -9,6 +9,7 @@
#include "config.h"
#include "buildrun.h"
#include "session.h"
+#include "util.h"
#include <fstream>
#include <sstream>
@@ -28,38 +29,6 @@ extern "C" {
using namespace std;
-// return as quoted string, with at least '"' backslash-escaped
-template <typename IN> inline string
-lex_cast_qstring(IN const & in)
-{
- stringstream ss;
- string out, out2;
- if (!(ss << in))
- throw runtime_error("bad lexical cast");
- out = ss.str();
- out2 += '"';
- for (unsigned i=0; i<out.length(); i++)
- {
- if (out[i] == '"') // XXX others?
- out2 += '\\';
- out2 += out[i];
- }
- out2 += '"';
- return out2;
-}
-
-
-template <typename T>
-static string
-stringify(T t)
-{
- ostringstream s;
- s << t;
- return s.str ();
-}
-
-
-
int
compile_pass (systemtap_session& s)
{