X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Fsettings.cc;fp=src%2Fmoof%2Fsettings.cc;h=78f72939d2a58faa9aada73ae7014232e7f5a9a9;hp=11dfe31b7d9b4478af16a457cb1e42863602e0c0;hb=574af38ed616d1adfa5e6ce35f67cda1f707f89d;hpb=6c9943707d4f33035830eba0587a61a34eaecbc2 diff --git a/src/moof/settings.cc b/src/moof/settings.cc index 11dfe31..78f7293 100644 --- a/src/moof/settings.cc +++ b/src/moof/settings.cc @@ -1,13 +1,11 @@ -/*] Copyright (c) 2009-2010, Charles McGarvey [************************** +/*] Copyright (c) 2009-2011, Charles McGarvey [***************************** **] All rights reserved. * -* vi:ts=4 sw=4 tw=75 -* * Distributable under the terms and conditions of the 2-clause BSD license; * see the file COPYING for a complete text of the license. * -**************************************************************************/ +*****************************************************************************/ #include @@ -32,7 +30,6 @@ settings::~settings() save(); } - void settings::parse_args(int argc, char* argv[]) { for (int i = 1; i < argc; ++i) @@ -47,12 +44,10 @@ void settings::parse_args(int argc, char* argv[]) } } - void settings::load_files(const std::string& path) { std::vector paths; boost::split(paths, path, boost::is_any_of(":")); - load_files(paths); } @@ -69,11 +64,10 @@ void settings::load_files(const std::vector& path) boost::replace_all(*it, "$HOME", home); //logDebug("Copying global settings..."); - //mUserFile = *it; + //userfile_ = *it; //mGlobals.push_copy(); //script_.set("globals", script::registry_index); } - if (script_.do_file(*it) != script::success) { std::string str; @@ -84,16 +78,14 @@ void settings::load_files(const std::vector& path) } } - void settings::clear() { script_.reset(); } - void settings::save_as(const std::string& path) { - mUserFile = path; + userfile_ = path; save(); }