From 822199707119e5f7db2573f2b583245aaa71e8da Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Wed, 14 Dec 2011 07:46:38 +0000 Subject: [PATCH] move onelab to \0 char sep --- Common/onelab.h | 2 +- Fltk/onelabWindow.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Common/onelab.h b/Common/onelab.h index 75b0d71e97..73764d4069 100644 --- a/Common/onelab.h +++ b/Common/onelab.h @@ -104,7 +104,7 @@ namespace onelab{ return _attributes; } const std::set<std::string> &getClients() const { return _clients; } - static char charSep() { return '|' /* '\0' */; } + static char charSep() { return '\0'; } static double maxNumber() { return 1e200; } std::string sanitize(const std::string &in) const { diff --git a/Fltk/onelabWindow.cpp b/Fltk/onelabWindow.cpp index cf2f15337c..2c1213507a 100644 --- a/Fltk/onelabWindow.cpp +++ b/Fltk/onelabWindow.cpp @@ -699,7 +699,10 @@ static void onelab_remove_solver_cb(Fl_Widget *w, void *data) static void onelab_dump_cb(Fl_Widget *w, void *data) { - printf("ONELAB dump:\n%s\n", onelab::server::instance()->toChar().c_str()); + std::string db = onelab::server::instance()->toChar(); + for(unsigned int i = 0; i < db.size(); i++) + if(db[i] == onelab::parameter::charSep()) db[i] = '|'; + printf("ONELAB dump:\n%s\n", db.c_str()); } onelabWindow::onelabWindow(int deltaFontSize) -- GitLab