diff --git a/.gitignore b/.gitignore index 33130bf89..afeba9a14 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ config.status config.sub configure configure.in +configure.ac depcomp install-sh ltmain.sh diff --git a/agent-any/src/AnyAgent.cc b/agent-any/src/AnyAgent.cc index 091d07b99..2532000c2 100644 --- a/agent-any/src/AnyAgent.cc +++ b/agent-any/src/AnyAgent.cc @@ -124,7 +124,7 @@ YCPValue AnyAgent::otherCommand (const YCPTerm & term) { const string sym = term->name (); - + y2debug( "Received term in otherCommand: %s", term->toString().c_str() ); if (sym == "Description" && term->size () >= 4) diff --git a/agent-any/src/AnyAgentComplex.cc b/agent-any/src/AnyAgentComplex.cc index a74541585..f527d0e01 100644 --- a/agent-any/src/AnyAgentComplex.cc +++ b/agent-any/src/AnyAgentComplex.cc @@ -409,7 +409,7 @@ AnyAgent::unparseTuple (const YCPList & syntax, const YCPValue & value) if (element->valuetype () == YT_TERM) { YCPTerm term = element->asTerm (); - if (!(term.isNull ()) && + if (!(term.isNull ()) && ((term->name () == "Skip") || (term->name () == "Fillup"))) continue; diff --git a/agent-dummy/src/DummyAgent.cc b/agent-dummy/src/DummyAgent.cc index d417d680e..b2c10303d 100644 --- a/agent-dummy/src/DummyAgent.cc +++ b/agent-dummy/src/DummyAgent.cc @@ -106,7 +106,7 @@ DummyAgent::Execute (const YCPPath& path, const YCPValue& value, { v = checkPath(path, defaultMap, deflt); } - + ycpdebug("%sExecute %s", DUMMY_LOG_STRING, (path->toString() + " " + value->toString() + (arg.isNull()?"":(" "+arg->toString())) + diff --git a/agent-ini/src/IniAgent.cc b/agent-ini/src/IniAgent.cc index 66d2c7e34..d3b846cd7 100644 --- a/agent-ini/src/IniAgent.cc +++ b/agent-ini/src/IniAgent.cc @@ -147,7 +147,7 @@ YCPBoolean IniAgent::Write(const YCPPath &path, const YCPValue& value, const YCP YCPValue IniAgent::otherCommand(const YCPTerm& term) { string sym = term->name(); - if (sym == "SysConfigFile") + if (sym == "SysConfigFile") { if (term->size () != 1 || !term->value (0)->isString ()) { @@ -158,7 +158,7 @@ YCPValue IniAgent::otherCommand(const YCPTerm& term) YCPTerm tt = generateSysConfigTemplate (file_name); return otherCommand (tt); } - if (sym == "IniAgent") + if (sym == "IniAgent") { if (2 == term->size()) // fixme: we will provide some default actions if 2nd arg is missing in future { diff --git a/agent-ini/src/IniFile.cc b/agent-ini/src/IniFile.cc index 23bbec669..0b655d6c4 100644 --- a/agent-ini/src/IniFile.cc +++ b/agent-ini/src/IniFile.cc @@ -121,7 +121,7 @@ void IniSection::initValue (const string&key,const string&val,const string&comme IniSection& IniSection::initSection (const string&name,const string&comment,int rb, int wb) { string k = ip->changeCase (name); - + IniSection s (ip); IniSectionIdxIterator sxi; if (!ip->repeatNames () && (sxi = isections.find (k)) != isections.end ()) @@ -239,7 +239,7 @@ void IniSection::Dump () for (; sxi != sxe; ++sxi) { - printf ("{%s @%p}\n", sxi->first.c_str (), &*sxi->second); + printf ("{%s @%p}\n", sxi->first.c_str (), &*sxi->second); } printf ("{Values}\n"); @@ -249,7 +249,7 @@ void IniSection::Dump () for (; exi != exe; ++exi) { - printf ("{%s @%p}\n", exi->first.c_str (), &*exi->second); + printf ("{%s @%p}\n", exi->first.c_str (), &*exi->second); } printf("\n", name.c_str()); @@ -277,7 +277,7 @@ void IniSection::reindex () string k = ip->changeCase (ci->s ().getName ()); isections.insert (IniSectionIndex::value_type (k, ci)); } - } + } } int IniSection::getMyValue (const YCPPath &p, YCPValue &out, int what, int depth) @@ -758,7 +758,7 @@ int IniSection::setAllDoIt (const YCPMap &in) if (mv->isVoid ()) { string del_name; - int del_rb; + int del_rb; if (!getMapString (mitem, "name", del_name) || !getMapInteger (mitem, "file", del_rb)) { diff --git a/agent-ini/src/IniParser.cc b/agent-ini/src/IniParser.cc index 4001272a1..85833411a 100644 --- a/agent-ini/src/IniParser.cc +++ b/agent-ini/src/IniParser.cc @@ -118,7 +118,7 @@ int getBeginEndType (const YCPMap&m) return -1; if (!isYCPStringPair (m->value (YCPString ("begin")))) return -1; - + if (m->value(YCPString("end")).isNull()) return 1; if (!isYCPStringPair (m->value (YCPString ("end")))) @@ -142,7 +142,7 @@ int getParamsType (const YCPMap&m) return -1; if (!isYCPStringPair (m->value (YCPString ("match")))) return -1; - + if (m->value(YCPString("multiline")).isNull()) return 1; if (!isYCPStringPair (m->value (YCPString ("multiline")))) @@ -193,7 +193,7 @@ int IniParser::initMachine (const YCPMap&scr) continue; } string sv = v->asList()->value(i)->asString()->value(); -#define COMPARE_OPTION(X) if (sv == #X) X = true; else +#define COMPARE_OPTION(X) if (sv == #X) X = true; else COMPARE_OPTION (ignore_case_regexps) COMPARE_OPTION (ignore_case) COMPARE_OPTION (prefer_uppercase) @@ -232,8 +232,8 @@ int IniParser::initMachine (const YCPMap&scr) for (int i = 0; iasList()->value(i); - if (ival->isList() && - 2 == ival->asList()->size() && + if (ival->isList() && + 2 == ival->asList()->size() && ival->asList()->value(0)->isString() && ival->asList()->value(1)->isString()) { @@ -624,7 +624,7 @@ int IniParser::parse_helper(IniSection&ini) { RegexMatch m (params[matched_by].end, line); if (m) - { + { // it is the end of broken line state = 0; val = val + (join_multiline ? " " : "\n") + m[1]; @@ -639,7 +639,7 @@ int IniParser::parse_helper(IniSection&ini) ini.initValue(key, shell_quoted_value ? YaST::agent_ini::unquote(val) : val, comment, matched_by); } } - else + else { open_sections.front()->initValue(key, shell_quoted_value ? YaST::agent_ini::unquote(val) : val, comment, matched_by); } @@ -766,7 +766,7 @@ int IniParser::parse_helper(IniSection&ini) complain = true; } } - + if (name_to_close.empty ()) { // there was no name or we did not find the specified one for (it = b; it != e; ++it) { @@ -800,7 +800,7 @@ int IniParser::parse_helper(IniSection&ini) val = m[2]; line = m.rest; break; - } + } } if (i != params.size ()) { @@ -960,7 +960,7 @@ int IniParser::write() if (ci->t () == SECTION) { IniSection&s = ci->s (); - int wb = s.getRewriteBy (); // bug #19066 + int wb = s.getRewriteBy (); // bug #19066 string filename = getFileName (s.getName (), wb); // This is the only place where we unmark a @@ -1067,7 +1067,7 @@ int IniParser::write_helper(IniSection&ini, ofstream&of, int depth) out_buffer = format (sections[readby].begin.out.c_str (), ini.getName()); of << indent << out_buffer << "\n"; } - + IniIterator ci = ini.getContainerBegin (), ce = ini.getContainerEnd (); @@ -1084,7 +1084,7 @@ int IniParser::write_helper(IniSection&ini, ofstream&of, int depth) IniEntry&e = ci->e (); if (e.getComment ()[0]) of << e.getComment(); - if (e.getReadBy()>=0 && e.getReadBy() < (int)params.size ()) + if (e.getReadBy()>=0 && e.getReadBy() < (int)params.size ()) { const string val = shell_quoted_value ? YaST::agent_ini::quote(e.getValue()) : e.getValue(); // bnc#492859, a fixed buffer is too small @@ -1145,7 +1145,7 @@ string IniParser::changeCase (const string&str) const string::iterator it = tmp.begin (); if (it != tmp.end ()) *it = toupper (*it); - } + } } return tmp; } diff --git a/agent-ini/src/Y2IniAgentComponent.cc b/agent-ini/src/Y2IniAgentComponent.cc index 8ec329dc0..42beb6efd 100644 --- a/agent-ini/src/Y2IniAgentComponent.cc +++ b/agent-ini/src/Y2IniAgentComponent.cc @@ -50,7 +50,7 @@ YCPValue Y2IniAgentComponent::evaluate(const YCPValue& value) agent = new IniAgent(); interpreter = new SCRInterpreter(agent); } - + return interpreter->evaluate(value); } diff --git a/agent-ini/src/quotes.cc b/agent-ini/src/quotes.cc index 4fe2af209..61190590e 100644 --- a/agent-ini/src/quotes.cc +++ b/agent-ini/src/quotes.cc @@ -125,7 +125,7 @@ string parse_squoted_string( string::const_iterator & sit, const string::const_i * "string" -> string * * preconditions: - * - starts with ['"] + * - starts with ['"] * - as a consequence: size > 0 */ string parse_quoted_string( string::const_iterator & sit, const string::const_iterator & last) @@ -145,10 +145,10 @@ string unquote( const string & quoted_string) { while( sit != end) { - while( sit != end && - *sit != '"' && + while( sit != end && + *sit != '"' && *sit != '\'') - { + { if( *sit == '\\') { if( ++sit == end) diff --git a/agent-ini/testsuite/runag_ini.cc b/agent-ini/testsuite/runag_ini.cc index 85ee9cb4f..05bd6134e 100644 --- a/agent-ini/testsuite/runag_ini.cc +++ b/agent-ini/testsuite/runag_ini.cc @@ -27,7 +27,7 @@ main (int argc, char *argv[]) scrconf.replace (p, 4, ".scr"); } - SCRAgent *agent = new ScriptingAgent (scrconf); + SCRAgent *agent = new ScriptingAgent ("/", scrconf); if (!agent) { fprintf (stderr, "Failed to create Agent\n"); diff --git a/agent-modules/src/ModulesAgent.cc b/agent-modules/src/ModulesAgent.cc index 4961625ee..d5d1ca623 100644 --- a/agent-modules/src/ModulesAgent.cc +++ b/agent-modules/src/ModulesAgent.cc @@ -60,12 +60,12 @@ ModulesAgent::~ModulesAgent() { template YCPList map2list(const T &m) { YCPList list; typename T::const_iterator it = m.begin (); - + for (; it != m.end (); ++it) /* Preserve listing of the final comment */ if(it->first != "YaST2_final_modules_conf_comment") list->add(YCPString (it->first)); - + return list; } @@ -75,10 +75,10 @@ template YCPList map2list(const T &m) { template YCPMap map2ycpmap(const T &m) { YCPMap ret_map; typename T::const_iterator it = m.begin (); - + for (; it != m.end(); ++it) ret_map->add (YCPString (it->first), YCPString (it->second)); - + return ret_map; } @@ -96,7 +96,7 @@ ModuleEntry::EntryArg ycpmap2map (const YCPMap &m) { y2error("Map element must be string!"); return ModuleEntry::EntryArg(); } - + return ret_map; } @@ -141,10 +141,10 @@ YCPList ModulesAgent::Dir(const YCPPath& path) { * Read */ YCPValue ModulesAgent::Read(const YCPPath &path, const YCPValue& arg, const YCPValue& optarg) { - + if (modules_conf == NULL) Y2_RETURN_VOID("Can't execute Read before being mounted."); - + y2debug("Read(%s)", path->toString().c_str()); switch (path->length ()) { @@ -220,7 +220,7 @@ YCPValue ModulesAgent::Read(const YCPPath &path, const YCPValue& arg, const YCPV return YCPString (modules_conf->getOption(PC(1), PC(2))); } - + Y2_RETURN_VOID("Wrong path '%s' in Read().", path->toString().c_str()); } @@ -248,7 +248,7 @@ YCPBoolean ModulesAgent::Write(const YCPPath &path, const YCPValue& value, const return YCPBoolean (modules_conf->setOptions(VAL2STR(arg), ycpmap2map (value->asMap ()), ModuleEntry::SET)); - else + else Y2_RETURN_YCP_FALSE("Argument for Write () not map."); } return YCPBoolean (modules_conf->setArgument (PC(0), VAL2STR(arg), @@ -306,7 +306,7 @@ YCPBoolean ModulesAgent::Write(const YCPPath &path, const YCPValue& value, const if (value->isMap ()) return YCPBoolean (modules_conf->setOptions(PC(1), ycpmap2map (value->asMap ()), ModuleEntry::SET)); - else + else Y2_RETURN_YCP_FALSE("Argument for Write(.options) not map: %s.", value->toString().c_str()); } @@ -352,7 +352,7 @@ YCPValue ModulesAgent::otherCommand(const YCPTerm& term) { delete modules_conf; modules_conf = new ModulesConf(s->value()); return YCPVoid(); - } else + } else Y2_RETURN_VOID("Bad first arg of ModulesConf(): is not a string."); } diff --git a/agent-process/src/ProcessAgent.cc b/agent-process/src/ProcessAgent.cc index 1722bd9c1..64ee91796 100644 --- a/agent-process/src/ProcessAgent.cc +++ b/agent-process/src/ProcessAgent.cc @@ -2,17 +2,17 @@ * * ------------------------------------------------------------------------------ * Copyright (c) 2008 Novell, Inc. All Rights Reserved. - * - * + * + * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along with * this program; if not, contact Novell, Inc. * @@ -424,7 +424,7 @@ YCPValue ProcessAgent::Execute(const YCPPath &path, // store the path argv[0] = commandline.c_str(); - + // store arguments int index = 0; for (; index < args->size(); index++) @@ -532,7 +532,7 @@ YCPValue ProcessAgent::Execute(const YCPPath &path, * @builtin Execute(.process.close, integer id) -> integer * Close input/output of the process and wait until the process ends * - * Returns Exit value of the process + * Returns Exit value of the process * * @example Execute(.process.close, 12345) -> 0 */ diff --git a/agent-resolver/src/ResolverAgent.cc b/agent-resolver/src/ResolverAgent.cc index 33e47144f..ebd6b8535 100644 --- a/agent-resolver/src/ResolverAgent.cc +++ b/agent-resolver/src/ResolverAgent.cc @@ -173,7 +173,7 @@ static int fillCache (const char *filename) if (strncmp (lbuf, "### END INFO", 12) == 0) { if (last_key) // one more key to process - { + { localCache->add (YCPString (last_key), YCPString ((info_buf.substr (0, info_buf.length () - 1)).c_str ())); } if (!processing_info) y2warning ("End of info without beggining!"); diff --git a/agent-system/src/ShellCommand.cc b/agent-system/src/ShellCommand.cc index a35bf80a6..448e1bb3a 100644 --- a/agent-system/src/ShellCommand.cc +++ b/agent-system/src/ShellCommand.cc @@ -148,7 +148,7 @@ shellcommand (const string &command, const string &tempdir) for ( int i = getdtablesize() - 1; i > 2; --i ) { close( i ); } - + ret = system (command.c_str ()); if (WIFEXITED (ret)) ret = WEXITSTATUS (ret); diff --git a/agent-system/src/SystemAgent.cc b/agent-system/src/SystemAgent.cc index d34b2419a..8fcde8602 100644 --- a/agent-system/src/SystemAgent.cc +++ b/agent-system/src/SystemAgent.cc @@ -506,11 +506,11 @@ SystemAgent::Read (const YCPPath& path, const YCPValue& arg, const YCPValue&) parser.setBuffered(); // Read from file. Buffering is always possible here YCodePtr p = parser.parse(); close(fd); - + if (!p) { return YCPError ("Parsing file '" + filename + "' failed"); } - + YCPValue contents = YCPNull (); if (p->isBlock ()) { diff --git a/base/src/y2base.cc b/base/src/y2base.cc index 444d02a67..b33f6aa48 100644 --- a/base/src/y2base.cc +++ b/base/src/y2base.cc @@ -1,14 +1,14 @@ /*---------------------------------------------------------------------\ -| | -| __ __ ____ _____ ____ | -| \ \ / /_ _/ ___|_ _|___ \ | -| \ V / _` \___ \ | | __) | | -| | | (_| |___) || | / __/ | -| |_|\__,_|____/ |_| |_____| | -| | -| core system | -| (C) SuSE GmbH | -\----------------------------------------------------------------------/ +| | +| __ __ ____ _____ ____ | +| \ \ / /_ _/ ___|_ _|___ \ | +| \ V / _` \___ \ | | __) | | +| | | (_| |___) || | / __/ | +| |_|\__,_|____/ |_| |_____| | +| | +| core system | +| (C) SuSE GmbH | +\----------------------------------------------------------------------/ File: y2base.cc diff --git a/base/tools/ycpc/ycpc.cc b/base/tools/ycpc/ycpc.cc index e8a1af1ed..4e1494349 100644 --- a/base/tools/ycpc/ycpc.cc +++ b/base/tools/ycpc/ycpc.cc @@ -866,9 +866,9 @@ parsefile (const char *infname) YCodePtr c = NULL; c = parser->parse (); - + int ln = parser->scanner ()->lineNumber (); - + if (! parser->atEOF () && parser->scanner ()->yylex () != END_OF_FILE) { YaST::ee.setFilename(parser->scanner()->filename()); @@ -1372,7 +1372,7 @@ int main(int argc, char *argv[]) } continue; } - + ret = compilefile (argv[i], 0); if (ret == 1) @@ -1458,7 +1458,7 @@ int main(int argc, char *argv[]) if (compile) { errno = 0; - + ret = compilefile (depit->path().c_str(), NULL); if (ret == 1) { diff --git a/debugger/Debugger.cc b/debugger/Debugger.cc index 10f95d2d0..794eb65e1 100644 --- a/debugger/Debugger.cc +++ b/debugger/Debugger.cc @@ -41,7 +41,7 @@ #define ADDRESS "/tmp/yast.socket" #define PORT 16384 -Debugger::Debugger () : +Debugger::Debugger () : m_socket (-1), m_descriptor (NULL), m_outputstash (""), @@ -52,10 +52,10 @@ Debugger::Debugger () : Debugger::~Debugger () { // close the controll socket - if (m_socket) + if (m_socket) { close (m_socket); - if (m_remote) + if (m_remote) unlink (ADDRESS); } m_socket = -1; @@ -184,7 +184,7 @@ void Debugger::setBreakpoint (std::list &args) else { YFunctionPtr fnc = ((YFunctionPtr)((YSymbolEntryPtr)sentry)->code()); - + // set the breakpoint wrapper if (fnc->definition ()->kind () == YCode::yiBreakpoint) { @@ -192,9 +192,9 @@ void Debugger::setBreakpoint (std::list &args) sendOutput ("Breakpoint enabled"); return; } - + YBreakpointPtr bp = new YBreakpoint (fnc->definition(), args.front () ); - + fnc->setDefinition (bp); std::string result = "Set breakpoint to " + sentry->toString(); sendOutput (result); @@ -215,7 +215,7 @@ void Debugger::removeBreakpoint (std::list &args) else { YFunctionPtr fnc = ((YFunctionPtr)((YSymbolEntryPtr)sentry)->code()); - + if (fnc->definition ()->kind () == YCode::yiBreakpoint) { // disable the breakpoint wrapper @@ -237,11 +237,11 @@ void Debugger::generateBacktrace () YaST::ExecutionEnvironment::CallStack::const_reverse_iterator it = stack.rbegin(); while (it != stack.rend()) { - result = result + result = result + "\n" - + ( (*it)->filename ) - + ":" - + stringutil::numstring((*it)->linenumber) + + ( (*it)->filename ) + + ":" + + stringutil::numstring((*it)->linenumber) + ": " + ((*it)->function->entry()->toString()); @@ -285,7 +285,7 @@ SymbolEntryPtr Debugger::findSymbol (std::string arg) if (c->name () == "wfm") { Y2Namespace* ns = c->import (ns_name.c_str()); - if (ns) + if (ns) // this returns NULL in case the name was not found return ns->lookupSymbol (name.c_str()); } @@ -293,15 +293,15 @@ SymbolEntryPtr Debugger::findSymbol (std::string arg) return NULL; // this is not YCP symbol } } - else + else { // try parameters YaST::ExecutionEnvironment::CallStack stack = YaST::ee.callstack(); - + if( stack.size() > 0 ) { YaST::ExecutionEnvironment::CallStack::const_reverse_iterator it = stack.rbegin(); - + YSymbolEntryPtr ysentry = (YSymbolEntryPtr)((*it)->function->entry()); // this returns NULL in case the name was not found @@ -310,7 +310,7 @@ SymbolEntryPtr Debugger::findSymbol (std::string arg) if (sentry) return sentry; } - + // try block stack for( std::list::iterator blk = m_blockstack.begin(); blk != m_blockstack.end (); blk++) { @@ -349,7 +349,7 @@ void Debugger::setVariable (std::string assign) // first, split by '=' std::vector words; stringutil::split(assign, words, "="); - + if( words.size() != 2 ) { sendOutput ("Set variable format is ="); @@ -392,16 +392,16 @@ bool Debugger::processInput (command_t &command, std::list &argumen // FIXME: use flex if (m_descriptor == NULL) return false; - + // First, send the current context YStatementPtr statement = YaST::ee.statement(); - + after_internal: if (statement) sendOutput(YaST::ee.filename() + ":" + stringutil::numstring(YaST::ee.linenumber()) + " >>> " + statement->toString()); else sendOutput ("no code"); - + // clean up for next command s = ""; args.clear(); @@ -414,12 +414,12 @@ bool Debugger::processInput (command_t &command, std::list &argumen } s += c; } - + if (s.empty ()) { y2error ("Communication with debugging UI closed"); close (m_socket); - + if (m_remote) unlink (ADDRESS); @@ -427,7 +427,7 @@ bool Debugger::processInput (command_t &command, std::list &argumen m_descriptor = NULL; return false; } - + command = c_unknown; // FIXME: I said flex! if (s == "c") @@ -466,13 +466,13 @@ bool Debugger::processInput (command_t &command, std::list &argumen command = Debugger::c_print; args.push_back(s.substr(2)); } - + if (command == Debugger::c_print) { printVariable (args.front () ); goto after_internal; } - + if (command == Debugger::c_breakpoint) { setBreakpoint (args); @@ -490,13 +490,13 @@ bool Debugger::processInput (command_t &command, std::list &argumen generateBacktrace (); goto after_internal; } - + if (command == Debugger::c_setvalue) { setVariable (args.front () ); goto after_internal; } - + arguments = args; m_last_command = command; @@ -511,7 +511,7 @@ bool Debugger::sendOutput( std::string output ) output = " "; output = output + "\n\n"; send (m_ns, output.c_str (), strlen( output.c_str ()), 0); - + // clean up the output stash, it's sent already m_outputstash = ""; return true; @@ -547,10 +547,10 @@ void Debugger::pushBlock (Y2Namespace* block, bool tracing) stackitem_t si; si.ns = block; si.tracing = tracing; - + m_blockstack.push_front (si); } - + void Debugger::popBlock () { m_blockstack.pop_front (); diff --git a/libscr/src/Makefile.am b/libscr/src/Makefile.am index e9464568e..e3ce895ca 100644 --- a/libscr/src/Makefile.am +++ b/libscr/src/Makefile.am @@ -17,4 +17,4 @@ INCLUDES = \ -I$(srcdir)/include \ ${Y2UTIL_CFLAGS} -libscr_la_LDFLAGS = -version-info 2:0 +libscr_la_LDFLAGS = -version-info 3:0 diff --git a/libscr/src/SCR.cc b/libscr/src/SCR.cc index 95cf285dd..a66917165 100644 --- a/libscr/src/SCR.cc +++ b/libscr/src/SCR.cc @@ -33,7 +33,7 @@ extern StaticDeclaration static_declarations; bool SCR::registered = false; -static YCPValue +static YCPValue SCRRead3 (const YCPPath &path, const YCPValue &args = YCPNull (), const YCPValue &opt = YCPNull ()) { if (! SCRAgent::instance()) { @@ -41,21 +41,21 @@ SCRRead3 (const YCPPath &path, const YCPValue &args = YCPNull (), const YCPValue return YCPVoid (); } YCPValue ret = SCRAgent::instance()->Read( path, args, opt ); - + return ret; } -static YCPValue +static YCPValue SCRRead2 (const YCPPath &path, const YCPValue &arg) { return SCRRead3 (path, arg); } -static YCPValue +static YCPValue SCRRead (const YCPPath &path) { return SCRRead3 (path); } -static YCPValue +static YCPValue SCRWrite2 (const YCPPath &path, const YCPValue& value_n) { YCPValue value = value_n.isNull()? YCPVoid(): value_n; // bnc#406138 @@ -68,7 +68,7 @@ SCRWrite2 (const YCPPath &path, const YCPValue& value_n) { return SCRAgent::instance ()->Write (path, value); } -static YCPValue +static YCPValue SCRWrite3 (const YCPPath &path, const YCPValue& value_n, const YCPValue& arg_n) { YCPValue value = value_n.isNull()? YCPVoid(): value_n; // bnc#406138 YCPValue arg = arg_n.isNull()? YCPVoid(): arg_n; // bnc#406138 @@ -82,7 +82,7 @@ SCRWrite3 (const YCPPath &path, const YCPValue& value_n, const YCPValue& arg_n) return SCRAgent::instance ()->Write (path, value, arg); } -static YCPValue +static YCPValue SCRDir (const YCPPath& path) { if (! SCRAgent::instance()) { @@ -93,7 +93,7 @@ SCRDir (const YCPPath& path) { return SCRAgent::instance ()->Dir (path); } -static YCPValue +static YCPValue SCRExecute (const YCPPath &path) { if (! SCRAgent::instance()) { @@ -104,7 +104,7 @@ SCRExecute (const YCPPath &path) { return SCRAgent::instance ()->Execute (path); } -static YCPValue +static YCPValue SCRError (const YCPPath &path) { if (! SCRAgent::instance()) { @@ -113,11 +113,11 @@ SCRError (const YCPPath &path) { } y2debug( "Running SCR::Error on SCR agent %p", SCRAgent::instance () ); y2debug( "path: %s", path->toString ().c_str () ); - + return SCRAgent::instance ()->Error (path); } -static YCPValue +static YCPValue SCRExecute2 (const YCPPath &path, const YCPValue &arg_n) { YCPValue arg = arg_n.isNull()? YCPVoid(): arg_n; // bnc#406138 @@ -129,11 +129,11 @@ SCRExecute2 (const YCPPath &path, const YCPValue &arg_n) { y2debug( "Running SCR::Execute on SCR agent %p", SCRAgent::instance () ); y2debug( "path: %s", path->toString ().c_str () ); y2debug( "args: %s", arg->toString ().c_str () ); - + return SCRAgent::instance ()->Execute (path, arg); } -static YCPValue +static YCPValue SCRExecute3 (const YCPPath &path, const YCPValue &arg_n, const YCPValue &opt_n) { YCPValue arg = arg_n.isNull()? YCPVoid(): arg_n; // bnc#406138 YCPValue opt = opt_n.isNull()? YCPVoid(): opt_n; // bnc#406138 @@ -146,11 +146,11 @@ SCRExecute3 (const YCPPath &path, const YCPValue &arg_n, const YCPValue &opt_n) y2debug( "Running SCR::Execute on SCR agent %p", SCRAgent::instance () ); y2debug( "path: %s", path->toString ().c_str () ); y2debug( "args: %s,%s", arg->toString ().c_str (), opt->toString ().c_str () ); - + return SCRAgent::instance ()->Execute (path, arg, opt); } -static YCPValue +static YCPValue SCRRegisterAgentS (const YCPPath &path, const YCPString &arg) { if (! SCRAgent::instance()) { @@ -163,7 +163,7 @@ SCRRegisterAgentS (const YCPPath &path, const YCPString &arg) { return SCRAgent::instance ()->RegisterAgent (path, arg); } -static YCPValue +static YCPValue SCRRegisterAgentT (const YCPPath &path, const YCPTerm &arg) { if (! SCRAgent::instance()) { @@ -176,7 +176,7 @@ SCRRegisterAgentT (const YCPPath &path, const YCPTerm &arg) { return SCRAgent::instance ()->RegisterAgent (path, arg); } -static YCPValue +static YCPValue SCRUnregisterAgent (const YCPPath &path) { if (! SCRAgent::instance()) { @@ -188,7 +188,7 @@ SCRUnregisterAgent (const YCPPath &path) { return SCRAgent::instance ()->UnregisterAgent (path); } -static YCPValue +static YCPValue SCRUnregisterAllAgents () { if (! SCRAgent::instance()) { @@ -199,7 +199,7 @@ SCRUnregisterAllAgents () { return SCRAgent::instance ()->UnregisterAllAgents (); } -static YCPValue +static YCPValue SCRUnmountAgent (const YCPPath &path) { if (! SCRAgent::instance()) { @@ -211,7 +211,7 @@ SCRUnmountAgent (const YCPPath &path) { return SCRAgent::instance ()->UnmountAgent (path); } -static YCPValue +static YCPValue SCRRegisterNewAgents () { if (! SCRAgent::instance()) { @@ -226,7 +226,7 @@ SCR::SCR () { // already done, we must avoid double registration if (registered) return; - + y2debug( "Registering SCR builtins in %p", &static_declarations ); // must be static, registerDeclarations saves a pointer to it! @@ -256,7 +256,7 @@ SCR::SCR () }; static_declarations.registerDeclarations ("SCR", declarations); - + registered = true; } diff --git a/libscr/src/SCRAgent.cc b/libscr/src/SCRAgent.cc index e762dd4d2..45776a3e7 100644 --- a/libscr/src/SCRAgent.cc +++ b/libscr/src/SCRAgent.cc @@ -107,3 +107,7 @@ SCRAgent::readconf (const char *filename) return ret; } +const char *SCRAgent::root() const +{ + return mainscragent ? mainscragent->root() : "/"; +} diff --git a/libscr/src/include/scr/SCRAgent.h b/libscr/src/include/scr/SCRAgent.h index 6b450f422..6c4c13fa5 100644 --- a/libscr/src/include/scr/SCRAgent.h +++ b/libscr/src/include/scr/SCRAgent.h @@ -21,7 +21,6 @@ #ifndef SCRAgent_h #define SCRAgent_h - #include #include @@ -134,6 +133,15 @@ class SCRAgent */ SCRAgent *mainscragent; + + /** + * Filesystem root on which to operate. + * It is useful for agents during installation to operate on different root + * (FATE#314695). + * \return C string owned by instance. + */ + virtual const char *root () const; + /** * Reads the scr config file and returns the term. It skips all lines * upto (including) the first starting with a ".", which is the path diff --git a/libscr/src/include/scr/Y2AgentComponent.h b/libscr/src/include/scr/Y2AgentComponent.h index 4bbd33389..26ce91b2f 100644 --- a/libscr/src/include/scr/Y2AgentComponent.h +++ b/libscr/src/include/scr/Y2AgentComponent.h @@ -36,26 +36,26 @@ template class Y2AgentComp : public Y2Component /** * Clean up. */ - ~Y2AgentComp (); + virtual ~Y2AgentComp (); /** * Returns the name of the component. */ - string name () const { return my_name; } + virtual string name () const { return my_name; } /** * Evaluates a command to the agent. */ - YCPValue evaluate (const YCPValue &command); + virtual YCPValue evaluate (const YCPValue &command); /** * Returns the SCRAgent of the Y2Component. */ - SCRAgent* getSCRAgent (); + virtual SCRAgent* getSCRAgent (); - YCPValue Read (const YCPPath &path); - -private: + virtual YCPValue Read (const YCPPath &path); + +protected: /** * Name of my agent. diff --git a/libscr/testsuite/runscr.cc b/libscr/testsuite/runscr.cc index 9385933e6..6542d0cc4 100644 --- a/libscr/testsuite/runscr.cc +++ b/libscr/testsuite/runscr.cc @@ -1,14 +1,14 @@ /*---------------------------------------------------------------------\ -| | -| __ __ ____ _____ ____ | -| \ \ / /_ _/ ___|_ _|___ \ | -| \ V / _` \___ \ | | __) | | -| | | (_| |___) || | / __/ | -| |_|\__,_|____/ |_| |_____| | -| | -| core system | -| (C) SuSE GmbH | -\----------------------------------------------------------------------/ +| | +| __ __ ____ _____ ____ | +| \ \ / /_ _/ ___|_ _|___ \ | +| \ V / _` \___ \ | | __) | | +| | | (_| |___) || | / __/ | +| |_|\__,_|____/ |_| |_____| | +| | +| core system | +| (C) SuSE GmbH | +\----------------------------------------------------------------------/ File: runscr.cc diff --git a/liby2/src/SymbolEntry.cc b/liby2/src/SymbolEntry.cc index b1c025da8..89d801f35 100644 --- a/liby2/src/SymbolEntry.cc +++ b/liby2/src/SymbolEntry.cc @@ -36,7 +36,7 @@ using std::string; IMPL_BASE_POINTER(SymbolEntry); UstringHash* SymbolEntry::_nameHash = NULL; -Ustring SymbolEntry::emptyUstring = Ustring ( *( SymbolEntry::_nameHash ? SymbolEntry::_nameHash : (SymbolEntry::_nameHash = new UstringHash)), ""); +Ustring SymbolEntry::emptyUstring = Ustring ( *( SymbolEntry::_nameHash ? SymbolEntry::_nameHash : (SymbolEntry::_nameHash = new UstringHash)), ""); #ifdef D_MEMUSAGE void __UUsage () @@ -122,13 +122,13 @@ SymbolEntry::setValue (YCPValue value) } return m_value->asReference()->entry()->setValue (value); } - + // use YCPVoid for nil to avoid problems with function references if (value.isNull ()) { value = YCPVoid (); } - + return m_value = value; } @@ -173,7 +173,7 @@ SymbolEntry::name () const } -SymbolEntry::category_t +SymbolEntry::category_t SymbolEntry::category () const { return m_category; @@ -210,7 +210,7 @@ SymbolEntry::setGlobal (bool global) } -string +string SymbolEntry::catString () const { switch (m_category) @@ -259,7 +259,7 @@ SymbolEntry::catString () const } -string +string SymbolEntry::toString (bool with_type) const { string s = (with_type && m_global) ? "global " : ""; @@ -290,7 +290,7 @@ SymbolEntry::toString (bool with_type) const { constFunctionTypePtr ftype = m_type; s += (((m_category == c_variable)||(m_category ==c_reference)) ? m_type->toString() : ftype->returnType()->toString()) + " "; - + if (m_global && m_namespace != 0 && !m_namespace->name().empty()) @@ -301,7 +301,7 @@ SymbolEntry::toString (bool with_type) const if (m_category == c_function) { constFunctionTypePtr type = (constFunctionTypePtr)m_type; - + // are there any parameters if (type->parameters()) { diff --git a/liby2/src/Y2CCPlugin.cc b/liby2/src/Y2CCPlugin.cc index 3e53b3e9e..f5502b7d7 100644 --- a/liby2/src/Y2CCPlugin.cc +++ b/liby2/src/Y2CCPlugin.cc @@ -79,7 +79,7 @@ Y2CCPlugin::createInLevel (const char* name, int level, int current_level) const // Some components need special care, because their name and the name // of their plugin differ. - + // remote plugin can't handle "remote" component if (strcmp (name, "remote") == 0) return 0; @@ -134,7 +134,7 @@ Y2CCPlugin::provideNamespace(const char* name_space) continue; y2debug ("Trying file '%s'", filename.c_str ()); - + comp = new Y2PluginComponent (filename, name_space, name_space, name_space); if (comp) break; } diff --git a/liby2/src/Y2ComponentBroker.cc b/liby2/src/Y2ComponentBroker.cc index c2d3903a4..3b0c47e01 100644 --- a/liby2/src/Y2ComponentBroker.cc +++ b/liby2/src/Y2ComponentBroker.cc @@ -49,7 +49,7 @@ void Y2ComponentBroker::registerComponentCreator(const Y2ComponentCreator *c, or // well as the "qt", "ncurses", "gtk" UI servers. // // 2008-02-18 sh@suse.de - + if (!stop_register || force) { // y2debug( "Registering component creator at %p - force: %d", c, (int) force ); @@ -135,7 +135,7 @@ Y2ComponentBroker::getNamespaceComponent (const char* name) // the ui stuff is a mess, must prefer servers Y2Component *comp = createServer (comp_name.c_str ()); - if (! comp) + if (! comp) { // no server component, try client as well comp = Y2ComponentBroker::createClient (comp_name.c_str ()); @@ -151,8 +151,8 @@ Y2ComponentBroker::getNamespaceComponent (const char* name) y2warning ("Cannot create component based on exception list for namespaces!!!"); } } - - + + // uselessly repeats if it failed // for (int level = 0; level < Y2PathSearch::numberOfComponentLevels (); // level++) @@ -191,7 +191,7 @@ bool Y2ComponentBroker::registerNamespaceException(const char* name_space, const } namespace_exceptions.insert ( std::pair(name_space,component_name) ); - + return true; } diff --git a/liby2/src/Y2ComponentCreator.cc b/liby2/src/Y2ComponentCreator.cc index d6d01d210..b98a4ab61 100644 --- a/liby2/src/Y2ComponentCreator.cc +++ b/liby2/src/Y2ComponentCreator.cc @@ -1,14 +1,14 @@ /*---------------------------------------------------------------------\ -| | -| __ __ ____ _____ ____ | -| \ \ / /_ _/ ___|_ _|___ \ | -| \ V / _` \___ \ | | __) | | -| | | (_| |___) || | / __/ | -| |_|\__,_|____/ |_| |_____| | -| | -| core system | -| (C) SuSE GmbH | -\----------------------------------------------------------------------/ +| | +| __ __ ____ _____ ____ | +| \ \ / /_ _/ ___|_ _|___ \ | +| \ V / _` \___ \ | | __) | | +| | | (_| |___) || | / __/ | +| |_|\__,_|____/ |_| |_____| | +| | +| core system | +| (C) SuSE GmbH | +\----------------------------------------------------------------------/ File: Y2ComponentCreator.cc diff --git a/liby2/src/Y2Namespace.cc b/liby2/src/Y2Namespace.cc index 9a3432320..8e8768239 100644 --- a/liby2/src/Y2Namespace.cc +++ b/liby2/src/Y2Namespace.cc @@ -115,7 +115,7 @@ Y2Namespace::symbolsToString () const } -SymbolEntryPtr +SymbolEntryPtr Y2Namespace::symbolEntry (unsigned int position) const { if (position >= m_symbolcount) @@ -210,7 +210,7 @@ Y2Namespace::finish () // it is important to allow a bytecode ignore changes in local symbols - the indexes for globals // are not changed if ( m_count == 0 ) return; - + #if DO_DEBUG y2debug ("Going to reorder"); #endif @@ -229,7 +229,7 @@ Y2Namespace::finish () next_index++; } } - + // then locals for (uint i = 0 ; i < m_count ; i++) { @@ -300,14 +300,14 @@ Y2Namespace::initialize () // we are already initialized return; } - + // avoid recursion m_initialized = true; evaluate (); - + if (table ()) - { + { SymbolTable* t = table (); t->disableUsage (); if (t->find (name ().c_str ())) diff --git a/liby2/src/Y2PluginComponent.cc b/liby2/src/Y2PluginComponent.cc index 50bfb2b96..08748547f 100644 --- a/liby2/src/Y2PluginComponent.cc +++ b/liby2/src/Y2PluginComponent.cc @@ -85,7 +85,7 @@ Y2PluginComponent::setServerOptions (int argc, char** argv) { this->argc = argc; this->argv = argv; - + if (comp) { comp->setServerOptions (argc, argv); @@ -242,7 +242,7 @@ Y2PluginComponent::loadPlugin (const char* name_space) for (int num = -1; ; num++) { y2cc = locateSym (num); - + y2debug ("Component creator located; %p", y2cc); if (!y2cc && num == -1) // that's ok @@ -254,7 +254,7 @@ Y2PluginComponent::loadPlugin (const char* name_space) { break; } - + // let's try to lookup namespace if we are asked for it if (name_space != NULL) { @@ -303,7 +303,7 @@ Y2PluginComponent::locateSym (int num) { snprintf (buffer, size, "g_y2cc%s%d", creator_name.c_str(), num); } - + Y2ComponentCreator* y2cc = (Y2ComponentCreator*) dlsym (handle, buffer); if (dlerror() != 0) diff --git a/liby2/src/Y2ProgramComponent.cc b/liby2/src/Y2ProgramComponent.cc index 3a1bb2edc..6468cc830 100644 --- a/liby2/src/Y2ProgramComponent.cc +++ b/liby2/src/Y2ProgramComponent.cc @@ -149,7 +149,7 @@ void Y2ProgramComponent::result(const YCPValue& result) // has been issued. Therefore at this point the external // program may not have been started after all. So we need // to check, if it's running. - + if (pid != -1) { YCPTerm resultterm("result"); @@ -363,13 +363,13 @@ YCPValue Y2ProgramComponent::receiveFromExternal () } YCodePtr c = parser.parse (); - + if (c == NULL || c->isError()) { y2error ("External program %s returned invalid data. (No other error means no data at all)", bin_file.c_str ()); return YCPNull (); } - + // evaluate, but not as constant YCPValue ret = c->evaluate (true); if (ret.isNull ()) diff --git a/liby2/src/Y2SerialComponent.cc b/liby2/src/Y2SerialComponent.cc index 21c0faec5..50df08e45 100644 --- a/liby2/src/Y2SerialComponent.cc +++ b/liby2/src/Y2SerialComponent.cc @@ -1,14 +1,14 @@ /*---------------------------------------------------------------------\ -| | -| __ __ ____ _____ ____ | -| \ \ / /_ _/ ___|_ _|___ \ | -| \ V / _` \___ \ | | __) | | -| | | (_| |___) || | / __/ | -| |_|\__,_|____/ |_| |_____| | -| | -| core system | -| (C) SuSE GmbH | -\----------------------------------------------------------------------/ +| | +| __ __ ____ _____ ____ | +| \ \ / /_ _/ ___|_ _|___ \ | +| \ V / _` \___ \ | | __) | | +| | | (_| |___) || | / __/ | +| |_|\__,_|____/ |_| |_____| | +| | +| core system | +| (C) SuSE GmbH | +\----------------------------------------------------------------------/ File: Y2SerialComponent.cc @@ -23,9 +23,9 @@ */ #include -#include +#include #include -#include +#include #include #include #include @@ -75,7 +75,7 @@ string Y2SerialComponent::name() const YCPValue Y2SerialComponent::evaluate(const YCPValue& command) { if (fd_serial < 0) // not yet initialized - { + { if (! initializeConnection()) return YCPVoid(); } @@ -107,7 +107,7 @@ void Y2SerialComponent::setServerOptions(int argc, char **argv) for (int i=1; isize()); } - + YCPValue value = YCPNull(); while (!(value = receiveFromSerial()).isNull()) { - if (value->isTerm() - && value->asTerm()->size() == 1 + if (value->isTerm() + && value->asTerm()->size() == 1 && value->asTerm()->name ()=="result") { close_tty(); - return value; + return value; } sendToSerial(user_interface->evaluate(value)); } y2warning ("Communication ended prior to result() message"); return YCPVoid(); -} +} int Y2SerialComponent::open_tty() { fd_serial = open(device_name.c_str(), O_RDWR | O_NOCTTY); - + if (fd_serial < 0) { y2error ("Couldn't open device: %s", device_name.c_str()); } - + return fd_serial; // success? } @@ -192,7 +192,7 @@ int Y2SerialComponent::setup_serial_device() { struct serial_struct info; int ret = ioctl(fd_serial, TIOCGSERIAL, &info); // get serial info - + if (ret >= 0) { info.flags |= ASYNC_CTS_FLOW; // set RTS/CTS flow control @@ -225,9 +225,9 @@ int Y2SerialComponent::make_raw() tty.c_cflag = (tty.c_cflag & ~CSIZE) | CS8; // 8 data bits tty.c_cflag &= ~CSTOPB; // only one stop bit. tty.c_cflag &= ~PARENB; // no parenty generation / checking - + ret = tcsetattr(fd_serial, 0 , &tty); // set attributes - + if (ret < 0) { y2error ("Couldn't set raw mode for: %s", device_name.c_str()); @@ -243,7 +243,7 @@ int Y2SerialComponent::make_raw() int Y2SerialComponent::set_fixed_line_speed(long speed) // returns 0 on success { - static struct { int mask; long speed; } + static struct { int mask; long speed; } a_speed[] = { { B50, 50L }, { B75, 75L }, { B110, 110L }, { B134, 134L }, @@ -259,12 +259,12 @@ int Y2SerialComponent::set_fixed_line_speed(long speed) // returns 0 on success { struct termios tty; int ret = tcgetattr(fd_serial, &tty); // get attributes - + if (ret >= 0) { cfsetispeed(&tty, a_speed[i].mask); cfsetospeed(&tty, a_speed[i].mask); - + ret = tcsetattr(fd_serial, 0 , &tty); // set attributes if (ret < 0) @@ -284,12 +284,12 @@ int Y2SerialComponent::set_fixed_line_speed(long speed) // returns 0 on success y2error ("No fixed standard line speed of %ld baud supported by %s.", speed, device_name.c_str()); - + y2error ("Allowed speeds are:"); - + for (int i=0; a_speed[i].speed >= 0; i++) y2error ("Baud: %ld", a_speed[i].speed); - + return -1; // No such fixed speed } @@ -310,7 +310,7 @@ bool Y2SerialComponent::await_readable(long timeout) bool Y2SerialComponent::initializeConnection() { if (fd_serial >= 0) return true; // already established - + int ret = open_tty(); // logs for itself if (ret >= 0) ret = setup_serial_device(); // logs for itself @@ -341,7 +341,7 @@ bool Y2SerialComponent::initializeConnection() } char buf[2]; - + // first write one space so the other side gets // fullfilled its necessities write(fd_serial, space_buf, 1); @@ -369,7 +369,7 @@ bool Y2SerialComponent::initializeConnection() } close_tty(); // cleanup, connection NOT established - + return false; } diff --git a/liby2/src/genericfrontend.cc b/liby2/src/genericfrontend.cc index e606097dd..dffef51c7 100644 --- a/liby2/src/genericfrontend.cc +++ b/liby2/src/genericfrontend.cc @@ -69,17 +69,17 @@ * YaST is licensed under GPL v2. * */ - + /** * \page exitcodes YaST2 Exit Codes * * All applications using liby2 library share a common \ref main function. The function handles the exit codes in the following way. - * + * * The exit codes are described in \ref exitcodes.h header file. A special handling is applied to the value returned from the client. - * - If a value is \ref YCPNull or \ref YCPVoid, exitcode \ref YAST_OK will be used. - * - If the value is \ref YCPBoolean, \ref YAST_OK will be returned for true, \ref YAST_CLIENTRESULT for false. + * - If a value is \ref YCPNull or \ref YCPVoid, exitcode \ref YAST_OK will be used. + * - If the value is \ref YCPBoolean, \ref YAST_OK will be returned for true, \ref YAST_CLIENTRESULT for false. * - If the value is \ref YCPInteger, the value will be added to \ref YAST_CLIENTRESULT and the resulting - * integer will be the process exitcode. + * integer will be the process exitcode. * - If the value is \ref YCPSymbol, for names defined by \ref ycp_error_exit_symbols \ref YAST_CLIENTRESULT * will be returned, otherwise \ref YAST_OK. */ @@ -111,7 +111,7 @@ #define MAX_YCP_ERROR_EXIT_SYMBOLS 2 /// symbol names that are handled as error codes when returned by the client -const char* ycp_error_exit_symbols[MAX_YCP_ERROR_EXIT_SYMBOLS] = { +const char* ycp_error_exit_symbols[MAX_YCP_ERROR_EXIT_SYMBOLS] = { "abort", "cancel" }; @@ -622,7 +622,7 @@ main (int argc, char **argv) debugger = true; arg+=1; } - + if (!strcmp(argv[arg], "--debugger-remote")) { // set the flag @@ -630,7 +630,7 @@ main (int argc, char **argv) debugger_remote = true; arg+=1; } - + // also handle environment variable if( getenv ("Y2DEBUGGER") ) { @@ -788,7 +788,7 @@ main (int argc, char **argv) { exit( result->asBoolean()->value() ? YAST_OK : YAST_CLIENTRESULT ); } - + if( result->isInteger () ) exit( YAST_CLIENTRESULT + result->asInteger ()->value () ); @@ -800,7 +800,7 @@ main (int argc, char **argv) if( symbol == ycp_error_exit_symbols[i] ) exit( YAST_CLIENTRESULT ); } - + // all other values exit (YAST_OK); } diff --git a/liby2util-r/src/MemUsage.cc b/liby2util-r/src/MemUsage.cc index c0a54fe09..7775b9200 100644 --- a/liby2util-r/src/MemUsage.cc +++ b/liby2util-r/src/MemUsage.cc @@ -1,14 +1,14 @@ /*-----------------------------------------------------------*- c++ -*-\ -| | -| __ __ ____ _____ ____ | -| \ \ / /_ _/ ___|_ _|___ \ | -| \ V / _` \___ \ | | __) | | -| | | (_| |___) || | / __/ | -| |_|\__,_|____/ |_| |_____| | -| | -| core system | -| (C) SUSE LINUX AG | -\----------------------------------------------------------------------/ +| | +| __ __ ____ _____ ____ | +| \ \ / /_ _/ ___|_ _|___ \ | +| \ V / _` \___ \ | | __) | | +| | | (_| |___) || | / __/ | +| |_|\__,_|____/ |_| |_____| | +| | +| core system | +| (C) SUSE LINUX AG | +\----------------------------------------------------------------------/ File: MemUsage.cc Author: Martin Vidner diff --git a/liby2util-r/src/Process.cc b/liby2util-r/src/Process.cc index 41e654690..4e33dbd74 100644 --- a/liby2util-r/src/Process.cc +++ b/liby2util-r/src/Process.cc @@ -2,17 +2,17 @@ * * ------------------------------------------------------------------------------ * Copyright (c) 2008 Novell, Inc. All Rights Reserved. - * - * + * + * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along with * this program; if not, contact Novell, Inc. * @@ -179,7 +179,7 @@ std::string Process::readErr() // read from stderr to the buffer readStderrToBuffer(); - // return the buffer and clear it + // return the buffer and clear it std::string ret(stderr_buffer); stderr_buffer.clear(); diff --git a/liby2util-r/src/y2changes.cc b/liby2util-r/src/y2changes.cc index 52dcadf89..fb73e725e 100644 --- a/liby2util-r/src/y2changes.cc +++ b/liby2util-r/src/y2changes.cc @@ -205,7 +205,7 @@ static void set_log_filename (string fname) maxlogsize *= 1024; else maxlogsize = limit; - } else + } else maxlogsize = Y2CHANGES_MAXSIZE; char *env_maxlognum = getenv(Y2CHANGES_VAR_NUM); diff --git a/liby2util-r/src/y2log.cc b/liby2util-r/src/y2log.cc index c1464dc4c..058fa7ae9 100644 --- a/liby2util-r/src/y2log.cc +++ b/liby2util-r/src/y2log.cc @@ -394,7 +394,7 @@ void set_log_filename (string fname) maxlogsize *= 1024; else maxlogsize = limit; - } else + } else maxlogsize = Y2LOG_MAXSIZE; char *env_maxlognum = getenv(Y2LOG_VAR_NUM); diff --git a/liby2util-r/testsuite/test_chroot.cc b/liby2util-r/testsuite/test_chroot.cc index c5618dec0..a5f0ebf99 100644 --- a/liby2util-r/testsuite/test_chroot.cc +++ b/liby2util-r/testsuite/test_chroot.cc @@ -17,7 +17,7 @@ int main(int argc, char* argv[]) false, -1, true, chroot); if(!prog) return 1; string line; - + for(line = prog->receiveLine(); line.length() > 0; line = prog->receiveLine()) diff --git a/liby2util-r/testsuite/test_thread_log.cc b/liby2util-r/testsuite/test_thread_log.cc index 960cfa1a5..709b0cb41 100644 --- a/liby2util-r/testsuite/test_thread_log.cc +++ b/liby2util-r/testsuite/test_thread_log.cc @@ -21,7 +21,7 @@ void *PrintHello(void *threadid) y2debug("Thread %p tick %d", threadid, i); pthread_exit(NULL); } - + int main (int argc, char *argv[]) { pthread_t threads[NUM_THREADS]; @@ -34,7 +34,7 @@ int main (int argc, char *argv[]) for(t=1; t<=NUM_THREADS; t++){ printf("In main: creating thread %p\n", (void*)t); rc = pthread_create(&threads[t-1], NULL, PrintHello, (void *)t); - + if (rc){ printf("ERROR; return code from pthread_create() is %d\n", rc); return 1; diff --git a/libycp/src/Bytecode.cc b/libycp/src/Bytecode.cc index b91507521..b567840bd 100644 --- a/libycp/src/Bytecode.cc +++ b/libycp/src/Bytecode.cc @@ -95,8 +95,8 @@ bytecodeistream::bytecodeistream (string filename) bool bytecodeistream::isVersion (int major, int minor, int release) { - return (major == m_major) - && (minor == m_minor) + return (major == m_major) + && (minor == m_minor) && (release == m_release); } @@ -106,14 +106,14 @@ bool bytecodeistream::isVersionAtMost (int major, int minor, int release) { return false; } - + if (m_major == major) { if (m_minor > minor) { return false; } - + if ( (m_minor == minor) && (m_release > release)) { return false; @@ -138,7 +138,7 @@ Bytecode::namespaceInit () { free (Bytecode::m_namespace_nesting_array); } - + Bytecode::m_namespace_nesting_array = 0; Bytecode::m_namespace_nesting_level = -1; Bytecode::m_namespace_nesting_array_size = 0; @@ -759,7 +759,7 @@ Bytecode::writeEntry (std::ostream & str, const SymbolEntryPtr sentry) } -SymbolEntryPtr +SymbolEntryPtr Bytecode::readEntry (bytecodeistream & str) { // read reference to namespaces (namespace_id) symbol table (position) @@ -835,14 +835,14 @@ Bytecode::readCode (bytecodeistream & str) { return new YConst ((YCode::ykind)code, str); } - + // compatibility with 9.1/SLES if (str.isVersion (1,3,2) && code > YCode::yeExpression) { // yeFunctionPointer did not exist then code++; } - + YCodePtr res = 0; // there used to be a try/catch here but it was moved to readFile @@ -1070,7 +1070,7 @@ map * Bytecode::m_bytecodeCache = NULL; // read file from module path -YBlockPtr +YBlockPtr Bytecode::readModule (const string & mname) { #if DO_DEBUG @@ -1087,7 +1087,7 @@ Bytecode::readModule (const string & mname) ycperror ("Module '%s' not found", mname.c_str()); return 0; } - + if (! m_bytecodeCache) { m_bytecodeCache = new map ; @@ -1102,7 +1102,7 @@ Bytecode::readModule (const string & mname) return m_bytecodeCache->find (mname)->second; } - + int tare_id = Bytecode::tareStack (); // current nesting level is 0 for this module YBlockPtr block = (YBlockPtr)Bytecode::readFile (filename); @@ -1139,7 +1139,7 @@ Bytecode::readFile (const string & filename) return 0; } // check YaST_BYTECODE_HEADER - if ( + if ( instream.isVersion ( atoi (YaST_BYTECODE_MAJOR) , atoi (YaST_BYTECODE_MINOR) diff --git a/libycp/src/ExecutionEnvironment.cc b/libycp/src/ExecutionEnvironment.cc index 36ef9267d..d2e080137 100644 --- a/libycp/src/ExecutionEnvironment.cc +++ b/libycp/src/ExecutionEnvironment.cc @@ -3,7 +3,7 @@ * * Description: * YaST2 execution environment, i.e. processing context. - * Contains reference to the current statement, + * Contains reference to the current statement, * the current file name and backtrace. * This information can be used for logging, debugger etc. * @@ -85,12 +85,12 @@ void ExecutionEnvironment::setStatement (YStatementPtr s) { m_statement = s; - + if (s != NULL) { m_linenumber = s->line (); } - + return; } @@ -131,12 +131,12 @@ ExecutionEnvironment::backtrace (loglevel_t level, uint omit) const { if (m_backtrace.empty ()) return; - + // FIXME: omit CallStack::const_reverse_iterator it = m_backtrace.rbegin(); y2logger(level, "------------- Backtrace begin -------------"); - + while (it != m_backtrace.rend()) { ycp2log (level, (*it)->filename.c_str (), (*it)->linenumber diff --git a/libycp/src/Parser.cc b/libycp/src/Parser.cc index 639acf886..6d0dd1562 100644 --- a/libycp/src/Parser.cc +++ b/libycp/src/Parser.cc @@ -169,7 +169,7 @@ Parser::parse (SymbolTable *gTable, SymbolTable *lTable) y2internal("Not input for the parser has been set"); return 0; } - + init (); m_scanner->initTables (gTable, lTable); @@ -182,7 +182,7 @@ Parser::parse (SymbolTable *gTable, SymbolTable *lTable) m_parser_errors = 0; m_result = 0; } - + if (m_lineno == -1) { m_at_eof = true; diff --git a/libycp/src/Point.cc b/libycp/src/Point.cc index 2e99cb21d..c902bf0a6 100644 --- a/libycp/src/Point.cc +++ b/libycp/src/Point.cc @@ -58,7 +58,7 @@ using std::string; Point::Point (std::string filename, int line, const Point *point) // the argument is converted to string in SymbolEntry constructor - : m_entry (new YSymbolEntry (filename.c_str())) + : m_entry (new YSymbolEntry (filename.c_str())) , m_line (line) , m_point (point) { @@ -87,7 +87,7 @@ Point::~Point (void) } -SymbolEntryPtr +SymbolEntryPtr Point::sentry (void) const { return m_entry; diff --git a/libycp/src/StaticDeclaration.cc b/libycp/src/StaticDeclaration.cc index 8c52932ce..303a21f1a 100644 --- a/libycp/src/StaticDeclaration.cc +++ b/libycp/src/StaticDeclaration.cc @@ -384,7 +384,7 @@ StaticDeclaration::findDeclaration (declaration_t *decl, constTypePtr type, bool && atype->isFunction()) { bool error = false; - + constFunctionTypePtr fdtype = dtype; constFunctionTypePtr fatype = atype; int dcount = fdtype->parameterCount(); // declaration count @@ -393,17 +393,17 @@ StaticDeclaration::findDeclaration (declaration_t *decl, constTypePtr type, bool y2debug ("dcount %d, acout %d", dcount, acount); #endif int i; - + if (acount == 0) { // no arguments actual and declared if (dcount == 0) break; - + // no actual arguments allowed only if declared arguments are wildcard error = ! (fdtype->parameterType (0)->isWildcard ()); - } + } else - { + { // need to check all arguments one by one constTypePtr dt = 0; @@ -435,7 +435,7 @@ StaticDeclaration::findDeclaration (declaration_t *decl, constTypePtr type, bool #if DO_DEBUG y2debug ("loop exit %d", i); #endif - + // this was not the last argument in declared arguments // and the next one is not wildcard (can be omited completely) // it's an error @@ -454,7 +454,7 @@ StaticDeclaration::findDeclaration (declaration_t *decl, constTypePtr type, bool if (!error) // full match break; } - + if (decl->tentry->next_overloaded () != 0) { decl = ((YSymbolEntryPtr)decl->tentry->next_overloaded ()->sentry ())->declaration (); @@ -508,7 +508,7 @@ StaticDeclaration::writeDeclaration (std::ostream & str, const declaration_t *de #if DO_DEBUG y2debug ("StaticDeclaration::writeDeclaration('%s':%s)", n.c_str(), decl->type->toString().c_str()); #endif - + Bytecode::writeCharp (str, n.c_str()); decl->type->toStream (str); return str; diff --git a/libycp/src/SymbolTable.cc b/libycp/src/SymbolTable.cc index c6f9bcd40..ec3c01d00 100644 --- a/libycp/src/SymbolTable.cc +++ b/libycp/src/SymbolTable.cc @@ -81,7 +81,7 @@ TableEntry::TableEntry (bytecodeistream & str) TableEntry::~TableEntry () { - delete m_point; + delete m_point; } @@ -94,7 +94,7 @@ TableEntry::key() const } -SymbolEntryPtr +SymbolEntryPtr TableEntry::sentry() const { return m_entry; @@ -263,7 +263,7 @@ SymbolTable::~SymbolTable() delete m_xrefs->top(); m_xrefs->pop(); } - + delete m_xrefs; } @@ -365,7 +365,7 @@ SymbolTable::closeXRefs () } -SymbolEntryPtr +SymbolEntryPtr SymbolTable::getXRef (unsigned int position) const { if (!m_xrefs || m_xrefs->empty()) @@ -606,18 +606,18 @@ SymbolTable::enter (TableEntry *entry) // first check, if the entry is from this table if (bucket->sentry()->nameSpace() == entry->sentry()->nameSpace() && bucket->sentry()->category () == entry->sentry()->category ()) - + { #if DO_DEBUG if (SymbolTableDebug) y2debug ("overloading"); -#endif +#endif // put entry at end of the overloaded entries TableEntry *last = bucket; while (last->m_overloaded_next) { last = last->m_overloaded_next; } - + last->m_overloaded_next = entry; entry->m_overloaded_prev = last; } @@ -740,7 +740,7 @@ SymbolTable::xref (const char *key) { m_xrefs = new xrefs_t; } - + m_xrefs->top()->push_back (tentry); } return tentry; @@ -777,7 +777,7 @@ SymbolTable::remove (TableEntry *entry) else { int h = hash (entry->m_key); - + if (m_table[h] == entry) { m_table[h] = candidate; // next is new first @@ -794,7 +794,7 @@ SymbolTable::remove (TableEntry *entry) break; } } - + if (!shadow) { y2internal ("Could not fix the symbol table for %s", entry->key ()); @@ -813,7 +813,7 @@ SymbolTable::remove (TableEntry *entry) { //y2debug ("SymbolTable: First in bucket\n"); int h = hash (entry->m_key); - + if (m_table[h] == entry) { m_table[h] = entry->m_next; // next is new first @@ -832,11 +832,11 @@ SymbolTable::remove (TableEntry *entry) break; } } - + if (!shadow) { y2internal ("Could not fix the symbol table for %s", entry->key ()); - } + } } } @@ -1003,7 +1003,7 @@ SymbolTable::tableCopy(Y2Namespace* tofill) const y2milestone ("Converting symbolentry for '%s'", m_table[i]->key ()); tofill->enterSymbol (new SymbolEntry (tofill, i, m_table[i]->key () , s->category (), s->type ())); - + // now, convert the m_next stuff, others should be fine // because the parser is running using the local namespace // FIXME: what about the overloaded ones? diff --git a/libycp/src/TypeStatics.cc b/libycp/src/TypeStatics.cc index e4ebe49b0..5943a8926 100644 --- a/libycp/src/TypeStatics.cc +++ b/libycp/src/TypeStatics.cc @@ -409,7 +409,7 @@ Type::fromSignature (const char ** signature) } t = MapTypePtr (new MapType (t1, t2, as_const)); - next = '>'; + next = '>'; } break; case TupleT: t = TupleTypePtr (new TupleType (t1, as_const)); next = 0; break; diff --git a/libycp/src/Xmlcode.cc b/libycp/src/Xmlcode.cc index 7eb1b9132..8adc3c108 100644 --- a/libycp/src/Xmlcode.cc +++ b/libycp/src/Xmlcode.cc @@ -114,8 +114,8 @@ xmlcodeistream::xmlcodeistream( string filename) bool xmlcodeistream::isVersion( int major, int minor, int release) { - return( major == m_major) - &&( minor == m_minor) + return( major == m_major) + &&( minor == m_minor) &&( release == m_release); } @@ -125,14 +125,14 @@ bool xmlcodeistream::isVersionAtMost( int major, int minor, int release) { return false; } - + if( m_major == major) { if( m_minor > minor) { return false; } - + if( ( m_minor == minor) &&( m_release > release)) { return false; @@ -157,7 +157,7 @@ Xmlcode::namespaceInit( ) { free( Xmlcode::m_namespace_nesting_array); } - + Xmlcode::m_namespace_nesting_array = 0; Xmlcode::m_namespace_nesting_level = -1; Xmlcode::m_namespace_nesting_array_size = 0; @@ -457,7 +457,7 @@ Xmlcode::writeEntry( std::ostream & str, const SymbolEntryPtr sentry) } -SymbolEntryPtr +SymbolEntryPtr Xmlcode::readEntry( xmlcodeistream & str) { return 0; @@ -487,14 +487,14 @@ Xmlcode::readCode( xmlcodeistream & str) { return new YConst( (YCode::ykind)code, str); } - + // compatibility with 9.1/SLES if( str.isVersion( 1,3,2) && code > YCode::yeExpression) { // yeFunctionPointer did not exist then code++; } - + try { @@ -728,7 +728,7 @@ map * Xmlcode::m_xmlcodeCache = NULL; // read file from module path -YBlockPtr +YBlockPtr Xmlcode::readModule( const string & mname) { #if DO_DEBUG @@ -745,7 +745,7 @@ Xmlcode::readModule( const string & mname) ycperror( "Module '%s' not found", mname.c_str()); return 0; } - + if( ! m_xmlcodeCache) { m_xmlcodeCache = new map ; @@ -760,7 +760,7 @@ Xmlcode::readModule( const string & mname) return m_xmlcodeCache->find( mname)->second; } - + int tare_id = Xmlcode::tareStack( ); // current nesting level is 0 for this module YBlockPtr block =( YBlockPtr)Xmlcode::readFile( filename); @@ -797,8 +797,8 @@ Xmlcode::readFile( const string & filename) return 0; } // check YaST_BYTECODE_HEADER - if( - instream.isVersion( + if( + instream.isVersion( atoi( YaST_BYTECODE_MAJOR) , atoi( YaST_BYTECODE_MINOR) , atoi( YaST_BYTECODE_RELEASE)) @@ -808,7 +808,7 @@ Xmlcode::readFile( const string & filename) #if DO_DEBUG // y2debug( "Header accepted"); #endif - + return readCode( instream); } diff --git a/libycp/src/YBlock.cc b/libycp/src/YBlock.cc index 0f934df7e..e9b588134 100644 --- a/libycp/src/YBlock.cc +++ b/libycp/src/YBlock.cc @@ -121,13 +121,13 @@ YBlock::~YBlock () delete tp; tp = next; } - + if (m_includes) delete m_includes; } -const std::string +const std::string YBlock::filename () const { return m_point->filename(); @@ -253,7 +253,7 @@ YBlock::attachStatement (YStatementPtr statement) m_last_statement->next = newstmt; m_last_statement = newstmt; } - + return; } @@ -378,7 +378,7 @@ YBlock::justReturn () const } -const string +const string YBlock::name () const { return m_name; @@ -482,16 +482,16 @@ YBlock::toStringSwitch (map cases, int defaultcase) con // first, create reverse map of cases int statementcount = statementCount (); YCPValue values[statementcount]; - + for (int i = 0; i < statementcount; i++) values[i] = YCPNull (); - + for (map::iterator it = cases.begin (); it != cases.end (); it++ ) { values[ it->second ] = it->first; } - + // create string output string s = "{"; @@ -532,7 +532,7 @@ YBlock::toXmlSwitch( map cases, int defaultcase, std::o { values[ it->second ].push_back(it->first); } - + // s += environmentToString (); stmtlist_t *stmt = m_statements; @@ -588,7 +588,7 @@ YBlock::evaluate (bool cse) if (debugger_instance) { m_debug = debugger_instance->tracing(); - + debugger_instance->pushBlock (this, m_debug); } @@ -597,7 +597,7 @@ YBlock::evaluate (bool cse) { pushToStack (); } - + bool old_m_running = m_running; m_running = true; @@ -613,7 +613,7 @@ YBlock::evaluate (bool cse) while (stmt) { YStatementPtr statement = stmt->stmt; - + #if DO_DEBUG y2debug ("%d: %s", statement->line (), statement->toString ().c_str ()); #endif @@ -635,7 +635,7 @@ YBlock::evaluate (bool cse) } value = statement->evaluate (); - + // If we get continue from inner evaluation, we have to respect it if (debugger_instance) { @@ -662,15 +662,15 @@ YBlock::evaluate (bool cse) { YaST::ee.setFilename(restore_name); } - + m_running = old_m_running; - + // recursion handling - not used for modules if (! isModule () && m_running) { popFromStack (); } - + if (debugger_instance) debugger_instance->popBlock (); @@ -706,7 +706,7 @@ YBlock::evaluateFrom (int statement_index) { pushToStack (); } - + bool old_m_running = m_running; m_running = true; @@ -719,19 +719,19 @@ YBlock::evaluateFrom (int statement_index) stmtlist_t *stmt = m_statements; YCPValue value = YCPVoid (); - + // skip statements until index while (stmt && statement_index > 0) { stmt = stmt->next; statement_index--; } - + // execute the rest of statements while (stmt) { YStatementPtr statement = stmt->stmt; - + #if DO_DEBUG y2debug ("%d: %s", statement->line (), statement->toString ().c_str ()); #endif @@ -753,9 +753,9 @@ YBlock::evaluateFrom (int statement_index) { YaST::ee.setFilename(restore_name); } - + m_running = old_m_running; - + // recursion handling - not used for modules if (! isModule () && m_running) { @@ -788,7 +788,7 @@ YBlock::evaluate (int statement_index, bool skip_initial_imports) #if DO_DEBUG y2debug("YBlock::evaluate(#%d)\n", statement_index); #endif - + stmtlist_t *stmt = m_statements; YCPValue value = YCPVoid (); @@ -798,7 +798,7 @@ YBlock::evaluate (int statement_index, bool skip_initial_imports) { stmt =stmt->next; } - + while (stmt && statement_index > 0) { stmt = stmt->next; @@ -810,11 +810,11 @@ YBlock::evaluate (int statement_index, bool skip_initial_imports) // we are at the end return YCPNull (); } - + y2milestone("YBlock::evaluating:\n%s", stmt->stmt->toString ().c_str()); value = stmt->stmt->evaluate (); - + #if DO_DEBUG y2debug("YBlock::evaluate statement done (value '%s')\n", value.isNull() ? "NULL" : value->toString().c_str()); #endif @@ -834,7 +834,7 @@ YBlock::statementCount () const stmt = stmt->next; res++; } - + return res; } @@ -966,7 +966,7 @@ YBlock::YBlock (bytecodeistream & str) } Bytecode::popUptoNamespace (this); - + // for modules ensure symbol table if (isModule ()) { @@ -1006,7 +1006,7 @@ YBlock::toStream (std::ostream & str) const // if its a module, write the table - if (isModule()) + if (isModule()) { yTElist_t *tptr = m_tenvironment; int tcount = 0; // count the table entries @@ -1099,13 +1099,13 @@ YBlock::toXml( std::ostream & str, int indent ) const #if 0 // if its a module, write the table - if (isModule()) + if (isModule()) { yTElist_t *tptr = m_tenvironment; if (tptr) { str << Xmlcode::spaces( indent ) << "\n"; - + while (tptr) { tptr->tentry->toXml( str, indent+2 ); // write the table entries @@ -1131,7 +1131,7 @@ YBlock::toXml( std::ostream & str, int indent ) const { str << Xmlcode::spaces( indent+2 ) << ""; stmt->stmt->toXml (str, 0 ); // YSImport will push it's namespace - str << "" << endl; + str << "" << endl; stmt = stmt->next; } @@ -1162,7 +1162,7 @@ YBlock::addIncluded (string includefile) { m_includes = new stringlist_t; } - + if (find (m_includes->begin (), m_includes->end (), includefile) == m_includes->end ()) { m_includes->push_back (includefile); @@ -1181,7 +1181,7 @@ YBlock::createFunctionCall (const string name, constFunctionTypePtr type) if (m_symbols[i]->name () == name && m_symbols[i]->isFunction ()) { // found - + // FIXME: handle overloading return new Y2YCPFunction (m_symbols[i]); } @@ -1192,7 +1192,7 @@ YBlock::createFunctionCall (const string name, constFunctionTypePtr type) } TableEntry *func_te = table()->find (name.c_str (), SymbolEntry::c_function); - + if (func_te == NULL) { // try local symbols @@ -1201,7 +1201,7 @@ YBlock::createFunctionCall (const string name, constFunctionTypePtr type) if (m_symbols[i]->name () == name && m_symbols[i]->isFunction ()) { // found - + // FIXME: handle overloading return new Y2YCPFunction (m_symbols[i]); } @@ -1212,9 +1212,9 @@ YBlock::createFunctionCall (const string name, constFunctionTypePtr type) } // can't find the function definition - if (!func_te->sentry ()->isFunction ()) + if (!func_te->sentry ()->isFunction ()) return NULL; - + #if DO_DEBUG y2debug ("allocating new Y2YCPFunction %s", name.c_str ()); #endif diff --git a/libycp/src/YBreakpoint.cc b/libycp/src/YBreakpoint.cc index 24421c307..7d5fde31c 100644 --- a/libycp/src/YBreakpoint.cc +++ b/libycp/src/YBreakpoint.cc @@ -90,7 +90,7 @@ YBreakpoint::toString() const return m_code->toString (); } -YCodePtr +YCodePtr YBreakpoint::code() const { return m_code; @@ -126,7 +126,7 @@ YBreakpoint::evaluate (bool cse) else y2internal ("Debugger: process input failed"); } - + return m_code->evaluate (cse); } @@ -144,7 +144,7 @@ YBreakpoint::enabled () const } void -YBreakpoint::setEnabled (bool enable) +YBreakpoint::setEnabled (bool enable) { m_enabled = enable; } diff --git a/libycp/src/YCPBoolean.cc b/libycp/src/YCPBoolean.cc index 2b6ea6875..2eabf8e20 100644 --- a/libycp/src/YCPBoolean.cc +++ b/libycp/src/YCPBoolean.cc @@ -1,14 +1,14 @@ /*---------------------------------------------------------------------\ -| | -| __ __ ____ _____ ____ | -| \ \ / /_ _/ ___|_ _|___ \ | -| \ V / _` \___ \ | | __) | | -| | | (_| |___) || | / __/ | -| |_|\__,_|____/ |_| |_____| | -| | -| core system | -| (C) SuSE GmbH | -\----------------------------------------------------------------------/ +| | +| __ __ ____ _____ ____ | +| \ \ / /_ _/ ___|_ _|___ \ | +| \ V / _` \___ \ | | __) | | +| | | (_| |___) || | / __/ | +| |_|\__,_|____/ |_| |_____| | +| | +| core system | +| (C) SuSE GmbH | +\----------------------------------------------------------------------/ File: YCPBoolean.cc @@ -98,7 +98,7 @@ YCPBoolean::YCPBoolean (bool v) YCPBoolean::YCPBoolean (bytecodeistream & str) : YCPValue (*( - Bytecode::readBool (str) ? + Bytecode::readBool (str) ? trueboolean ? trueboolean : (trueboolean = new YCPBoolean (new YCPBooleanRep (true)) ) : falseboolean ? falseboolean : (falseboolean = new YCPBoolean (new YCPBooleanRep (false)) ) diff --git a/libycp/src/YCPBuiltinBoolean.cc b/libycp/src/YCPBuiltinBoolean.cc index 6bbdd0a8c..8c810470d 100644 --- a/libycp/src/YCPBuiltinBoolean.cc +++ b/libycp/src/YCPBuiltinBoolean.cc @@ -39,8 +39,8 @@ b_lnot (const YCPBoolean &b) * !false -> true * */ - - if (b.isNull ()) + + if (b.isNull ()) return YCPNull (); return YCPBoolean (!(b->value ())); @@ -58,9 +58,9 @@ b_or (const YCPCode &b1, const YCPCode &b2) * false || true -> true * */ - + YCPValue b1_v = b1->code ()->evaluate (); - + if (b1_v.isNull () || b1_v->isVoid ()) { ycp2warning(YaST::ee.filename().c_str(), YaST::ee.linenumber(), "First operand of '||' evaluates to nil, using 'false' instead."); @@ -76,7 +76,7 @@ b_or (const YCPCode &b1, const YCPCode &b2) ycp2warning(YaST::ee.filename().c_str(), YaST::ee.linenumber(), "Second operand of '||' evaluates to nil, using 'false' instead."); return YCPBoolean (false); } - + return YCPBoolean (b2_v->asBoolean ()->value ()); } @@ -92,16 +92,16 @@ b_and (const YCPCode &b1, const YCPCode &b2) * false && true -> false * */ - + YCPValue b1_v = b1->code ()->evaluate (); - + if (b1_v.isNull () || b1_v->isVoid ()) { ycp2warning(YaST::ee.filename().c_str(), YaST::ee.linenumber(), "First operand of '&&' evaluates to nil, using 'false' instead."); return YCPBoolean (false); } - if (! b1_v->asBoolean ()->value ()) + if (! b1_v->asBoolean ()->value ()) return YCPBoolean (false); YCPValue b2_v = b2->code ()->evaluate (); @@ -110,7 +110,7 @@ b_and (const YCPCode &b1, const YCPCode &b2) ycp2warning(YaST::ee.filename().c_str(), YaST::ee.linenumber(), "Second operand of '&&' evaluates to nil, using 'false' instead."); return YCPBoolean (false); } - + return YCPBoolean (b2_v->asBoolean ()->value ()); } diff --git a/libycp/src/YCPBuiltinList.cc b/libycp/src/YCPBuiltinList.cc index 8928c7282..e898f03e5 100644 --- a/libycp/src/YCPBuiltinList.cc +++ b/libycp/src/YCPBuiltinList.cc @@ -1177,7 +1177,7 @@ l_swaplist (const YCPList &v, YCPInteger &i1, YCPInteger &i2){ * @param list v list * @param integer i1 index of first element * @param integer i2 index of second element - * @return New list. Changed if offset is correct, otherwise return unchanged list + * @return New list. Changed if offset is correct, otherwise return unchanged list * * @description * Creates new list with swaped elemetns at offset i1 and i2. Return nil if list or @@ -1213,7 +1213,7 @@ l_swaplist (const YCPList &v, YCPInteger &i1, YCPInteger &i2){ ycp2error("Index 'i2' is out of bounds for 'swap'"); return ret; } - + ret->swap(it1,it2); return ret; } @@ -1225,10 +1225,10 @@ l_reverselist (const YCPList &v){ * @id list.reverse * @short Creates new list with reversed order of elements. * @param list v list - * @return New reversed list. + * @return New reversed list. * * @description - * Creates new list with reversed order of elements. Return nil if list is nil. + * Creates new list with reversed order of elements. Return nil if list is nil. * * @usage list::reverse ([0,1,2,3]) -> [3,2,1,0] * @usage list::reverse ([]) -> [] diff --git a/libycp/src/YCPBuiltinMap.cc b/libycp/src/YCPBuiltinMap.cc index 934fbf43c..4c7bb33fa 100644 --- a/libycp/src/YCPBuiltinMap.cc +++ b/libycp/src/YCPBuiltinMap.cc @@ -51,11 +51,11 @@ m_haskey (const YCPMap &map, const YCPValue &value) * @usage haskey($["a":1, "b":2], "a") -> true * @usage haskey($["a":1, "b":2], "c") -> false */ - + if (map.isNull ()) { return YCPNull (); - } + } if (value.isNull ()) { ycp2error ("Cannot use 'nil' as key in haskey ()"); @@ -198,7 +198,7 @@ m_maplist (const YCPSymbol &key, const YCPSymbol &value, const YCPMap &map, const YCPCode &expr) { /** - * @builtin maplist + * @builtin maplist * @id maplist-map * @short Maps an operation onto all elements key/value and create a list * @description @@ -293,7 +293,7 @@ static YCPValue m_addmap (const YCPMap &map, const YCPValue &key, const YCPValue &value) { /** - * @builtin add + * @builtin add * @id add-map * @short Add a key/value pair to a map * @@ -315,7 +315,7 @@ m_addmap (const YCPMap &map, const YCPValue &key, const YCPValue &value) if (map.isNull ()) return YCPNull (); - + if (key.isNull ()) { ycp2error ("Cannot use 'nil' as key in add ()"); @@ -346,13 +346,13 @@ m_changemap (YCPMap &map, const YCPValue &key, const YCPValue &value) if (map.isNull ()) return YCPNull (); - + if (key.isNull ()) { ycp2error ("Cannot use 'nil' as key in change ()"); return YCPNull (); } - + ycpinternal ("Change does not work as expected! The argument is not passed by reference."); map->add (key, value); @@ -421,16 +421,16 @@ m_foreach (const YCPValue &key, const YCPValue &val, const YCPMap &map, const YC * KEY is bound to the key and VALUE is bound to the * value. The return value of the last execution of exp is the value * of the foreach construct. - * + * * @param any KEY * @param any VALUE * @param map MAP * @param any EXPR * @return map * - * @usage foreach (integer k, integer v, $[1:1,2:4,3:9], { y2debug("v = %1", v); return v; }) -> 9 + * @usage foreach (integer k, integer v, $[1:1,2:4,3:9], { y2debug("v = %1", v); return v; }) -> 9 */ - + if (map.isNull ()) return YCPNull (); @@ -514,7 +514,7 @@ m_remove (const YCPMap &map, const YCPValue &key) if (map.isNull ()) return YCPNull (); - + if (key.isNull ()) { ycp2error ("Cannot use 'nil' as key in remove ()"); @@ -528,7 +528,7 @@ m_remove (const YCPMap &map, const YCPValue &key) ycp2error ( "Key %s for remove () does not exist", key->toString ().c_str ()); return ret; } - + ret->remove (key); return ret; } @@ -536,16 +536,16 @@ m_remove (const YCPMap &map, const YCPValue &key) // just put here the lookup builtin docs /** * @builtin lookup - * @short Select a map element (deprecated, use MAP[KEY]:DEFAULT) + * @short Select a map element (deprecated, use MAP[KEY]:DEFAULT) * @param map MAP * @param any KEY * @param any DEFAULT * @return any * * @description - * Gets the KEY's value of a map. + * Gets the KEY's value of a map. * Returns DEFAULT - * if the key does not exist. Returns nil if the found + * if the key does not exist. Returns nil if the found * entry has a different type than the default value. * Functionality replaced with syntax: map m = $["a":1, "b":2]; * m["a"]:100 -> 1; diff --git a/libycp/src/YCPBuiltinMisc.cc b/libycp/src/YCPBuiltinMisc.cc index 1017b24c3..2d603c2bb 100644 --- a/libycp/src/YCPBuiltinMisc.cc +++ b/libycp/src/YCPBuiltinMisc.cc @@ -78,13 +78,13 @@ static YCPValue Sleep (const YCPInteger & ms) { /** - * @builtin sleep + * @builtin sleep * @short Sleeps a number of milliseconds. * @param integer MILLISECONDS Time in milliseconds * @return void * @usage sleep(3000) -> sleeps 3 sec. */ - + if (ms.isNull ()) return YCPNull (); @@ -183,10 +183,10 @@ Setenv2 (const YCPString & name, const YCPString & value, const YCPBoolean & ove * @usage setenv("PATH", "/home/user", true) */ //3rd argument (1) means that value will be overwrite if it exist - int ret = setenv(name->value().c_str(), value->value().c_str(), (overwrite->value() ? 1:0) ); + int ret = setenv(name->value().c_str(), value->value().c_str(), (overwrite->value() ? 1:0) ); if (ret == 0) { return YCPBoolean(true); - } else { + } else { ycp2error ("[Setenv1] failed %s",strerror(errno)); return YCPBoolean(false); } @@ -233,10 +233,10 @@ Getenv (const YCPString & name) * @usage getenv ("USER") -> "root" * @usage getenv ("LC_CTYPE") -> "en_US.UTF-8" */ - + char *value = getenv(name->value().c_str()); - if (value) { - string ret (value); + if (value) { + string ret (value); return YCPString(ret); } else { return YCPNull(); @@ -287,12 +287,12 @@ s_sformat (const YCPValue &format, const YCPValue &_argv) * @return string * @usage sformat ("%2 is greater %% than %1", 3, "five") -> "five is greater % than 3" */ - + if (format.isNull () || !format->isString()) { return YCPNull (); - } + } if (_argv.isNull () || !_argv->isList()) { @@ -505,7 +505,7 @@ Y2FDebug (const YCPInteger & f, const YCPString & format, const YCPList & args) // negative: print backtrace int frame = f->value (); - + Y2Debug (format, args); if (frame < 0) @@ -523,7 +523,7 @@ Y2FMilestone (const YCPInteger & f, const YCPString & format, const YCPList & ar // negative: print backtrace int frame = f->value (); - + Y2Milestone (format, args); if (frame < 0) @@ -541,7 +541,7 @@ Y2FWarning (const YCPInteger & f, const YCPString & format, const YCPList & args // negative: print backtrace int frame = f->value (); - + Y2Warning (format, args); if (frame < 0) @@ -559,7 +559,7 @@ Y2FError (const YCPInteger & f, const YCPString & format, const YCPList & args) // negative: print backtrace int frame = f->value (); - + Y2Error (format, args); if (frame < 0) @@ -577,7 +577,7 @@ Y2FSecurity (const YCPInteger & f, const YCPString & format, const YCPList & arg // negative: print backtrace int frame = f->value (); - + Y2Security (format, args); if (frame < 0) @@ -595,7 +595,7 @@ Y2FInternal (const YCPInteger & f, const YCPString & format, const YCPList & arg // negative: print backtrace int frame = f->value (); - + Y2Internal (format, args); if (frame < 0) @@ -631,7 +631,7 @@ Y2UserItem (const YCPString & format, const YCPList & args) } y2useritem ("%s", arg->value().c_str()); - + return YCPVoid(); } @@ -660,7 +660,7 @@ Y2UserNote (const YCPString & format, const YCPList & args) } y2usernote ("%s", arg->value().c_str()); - + return YCPVoid(); } diff --git a/libycp/src/YCPBuiltinPath.cc b/libycp/src/YCPBuiltinPath.cc index b60cc6290..2965bb68c 100644 --- a/libycp/src/YCPBuiltinPath.cc +++ b/libycp/src/YCPBuiltinPath.cc @@ -46,7 +46,7 @@ p_size (const YCPPath &path) * @usage size (.hello.world) -> 2 * @usage size (.) -> 0 */ - + if (path.isNull ()) return YCPNull (); diff --git a/libycp/src/YCPBuiltinStatement.cc b/libycp/src/YCPBuiltinStatement.cc index 7830ceee9..acc6d2332 100644 --- a/libycp/src/YCPBuiltinStatement.cc +++ b/libycp/src/YCPBuiltinStatement.cc @@ -1,14 +1,14 @@ /*---------------------------------------------------------------------\ -| | -| __ __ ____ _____ ____ | -| \ \ / /_ _/ ___|_ _|___ \ | -| \ V / _` \___ \ | | __) | | -| | | (_| |___) || | / __/ | -| |_|\__,_|____/ |_| |_____| | -| | -| core system | -| (C) SuSE GmbH | -\----------------------------------------------------------------------/ +| | +| __ __ ____ _____ ____ | +| \ \ / /_ _/ ___|_ _|___ \ | +| \ V / _` \___ \ | | __) | | +| | | (_| |___) || | / __/ | +| |_|\__,_|____/ |_| |_____| | +| | +| core system | +| (C) SuSE GmbH | +\----------------------------------------------------------------------/ File: YCPBuiltinStatement.cc diff --git a/libycp/src/YCPBuiltinString.cc b/libycp/src/YCPBuiltinString.cc index ff9165da2..0e55dab07 100644 --- a/libycp/src/YCPBuiltinString.cc +++ b/libycp/src/YCPBuiltinString.cc @@ -57,7 +57,7 @@ static YCPValue s_isempty(const YCPString& s) { /** - * @builtin isempty + * @builtin isempty * @id isempty-string * @short Returns whether the string s is empty. * @param string s String @@ -67,7 +67,7 @@ s_isempty(const YCPString& s) * Notice that the string s must not be nil. * * @usage isempty("") -> true - * @usage isempty("test") -> false + * @usage isempty("test") -> false */ return YCPBoolean(s->isEmpty()); @@ -89,7 +89,7 @@ s_size (const YCPString &s) * * @usage size("size") -> 4 */ - + if (s.isNull ()) return YCPNull (); @@ -128,13 +128,13 @@ s_plus2 (const YCPString &s1, const YCPInteger &i2) { /** * @operator string s1 + integer i2 -> string - * @short String and integer Concatenation + * @short String and integer Concatenation * * @description * Returns concatenation of s1 and i2 after * transforming i2 to a string. * - * Example: + * Example: * * * "YaST" + 2 -> "YaST2" @@ -158,7 +158,7 @@ s_plus3 (const YCPString &s1, const YCPPath &p2) * Returns concatenation of s1 and p2 after * transforming p2 to a string. * - * Example: + * Example: * * "YaST" + .two -> "YaST.two" * @@ -183,7 +183,7 @@ s_plus4 (const YCPString &s1, const YCPSymbol &s2) * transforming s2 to a string AND stripping the leading * backquote. * - * Example: + * Example: * * "YaST" + `two -> "YaSTtwo" * @@ -205,7 +205,7 @@ s_issubstring (const YCPString &target, const YCPString &sub) * @param string s String to be searched * @param string substring Pattern to be searched for * @return boolean - * @description + * @description * Return true, if substring is a substring of s. * * @usage issubstring ("some text", "tex") -> true @@ -280,7 +280,7 @@ s_substring1 (const YCPString &s, const YCPInteger &i1) * @param string STRING Original String * @param integer OFFSET Start position * @optarg integer LENGTH Length of new string - * @return string + * @return string * @description * * Returns the portion of STRING specified by the OFFSET @@ -397,7 +397,7 @@ s_search (const YCPString &s1, const YCPString &s2) * The search function searches string for the first occurency of * a specified substring (possibly a single character) and returns its * starting position. - * + * * Returns the first position in STRING1 where the * string STRING2 is contained in STRING1. * OFFSET starts with 0. @@ -452,7 +452,7 @@ s_find (const YCPString &s1, const YCPString &s2) * The find function searches string for the first occurency of * a specified substring (possibly a single character) and returns its * starting position. - * + * * Returns the first position in STRING1 where the * string STRING2 is contained in STRING1. * OFFSET starts with 0. @@ -526,7 +526,7 @@ static YCPValue s_toascii (const YCPString &s) { /** - * @builtin toascii + * @builtin toascii * @short Returns characters below 0x7F included in STRING * @param string STRING * @return string @@ -650,16 +650,16 @@ static YCPValue s_mergestring (const YCPList &l, const YCPString &s) { /** - * @builtin mergestring + * @builtin mergestring * @short Joins list elements with a string * @param list PIECES A List of strings * @param string GLUE - * @return string + * @return string * @description * * Returns a string containing a string representation of all the list * elements in the same order, with the glue string between each element. - * + * * List elements which are not of type strings are ignored. * * @see splitstring @@ -671,10 +671,10 @@ s_mergestring (const YCPList &l, const YCPString &s) * @usage mergestring (["abc", "dev", "ghi"], "") -> "abcdevghi" * @usage mergestring (["abc", "dev", "ghi"], "123") -> "abc123dev123ghi" */ - + if (l.isNull ()) return YCPNull (); - + if (s.isNull ()) { ycp2error ("Can't merge string using 'nil'"); @@ -728,7 +728,7 @@ s_findfirstnotof (const YCPString &s1, const YCPString &s2) * @usage findfirstnotof ("abcdefghi", "abcefghi") -> 3 * @usage findfirstnotof ("aaaaa", "a") -> nil */ - + if (s1.isNull () || s2.isNull ()) return YCPNull (); @@ -768,10 +768,10 @@ s_findfirstof (const YCPString &s1, const YCPString &s2) * * @description * The findfirstof function searches string for the first match of any - * character stored in chars and returns its position. + * character stored in chars and returns its position. + * + * If no match is found findfirstof returns `nil'. * - * If no match is found findfirstof returns `nil'. - * * @return integer the position of the first character in STRING that is * contained in CHARS. * @@ -809,7 +809,7 @@ static YCPValue s_findlastof (const YCPString &s1, const YCPString &s2) { /** - * @builtin findlastof + * @builtin findlastof * @short Searches string for the last match * @description * The `findlastof' function searches string for the last match of any @@ -863,7 +863,7 @@ s_findlastnotof (const YCPString &s1, const YCPString &s2) * position. * * If no match is found the function returns `nil'. - * + * * @return integer The position of the last character in STRING that is * NOT contained in CHARS. * @@ -984,7 +984,7 @@ Reg_Ret solve_regular_expression (const char *input, const char *pattern, } // copy the rest result_str += done; - + reg_ret.result_str = result_str; regfree (&compiled); return reg_ret; @@ -1007,7 +1007,7 @@ s_regexpmatch (const YCPString &i, const YCPString &p) * @usage regexpmatch ("aaabbbccc", "ab") -> true * @usage regexpmatch ("aaabbbccc", "^ab") -> false * @usage regexpmatch ("aaabbbccc", "ab+c") -> true - * @usage regexpmatch ("aaa(bbb)ccc", "\\(.*\\)") -> true + * @usage regexpmatch ("aaa(bbb)ccc", "\\(.*\\)") -> true */ if (i.isNull () || p.isNull ()) @@ -1027,11 +1027,11 @@ s_regexpmatch (const YCPString &i, const YCPString &p) return YCPBoolean (result.solved); } -static YCPValue +static YCPValue s_regexppos(const YCPString& inp, const YCPString& pat) { /** - * @builtin regexppos + * @builtin regexppos * @short Returns a pair with position and length of the first match. * @param string INPUT * @param string PATTERN @@ -1135,7 +1135,7 @@ s_regexptokenize (const YCPString &i, const YCPString &p) * If the pattern is invalid, 'nil' is returned. * * @usage - * Examples: + * Examples: * // e == [ "aaabbB" ] * list e = regexptokenize ("aaabbBb", "(.*[A-Z]).*"); * @@ -1181,7 +1181,7 @@ static YCPValue s_tostring (const YCPValue &v) { /** - * @builtin tostring + * @builtin tostring * @id tostring-any * @short Converts a value to a string. * @@ -1249,7 +1249,7 @@ s_crypt (const YCPString &s) * Encrypts the string UNENCRYPTED using the standard * password encryption provided by the system. * @param string UNENCRYPTED - * @return string + * @return string * * @usage crypt ("readable") -> "Y2PEyAiaeaFy6" */ @@ -1301,7 +1301,7 @@ s_cryptmd5 (const YCPString &s) } -static YCPValue +static YCPValue s_cryptblowfish(const YCPString& original) { /** @@ -1399,7 +1399,7 @@ s_dgettext (const YCPString& domain, const YCPString& text) { /** * @operator _(string text) -> string - * Translates the text using the current textdomain. + * Translates the text using the current textdomain. * * Example
      * _("File") -> "Soubor"
@@ -1422,20 +1422,20 @@ s_dgettext (const YCPString& domain, const YCPString& text)
      * @usage dgettext ("base", "No") -> "Nie"
      */
 
-    if (domain.isNull () || domain->isVoid ()) 
+    if (domain.isNull () || domain->isVoid ())
     {
 	return YCPNull ();
     }
 
     // initialize text domain if not done so
-    string dom = domain->value ();    
+    string dom = domain->value ();
     YLocale::ensureBindDomain (dom);
-    
+
     if (text.isNull () || text->isVoid ())
     {
 	return YCPNull ();
     }
-    
+
     return YCPString (dgettext (dom.c_str(), text->value().c_str()));
 }
 
@@ -1445,8 +1445,8 @@ s_dngettext (const YCPString& domain, const YCPString& singular, const YCPString
 {
     /**
      * @operator _(string singular, string plural, integer value) -> string
-     * Translates the text using a locale-aware plural form handling and the 
-     * current textdomain. The chosen form of the translation depends 
+     * Translates the text using a locale-aware plural form handling and the
+     * current textdomain. The chosen form of the translation depends
      * on the value.
      *
      * Example 
@@ -1475,22 +1475,22 @@ s_dngettext (const YCPString& domain, const YCPString& singular, const YCPString
      * @usage dngettext ("base", "%1 File", "%1 Files", 2) -> "%1 soubory"
      */
 
-    if (domain.isNull () || domain->isVoid ()) 
+    if (domain.isNull () || domain->isVoid ())
     {
 	return YCPNull ();
     }
 
     // initialize text domain if not done so
-    string dom = domain->value ();    
+    string dom = domain->value ();
     YLocale::ensureBindDomain (dom);
-    
+
     if (singular.isNull () || singular->isVoid ()
 	|| plural.isNull () || plural->isVoid ()
 	|| count.isNull () || count->isVoid ())
     {
 	return YCPNull ();
     }
-    
+
     return YCPString (dngettext (domain->value().c_str(), singular->value().c_str(), plural->value().c_str(), count->value()));
 }
 
@@ -1518,7 +1518,7 @@ s_dpgettext (const YCPString& domain, const YCPString& domain_path, const YCPStr
 
     if ((domain.isNull () || domain->isVoid ()) ||
 	(domain_path.isNull () || domain_path->isVoid ()) ||
-	(text.isNull () || text->isVoid ())) 
+	(text.isNull () || text->isVoid ()))
     {
 	return YCPNull ();
     }
@@ -1528,7 +1528,7 @@ s_dpgettext (const YCPString& domain, const YCPString& domain_path, const YCPStr
     string dom_path = domain_path->value ();
 
     // check if domain exist
-    // it is important to bind domain back (LOCALEDIR) 
+    // it is important to bind domain back (LOCALEDIR)
     // if it is already binded
     bool known_domain = false;
     if (YLocale::findDomain(dom))
diff --git a/libycp/src/YCPBuiltinTerm.cc b/libycp/src/YCPBuiltinTerm.cc
index acef8a00b..74749a896 100644
--- a/libycp/src/YCPBuiltinTerm.cc
+++ b/libycp/src/YCPBuiltinTerm.cc
@@ -38,7 +38,7 @@ t_size (const YCPTerm &term)
      * @id size-term
      * @short Returns the number of arguments of the term TERM.
      *
-     * @param term TERM 
+     * @param term TERM
      * @return integer Size of the TERM
      *
      * @usage size (`VBox(`Empty(),`Empty(),`Empty())) -> 3
@@ -62,8 +62,8 @@ t_add (const YCPTerm &term, const YCPValue &value)
      * Adds the value VALUE to the term TERM and returns the
      * newly created term. As always in YCP, TERM is not modified.
      *
-     * @param term TERM 
-     * @param any VALUE 
+     * @param term TERM
+     * @param any VALUE
      * @return term
      *
      * @see remove
diff --git a/libycp/src/YCPExternal.cc b/libycp/src/YCPExternal.cc
index 9fd49ed35..a999bf85e 100644
--- a/libycp/src/YCPExternal.cc
+++ b/libycp/src/YCPExternal.cc
@@ -1,14 +1,14 @@
 /*---------------------------------------------------------------------\
-|                                                                      |  
-|                      __   __    ____ _____ ____                      |  
-|                      \ \ / /_ _/ ___|_   _|___ \                     |  
-|                       \ V / _` \___ \ | |   __) |                    |  
-|                        | | (_| |___) || |  / __/                     |  
-|                        |_|\__,_|____/ |_| |_____|                    |  
-|                                                                      |  
-|                               core system                            | 
-|                                                        (C) SuSE GmbH |  
-\----------------------------------------------------------------------/ 
+|                                                                      |
+|                      __   __    ____ _____ ____                      |
+|                      \ \ / /_ _/ ___|_   _|___ \                     |
+|                       \ V / _` \___ \ | |   __) |                    |
+|                        | | (_| |___) || |  / __/                     |
+|                        |_|\__,_|____/ |_| |_____|                    |
+|                                                                      |
+|                               core system                            |
+|                                                        (C) SuSE GmbH |
+\----------------------------------------------------------------------/
 
    File:       YCPExternal.cc
 
@@ -35,7 +35,7 @@ YCPExternalRep::YCPExternalRep(void * payload, string magic, void (*destructor)(
 
 YCPExternalRep::~YCPExternalRep()
 {
-    if (m_destructor) 
+    if (m_destructor)
 	(*m_destructor)(m_payload, m_magic);
 }
 
diff --git a/libycp/src/YCPFloat.cc b/libycp/src/YCPFloat.cc
index d2745984d..9a5d4da1a 100644
--- a/libycp/src/YCPFloat.cc
+++ b/libycp/src/YCPFloat.cc
@@ -1,14 +1,14 @@
 /*---------------------------------------------------------------------\
-|                                                                      |  
-|                      __   __    ____ _____ ____                      |  
-|                      \ \ / /_ _/ ___|_   _|___ \                     |  
-|                       \ V / _` \___ \ | |   __) |                    |  
-|                        | | (_| |___) || |  / __/                     |  
-|                        |_|\__,_|____/ |_| |_____|                    |  
-|                                                                      |  
-|                               core system                            | 
-|                                                        (C) SuSE GmbH |  
-\----------------------------------------------------------------------/ 
+|                                                                      |
+|                      __   __    ____ _____ ____                      |
+|                      \ \ / /_ _/ ___|_   _|___ \                     |
+|                       \ V / _` \___ \ | |   __) |                    |
+|                        | | (_| |___) || |  / __/                     |
+|                        |_|\__,_|____/ |_| |_____|                    |
+|                                                                      |
+|                               core system                            |
+|                                                        (C) SuSE GmbH |
+\----------------------------------------------------------------------/
 
    File:       YCPFloat.cc
 
@@ -46,7 +46,7 @@ YCPFloatRep::YCPFloatRep(const char *r)
 	(*endptr == 'e' && *(endptr+1) == '+' && isdigit(*(endptr+2)))||
 	(*endptr == 'E' && isdigit(*(endptr+1))                      )||
 	(*endptr == 'E' && *(endptr+1) == '-' && isdigit(*(endptr+2)))||
-	(*endptr == 'E' && *(endptr+1) == '+' && isdigit(*(endptr+2)))   )   // real float  
+	(*endptr == 'E' && *(endptr+1) == '+' && isdigit(*(endptr+2)))   )   // real float
     {
       istringstream ss(r);
       ss.imbue(std::locale::classic()); //ensure that we are not affected by LC_NUMERIC
diff --git a/libycp/src/YCPInteger.cc b/libycp/src/YCPInteger.cc
index 4f54d69c4..5ffd9852f 100644
--- a/libycp/src/YCPInteger.cc
+++ b/libycp/src/YCPInteger.cc
@@ -1,14 +1,14 @@
 /*---------------------------------------------------------------------\
-|                                                                      |  
-|                      __   __    ____ _____ ____                      |  
-|                      \ \ / /_ _/ ___|_   _|___ \                     |  
-|                       \ V / _` \___ \ | |   __) |                    |  
-|                        | | (_| |___) || |  / __/                     |  
-|                        |_|\__,_|____/ |_| |_____|                    |  
-|                                                                      |  
-|                               core system                            | 
-|                                                        (C) SuSE GmbH |  
-\----------------------------------------------------------------------/ 
+|                                                                      |
+|                      __   __    ____ _____ ____                      |
+|                      \ \ / /_ _/ ___|_   _|___ \                     |
+|                       \ V / _` \___ \ | |   __) |                    |
+|                        | | (_| |___) || |  / __/                     |
+|                        |_|\__,_|____/ |_| |_____|                    |
+|                                                                      |
+|                               core system                            |
+|                                                        (C) SuSE GmbH |
+\----------------------------------------------------------------------/
 
    File:       YCPInteger.cc
 
@@ -34,7 +34,7 @@ YCPIntegerRep::YCPIntegerRep(long long v)
 
 YCPIntegerRep::YCPIntegerRep(const char *r, bool *valid)
 {
-    
+
     int converted;
     if (r && r[0] == '0')
     {
diff --git a/libycp/src/YCPMap.cc b/libycp/src/YCPMap.cc
index 34b7c2edd..1a4719c99 100644
--- a/libycp/src/YCPMap.cc
+++ b/libycp/src/YCPMap.cc
@@ -1,14 +1,14 @@
 /*---------------------------------------------------------------------\
-|                                                                      |  
-|                      __   __    ____ _____ ____                      |  
-|                      \ \ / /_ _/ ___|_   _|___ \                     |  
-|                       \ V / _` \___ \ | |   __) |                    |  
-|                        | | (_| |___) || |  / __/                     |  
-|                        |_|\__,_|____/ |_| |_____|                    |  
-|                                                                      |  
-|                               core system                            | 
-|                                                        (C) SuSE GmbH |  
-\----------------------------------------------------------------------/ 
+|                                                                      |
+|                      __   __    ____ _____ ____                      |
+|                      \ \ / /_ _/ ___|_   _|___ \                     |
+|                       \ V / _` \___ \ | |   __) |                    |
+|                        | | (_| |___) || |  / __/                     |
+|                        |_|\__,_|____/ |_| |_____|                    |
+|                                                                      |
+|                               core system                            |
+|                                                        (C) SuSE GmbH |
+\----------------------------------------------------------------------/
 
    File:       YCPMap.cc
 
diff --git a/libycp/src/YCPPath.cc b/libycp/src/YCPPath.cc
index 810f455aa..9ee378d3c 100644
--- a/libycp/src/YCPPath.cc
+++ b/libycp/src/YCPPath.cc
@@ -1,14 +1,14 @@
 /*---------------------------------------------------------------------\
-|								      |  
-|		      __   __    ____ _____ ____		      |  
-|		      \ \ / /_ _/ ___|_   _|___ \		     |  
-|		       \ V / _` \___ \ | |   __) |		    |  
-|			| | (_| |___) || |  / __/		     |  
-|			|_|\__,_|____/ |_| |_____|		    |  
-|								      |  
-|			       core system			    | 
-|							(C) SuSE GmbH |  
-\----------------------------------------------------------------------/ 
+|								      |
+|		      __   __    ____ _____ ____		      |
+|		      \ \ / /_ _/ ___|_   _|___ \		     |
+|		       \ V / _` \___ \ | |   __) |		    |
+|			| | (_| |___) || |  / __/		     |
+|			|_|\__,_|____/ |_| |_____|		    |
+|								      |
+|			       core system			    |
+|							(C) SuSE GmbH |
+\----------------------------------------------------------------------/
 
    File:       YCPPath.cc
 
@@ -116,7 +116,7 @@ YCPPathRep::append(string c)
 YCPValue
 YCPPathRep::select(const YCPValue& val)
 {
-    return val; 
+    return val;
     // TODO: do real operation
 }
 
diff --git a/libycp/src/YCPString.cc b/libycp/src/YCPString.cc
index 4afe7760d..44055bf8b 100644
--- a/libycp/src/YCPString.cc
+++ b/libycp/src/YCPString.cc
@@ -1,14 +1,14 @@
 /*---------------------------------------------------------------------\
-|                                                                      |  
-|                      __   __    ____ _____ ____                      |  
-|                      \ \ / /_ _/ ___|_   _|___ \                     |  
-|                       \ V / _` \___ \ | |   __) |                    |  
-|                        | | (_| |___) || |  / __/                     |  
-|                        |_|\__,_|____/ |_| |_____|                    |  
-|                                                                      |  
-|                               core system                            | 
-|                                                        (C) SuSE GmbH |  
-\----------------------------------------------------------------------/ 
+|                                                                      |
+|                      __   __    ____ _____ ____                      |
+|                      \ \ / /_ _/ ___|_   _|___ \                     |
+|                       \ V / _` \___ \ | |   __) |                    |
+|                        | | (_| |___) || |  / __/                     |
+|                        |_|\__,_|____/ |_| |_____|                    |
+|                                                                      |
+|                               core system                            |
+|                                                        (C) SuSE GmbH |
+\----------------------------------------------------------------------/
 
    File:       YCPString.cc
 
diff --git a/libycp/src/YCPSymbol.cc b/libycp/src/YCPSymbol.cc
index 3ab9dd3f4..dfce8d5d8 100644
--- a/libycp/src/YCPSymbol.cc
+++ b/libycp/src/YCPSymbol.cc
@@ -1,14 +1,14 @@
 /*---------------------------------------------------------------------\
-|                                                                      |  
-|                      __   __    ____ _____ ____                      |  
-|                      \ \ / /_ _/ ___|_   _|___ \                     |  
-|                       \ V / _` \___ \ | |   __) |                    |  
-|                        | | (_| |___) || |  / __/                     |  
-|                        |_|\__,_|____/ |_| |_____|                    |  
-|                                                                      |  
-|                               core system                            | 
-|                                                        (C) SuSE GmbH |  
-\----------------------------------------------------------------------/ 
+|                                                                      |
+|                      __   __    ____ _____ ____                      |
+|                      \ \ / /_ _/ ___|_   _|___ \                     |
+|                       \ V / _` \___ \ | |   __) |                    |
+|                        | | (_| |___) || |  / __/                     |
+|                        |_|\__,_|____/ |_| |_____|                    |
+|                                                                      |
+|                               core system                            |
+|                                                        (C) SuSE GmbH |
+\----------------------------------------------------------------------/
 
    File:       YCPSymbol.cc
 
diff --git a/libycp/src/YCPTerm.cc b/libycp/src/YCPTerm.cc
index 18b618910..fff63f9b7 100644
--- a/libycp/src/YCPTerm.cc
+++ b/libycp/src/YCPTerm.cc
@@ -1,14 +1,14 @@
 /*---------------------------------------------------------------------\
-|                                                                      |  
-|                      __   __    ____ _____ ____                      |  
-|                      \ \ / /_ _/ ___|_   _|___ \                     |  
-|                       \ V / _` \___ \ | |   __) |                    |  
-|                        | | (_| |___) || |  / __/                     |  
-|                        |_|\__,_|____/ |_| |_____|                    |  
-|                                                                      |  
-|                               core system                            | 
-|                                                        (C) SuSE GmbH |  
-\----------------------------------------------------------------------/ 
+|                                                                      |
+|                      __   __    ____ _____ ____                      |
+|                      \ \ / /_ _/ ___|_   _|___ \                     |
+|                       \ V / _` \___ \ | |   __) |                    |
+|                        | | (_| |___) || |  / __/                     |
+|                        |_|\__,_|____/ |_| |_____|                    |
+|                                                                      |
+|                               core system                            |
+|                                                        (C) SuSE GmbH |
+\----------------------------------------------------------------------/
 
    File:       YCPTerm.cc
 		YCPTerm data type
@@ -33,7 +33,7 @@ YCPTermRep::YCPTermRep(const string& s)
 
 YCPTermRep::YCPTermRep(const string& s, const YCPList& l)
     : s(Ustring (*SymbolEntry::_nameHash, s))
-    , l(l) 
+    , l(l)
 {
 }
 
diff --git a/libycp/src/YCPValue.cc b/libycp/src/YCPValue.cc
index 08bbbf16d..ddacd3338 100644
--- a/libycp/src/YCPValue.cc
+++ b/libycp/src/YCPValue.cc
@@ -57,7 +57,7 @@ YCPValueRep::valuetype_str () const
 
 // value type checking
 
-bool YCPValueRep::isVoid()        const { return valuetype() == YT_VOID 
+bool YCPValueRep::isVoid()        const { return valuetype() == YT_VOID
 						|| valuetype() == YT_RETURN; }
 bool YCPValueRep::isBoolean()     const { return valuetype() == YT_BOOLEAN; }
 bool YCPValueRep::isInteger()     const { return valuetype() == YT_INTEGER; }
diff --git a/libycp/src/YCPVoid.cc b/libycp/src/YCPVoid.cc
index c0ad93541..a31b6af84 100644
--- a/libycp/src/YCPVoid.cc
+++ b/libycp/src/YCPVoid.cc
@@ -1,19 +1,19 @@
 /*---------------------------------------------------------------------\
-|                                                                      |  
-|                      __   __    ____ _____ ____                      |  
-|                      \ \ / /_ _/ ___|_   _|___ \                     |  
-|                       \ V / _` \___ \ | |   __) |                    |  
-|                        | | (_| |___) || |  / __/                     |  
-|                        |_|\__,_|____/ |_| |_____|                    |  
-|                                                                      |  
-|                               core system                            | 
-|                                                        (C) SuSE GmbH |  
-\----------------------------------------------------------------------/ 
+|                                                                      |
+|                      __   __    ____ _____ ____                      |
+|                      \ \ / /_ _/ ___|_   _|___ \                     |
+|                       \ V / _` \___ \ | |   __) |                    |
+|                        | | (_| |___) || |  / __/                     |
+|                        |_|\__,_|____/ |_| |_____|                    |
+|                                                                      |
+|                               core system                            |
+|                                                        (C) SuSE GmbH |
+\----------------------------------------------------------------------/
 
    File:       YCPVoid.cc
 
    Author:	Klaus Kaempf 
-   Maintainer:	
+   Maintainer:
 
 /-*/
 
diff --git a/libycp/src/YCode.cc b/libycp/src/YCode.cc
index 416784bee..a2efee231 100644
--- a/libycp/src/YCode.cc
+++ b/libycp/src/YCode.cc
@@ -529,7 +529,7 @@ YLocale::YLocale (bytecodeistream & str)
     {
 	domains.insert (std::make_pair(dom,false));
 	m_domain = domains.find (dom);
-    }    
+    }
 }
 
 
@@ -613,10 +613,10 @@ YLocale::findDomain(const string& domain)
 }
 
 
-void 
+void
 YLocale::ensureBindDomain (const string& domain)
 {
-    if (domains.find (domain.c_str ()) == domains.end () 
+    if (domains.find (domain.c_str ()) == domains.end ()
 	|| ! domains[domain.c_str ()])
     {
 	bindDomainDir (domain, LOCALEDIR);
@@ -624,7 +624,7 @@ YLocale::ensureBindDomain (const string& domain)
 }
 
 
-void 
+void
 YLocale::bindDomainDir (const string& domain, const string& domain_path)
 {
 
@@ -634,7 +634,7 @@ YLocale::bindDomainDir (const string& domain, const string& domain_path)
     bindtextdomain (domain.c_str (), domain_path.c_str());
     bind_textdomain_codeset (domain.c_str (), "UTF-8");
     setDomainStatus (domain, true);
- 
+
 }
 
 // ------------------------------------------------------------------
@@ -699,7 +699,7 @@ YFunction::setDefinition (bytecodeistream & str)
 	{
 	    Bytecode::pushNamespace (m_declaration->nameSpace());
 	}
-	
+
 	YBlockPtr def = (YBlockPtr)Bytecode::readCode (str);
 	def->setKind (YBlock::b_definition);
 
diff --git a/libycp/src/YExpression.cc b/libycp/src/YExpression.cc
index 297bb48f2..88c982179 100644
--- a/libycp/src/YExpression.cc
+++ b/libycp/src/YExpression.cc
@@ -180,7 +180,7 @@ YEReference::YEReference (bytecodeistream & str)
 }
 
 
-SymbolEntryPtr 
+SymbolEntryPtr
 YEReference::entry() const
 {
     return m_entry;
@@ -829,7 +829,7 @@ constTypePtr
 YEList::type () const
 {
     ycodelist_t *element = m_first;
-    
+
     constTypePtr res = m_first->code->type ();
     element = element->next;
 
@@ -838,7 +838,7 @@ YEList::type () const
 	res = res->commontype (element->code->type ());
 	element = element->next;
     }
-    
+
     return new ListType (res);
 }
 
@@ -1026,7 +1026,7 @@ YEMap::type () const
 	res_value = res_value->commontype (element->value->type ());
 	element = element->next;
     }
-    
+
     return new MapType (res_key, res_value);
 }
 
@@ -1191,7 +1191,7 @@ YEPropagate::evaluate (bool cse)
     {
 	return YCPInteger ((long long)(v->asFloat()->value()));
     }
-    else if (v->isReference () 
+    else if (v->isReference ()
 	&& m_to->match (v->asReference ()->entry ()->type ()) == 0)
     {
 	return v;
@@ -1457,20 +1457,20 @@ YEBinary::type () const
 	FunctionTypePtr ft = new FunctionType (Type::Unspec);
 	ft->concat (m_arg1->type ());
 	ft->concat (m_arg2->type ());
-	
+
 	constTypePtr cft = Type::determineFlexType (ft, m_decl->type);
         if (cft == 0)                                       // failed
         {
 	    y2internal ("Cannot determine type of the binary operator: %s", toString ().c_str ());
             return Type::Unspec;
         }
-	
+
 	return ((constFunctionTypePtr)cft)->returnType ();
 
     }
     else
     {
-	return ((constFunctionTypePtr)m_decl->type)->returnType (); 
+	return ((constFunctionTypePtr)m_decl->type)->returnType ();
     }
 }
 
@@ -1627,7 +1627,7 @@ YEIs::evaluate (bool cse)
     if (value->isCode())				// value is YCode
     {
 	YCodePtr code = value->asCode()->code();
-	
+
 	// is it a function? => function pointer
 	if (code->kind () != YCode::ycFunction)
 	{
@@ -2045,7 +2045,7 @@ YEBuiltin::toXml( std::ostream & str, int indent ) const
     else {
 	Xmlcode::writeYCodelist( str, m_parameters );
     }
-    
+
     if (m_parameterblock != 0)
     {
 	Xmlcode::popNamespace( m_parameterblock->nameSpace() );
@@ -2093,7 +2093,7 @@ constTypePtr
 YEBuiltin::finalize (Logger* problem_logger)
 {
     extern StaticDeclaration static_declarations;
-    
+
 #if DO_DEBUG
     y2debug ("YEBuiltin::finalize (%s)", StaticDeclaration::Decl2String (m_decl, true).c_str());
     y2debug ("m_type: %s", m_type->toString ().c_str());
@@ -2188,9 +2188,9 @@ YEBuiltin::finalize (Logger* problem_logger)
 	    if (*cptr == '%')
 	    {
 		cptr++;
-		
+
 		int number = 0;
-		
+
 		if ( (*cptr) > '0' && (*cptr) <= '9' )
 		{
 		    number = (*cptr)-'0'; // for more digits use atoi (cptr);
@@ -2583,7 +2583,7 @@ YEBuiltin::evaluate (bool cse)
     else
     {
 	if (m_parameterblock) m_parameterblock->pushToStack ();
-	
+
 	switch (type->parameterCount ())
 	{
 	    case 0:
@@ -2648,7 +2648,7 @@ YECall::YECall (TableEntry* entry)
     // lookup the maximal number of parameters for this entry (and overloads)
     // retrieve function type for formal parameter list
     int max = 0;
-    
+
     TableEntry* t = entry;
     while (t)
     {
@@ -2657,10 +2657,10 @@ YECall::YECall (TableEntry* entry)
 	{
 	    max = curr;
 	}
-	
+
 	t = t->next_overloaded ();
     }
-    
+
     if (max>0)
     {
 	m_parameters = new YCodePtr[max];
@@ -2683,7 +2683,7 @@ YECall::YECall (bytecodeistream & str)
     if (count>0)
     {
 	m_parameters = new YCodePtr[count];
-	
+
 	for (uint i = 0 ; i < count; i++)
 	{
 	    m_parameters[i] = Bytecode::readCode (str);
@@ -2694,7 +2694,7 @@ YECall::YECall (bytecodeistream & str)
 	    }
 	}
     }
-    
+
     m_next_param_id = count;
 
 #if DO_DEBUG
@@ -2709,7 +2709,7 @@ YECall::~YECall ()
     {
 	delete[] m_parameters;
     }
-    
+
     if (m_parameter_types)
     {
 	delete[] m_parameter_types;
@@ -2736,12 +2736,12 @@ YECallPtr YECall::readCall (bytecodeistream & str)
     YECallPtr res = 0;
 
     SymbolEntryPtr sentry = Bytecode::readEntry (str);
-    
+
     if (!sentry)
     {
 	return 0;
     }
-    
+
     if (str.isVersion (1,3,2) && sentry->isVariable ())
     {
 	// it is a function pointer from SLES9/9.1
@@ -2752,12 +2752,12 @@ YECallPtr YECall::readCall (bytecodeistream & str)
 	// it is direct function call
 	res = new YEFunction (0);
     }
-    
+
     res->m_sentry = sentry;
-    
+
     // read the parameters
     u_int32_t count = Bytecode::readInt32 (str);
-    
+
     if (count>0)
     {
 	res->m_parameters = new YCodePtr[count];
@@ -2780,7 +2780,7 @@ YECallPtr YECall::readCall (bytecodeistream & str)
 
 
 
-const SymbolEntryPtr 
+const SymbolEntryPtr
 YECall::entry() const
 {
     return m_sentry;
@@ -2812,7 +2812,7 @@ YECall::attachParameter (YCodePtr code, constTypePtr type)
     {
 	return Type::Unspec;
     }
-    
+
     // check, if there is not too many of params
     if ((m_parameters == 0)
 	|| (m_parameter_types == 0))
@@ -2820,7 +2820,7 @@ YECall::attachParameter (YCodePtr code, constTypePtr type)
 	// excessive parameter - we don't expect any
 	return Type::Error;
     }
-    
+
     // find next parameter slot to be filled, loop through chain
     //  of overloaded functions
 
@@ -2836,7 +2836,7 @@ YECall::attachParameter (YCodePtr code, constTypePtr type)
 
         t = t->next_overloaded ();
     }
-    
+
     if (m_next_param_id >= max)
     {
 	return Type::Error;
@@ -2869,7 +2869,7 @@ YECall::finalize()
     while (entry)
     {
 	// now check the parameters really. if they don't match,
-	// lookup also the overloaded ones    
+	// lookup also the overloaded ones
 	SymbolEntryPtr sentry = entry->sentry ();
 
 	// prepare the overloaded one, if exists
@@ -2877,7 +2877,7 @@ YECall::finalize()
 
 	// retrieve function type for formal parameter list
 	constFunctionTypePtr ftype = sentry->type();
-	
+
 	// not the correct number of parameters?
 	if ((int)m_next_param_id != ftype->parameterCount())
 	{
@@ -2885,7 +2885,7 @@ YECall::finalize()
 	    entry = next_overloaded;
 	    continue;
 	}
-    
+
 	bool accept = true;
 	// ok, check whether types match
 	for (uint check_count = 0; check_count < m_next_param_id ; check_count++)
@@ -2893,7 +2893,7 @@ YECall::finalize()
 	    constTypePtr expected_type = ftype->parameterType (check_count);
 	    YCodePtr code = m_parameters[check_count];
 	    constTypePtr type = m_parameter_types[check_count];
-	    
+
 	    // if the parameter type is block, find out the type for the actual param
 	    if (expected_type->isBlock ())
 	    {
@@ -2932,14 +2932,14 @@ YECall::finalize()
 		{
 #if DO_DEBUG
 		    y2debug ("Can't reference to type propagation '%s' -> '%s'", type->toString().c_str(), expected_type->toString().c_str());
-#endif		    
+#endif
 		    entry = next_overloaded;
 		    accept = false;
 		    break;
 		}
 	    }
 	}
-	
+
 	if (accept)
 	{
 #if DO_DEBUG
@@ -2950,7 +2950,7 @@ YECall::finalize()
 	    {
 		constTypePtr expected_type = ftype->parameterType (check_count);
 		constTypePtr type = m_parameters[check_count]->type ();
-	    
+
 		// if the parameter type is block, find out the type for the actual param
 		if (expected_type->isBlock ())
 		{
@@ -2973,7 +2973,7 @@ YECall::finalize()
 		    m_parameters[check_count] = new YEPropagate (m_parameters[check_count], type, expected_type);
 		}
 	    }
-	    
+
 	    // update the sentry
 	    m_entry = entry;
 	    m_sentry = m_entry->sentry ();
@@ -2996,7 +2996,7 @@ YECall::toString() const
     string s = m_sentry->toString(false);
 
     s += " (";
-    
+
     for (uint i = 0 ; i < m_next_param_id ; i++)
     {
 	s += m_parameters[i]->toString().c_str();
@@ -3107,7 +3107,7 @@ YEFunction::evaluate (bool cse)
     y2debug ("YEFunction::evaluate (%s)\n", toString().c_str());
 #endif
 
-    
+
     if (!m_functioncall)
     {
 	m_functioncall = const_cast(m_sentry->nameSpace())->createFunctionCall (m_sentry->name (), m_sentry->type ());
@@ -3125,7 +3125,7 @@ YEFunction::evaluate (bool cse)
 	    return YCPVoid ();
 	}
     }
-    
+
     YCPValue evaluated_params [m_next_param_id];
 
     for (unsigned int p = 0; p < m_next_param_id ; p++)
@@ -3139,7 +3139,7 @@ YEFunction::evaluate (bool cse)
 	    ycp2error ("Parameter eval failed (%s)", m_parameters[p]->toString().c_str());
 	    return value;
 	}
-	
+
 #if DO_DEBUG
 	y2debug ("parameter %d = (%s)", p, value->toString().c_str());
 #endif
@@ -3152,7 +3152,7 @@ YEFunction::evaluate (bool cse)
     {
 	m_functioncall->attachParameter (evaluated_params[p], p);
     }
-    
+
     // save the context info
     int linenumber = YaST::ee.linenumber();
     string filename = YaST::ee.filename();
@@ -3170,7 +3170,7 @@ YEFunction::evaluate (bool cse)
     // restore the context info
     YaST::ee.setLinenumber(linenumber);
     YaST::ee.setFilename(filename);
-    
+
     YaST::ee.popframe();
 
 #if DO_DEBUG
@@ -3192,12 +3192,12 @@ constTypePtr
 YEFunction::finalize()
 {
     constTypePtr res = YECall::finalize ();
-    
+
     if (res != 0)
     {
 	return res;
     }
-    
+
     m_functioncall = const_cast(m_sentry->nameSpace())->createFunctionCall (m_sentry->name (), m_sentry->type ());
     if (m_functioncall == 0)
     {
@@ -3247,7 +3247,7 @@ YEFunctionPointer::evaluate (bool cse)
 	    , ptr.isNull () ? "NULL" : ptr->toString ().c_str ());
 	return YCPVoid ();
     }
-    
+
     SymbolEntryPtr ptr_sentry = ptr->asReference ()->entry ();
 
     Y2Namespace* ns = const_cast (ptr_sentry->nameSpace ());
@@ -3256,16 +3256,16 @@ YEFunctionPointer::evaluate (bool cse)
 	ptr_sentry->name (),
 	ptr_sentry->type ()
     );
-    
+
     if (!m_functioncall)
     {
 	y2internal ("Cannot get function call object for %s", m_sentry->toString().c_str());
 	return YCPVoid ();
     }
 
-    // FIXME: this could fail    
+    // FIXME: this could fail
     m_functioncall->reset ();
-    
+
     YCPValue m_params [m_next_param_id];
 
     for (unsigned int p = 0; p < m_next_param_id ; p++)
@@ -3279,7 +3279,7 @@ YEFunctionPointer::evaluate (bool cse)
 	    ycp2error ("Parameter eval failed (%s)", m_parameters[p]->toString().c_str());
 	    return value;
 	}
-	
+
 #if DO_DEBUG
 	y2debug ("parameter %d = (%s)", p, value->toString().c_str());
 #endif
@@ -3292,7 +3292,7 @@ YEFunctionPointer::evaluate (bool cse)
     {
 	m_functioncall->attachParameter (m_params[p], p);
     }
-    
+
     // save the context info
     int linenumber = YaST::ee.linenumber();
     string filename = YaST::ee.filename();
@@ -3322,11 +3322,11 @@ Y2YCPFunction::Y2YCPFunction (YSymbolEntryPtr entry)
     y2debug ("Y2YCPFunction[%p] (%s)", this, entry->toString().c_str());
 #endif
     // cleanup an array for the parameters
-    
+
     uint count = ((constFunctionTypePtr)(m_sentry->type ()))->parameterCount ();
-    
+
     m_parameters = new YCPValue[count];
-    
+
     for (uint i=0; i < count; i++)
     {
 	m_parameters[i] = YCPNull ();
@@ -3385,7 +3385,7 @@ Y2YCPFunction::evaluateCall ()
 
 	    return value;
 	}
-	
+
 	SymbolEntryPtr formalp = func->parameter (p);
 #if DO_DEBUG
 	y2debug ("formalp (%s) = (%s)", formalp->toString().c_str(), value->toString().c_str());
@@ -3393,7 +3393,7 @@ Y2YCPFunction::evaluateCall ()
 
 	formalp->setValue (value);
     }
-    
+
     // save the context info
     int linenumber = YaST::ee.linenumber();
     string filename = YaST::ee.filename();
@@ -3447,7 +3447,7 @@ Y2YCPFunction::wantedParameterType () const
 	    return param_tp;
 	}
     }
-    
+
     // all parameters done
     return Type::Unspec;
 }
@@ -3476,7 +3476,7 @@ Y2YCPFunction::appendParameter (const YCPValue& arg)
     }
 
     // FIXME: check the type
-    
+
     // lookup the first non-set parameter
     for (int i = 0 ; i < ((constFunctionTypePtr)(m_sentry->type ()))->parameterCount (); i++)
     {
@@ -3484,12 +3484,12 @@ Y2YCPFunction::appendParameter (const YCPValue& arg)
 	{
 #if DO_DEBUG
 	    y2debug ("Assigning parameter %d: %s", i, arg->toString ().c_str ());
-#endif	    
+#endif
 	    m_parameters[i] = arg;
 	    return true;
 	}
     }
-    
+
     // Our caller should report the place
     // in a script where this happened
     ycp2error ("Excessive parameter to %s", qualifiedName ().c_str ());
diff --git a/libycp/src/YStatement.cc b/libycp/src/YStatement.cc
index e443e9c12..6f7babe3d 100644
--- a/libycp/src/YStatement.cc
+++ b/libycp/src/YStatement.cc
@@ -376,7 +376,7 @@ YSReturn::~YSReturn ()
 }
 
 
-YCodePtr 
+YCodePtr
 YSReturn::value() const
 {
     return m_value;
@@ -810,7 +810,7 @@ YSBracket::commit (YCPValue current, int idx, YCPList arg, YCPValue value)
     if (current.isNull ())
     {
 	YCPList correct_until;
-	
+
 	for (int i = 0 ; i < idx ; i++)
 	{
 	    correct_until->add (arg->value (i));
@@ -819,7 +819,7 @@ YSBracket::commit (YCPValue current, int idx, YCPList arg, YCPValue value)
 	ycp2error ("Intermediate structure with index %s does not exist", correct_until->toString ().c_str ());
 	return YCPNull ();
     }
-#if DO_DEBUG	
+#if DO_DEBUG
     y2debug ("commit (%s, %d, %s, %s)", current->toString().c_str(), idx, arg->toString().c_str(), value.isNull () ? "nil" : value->toString().c_str());
 #endif
     YCPValue argval = arg->value (idx);
@@ -839,7 +839,7 @@ YSBracket::commit (YCPValue current, int idx, YCPList arg, YCPValue value)
 
 	YCPList list = current->asList();
 	int argint = argval->asInteger()->value();
-	
+
 	YCPValue val = value;
 
 	//  not the end of the argument list, continue
@@ -851,9 +851,9 @@ YSBracket::commit (YCPValue current, int idx, YCPList arg, YCPValue value)
 		return val;
 	    }
 	}
-	
+
 	list->set (argint, val.isNull() ? YCPVoid() : val);
-#if DO_DEBUG	
+#if DO_DEBUG
     y2debug ("list[%d] = %s -> %s", argint, val->toString().c_str(), list->toString().c_str());
 #endif
 	return list;
@@ -861,9 +861,9 @@ YSBracket::commit (YCPValue current, int idx, YCPList arg, YCPValue value)
     else if (current->isMap())
     {
 	YCPMap map = current->asMap();
-	
+
 	YCPValue val = value;
-	
+
 	if (idx < arg->size ()-1)
 	{
 	    val = commit (map->value (argval), idx+1, arg, value);		// recurse
@@ -873,7 +873,7 @@ YSBracket::commit (YCPValue current, int idx, YCPList arg, YCPValue value)
 	    }
 	}
 	map = map->functionalAdd (argval, val.isNull() ? YCPVoid() : val);
-#if DO_DEBUG	
+#if DO_DEBUG
     y2debug ("map[%s] = %s -> %s", argval->toString().c_str(), val->toString().c_str(), map->toString().c_str());
 #endif
 	return map;
@@ -887,9 +887,9 @@ YSBracket::commit (YCPValue current, int idx, YCPList arg, YCPValue value)
 	}
 	YCPTerm term = current->asTerm();
 	int argint = argval->asInteger()->value();
-	
+
 	YCPValue val = value;
-	
+
 	// not the end of the argument list, continue
 	if (idx < arg->size ()-1)
 	{
@@ -920,7 +920,7 @@ YSBracket::evaluate (bool cse)
 
     // now check the variable
 
-    YCPValue result = m_entry->value(); 
+    YCPValue result = m_entry->value();
     if (result.isNull())
     {
 	// initial assignment
@@ -1075,13 +1075,13 @@ YSIf::evaluate (bool cse)
     y2debug ("YSIf::evaluate(%s)\n", toString().c_str());
 #endif
     YCPValue bval = m_condition->evaluate (cse);
-    
+
     if (bval.isNull ())
     {
 	ycp2error ("if condition is nil.");
 	return YCPNull ();
     }
-    
+
     if (!bval->isBoolean())
     {
 	ycp2warning(YaST::ee.filename().c_str(), YaST::ee.linenumber(), "'if (%s)' evaluates to non-boolean '%s' (%s), using 'false' instead.", m_condition->toString().c_str(), bval->toString().c_str(), bval->valuetype_str());
@@ -1205,7 +1205,7 @@ YSWhile::evaluate (bool cse)
 	    ycp2error ("while condition is nil.");
 	    return YCPNull ();
 	}
-    
+
 	if (!bval->isBoolean())
 	{
 	    ycp2error ("'while (%s)' evaluates to non-boolean '(%s)'.", m_condition->toString().c_str(), bval->toString().c_str());
@@ -1389,7 +1389,7 @@ YSRepeat::evaluate (bool cse)
 		ycp2error ("until condition is nil.");
 		return YCPNull ();
 	    }
-    
+
 	    if (!bval->isBoolean())
 	    {
 		ycp2error ( "'repeat ... until (%s)' evaluates to non-boolean '(%s)'.", m_condition->toString().c_str(), bval->toString().c_str());
@@ -1528,7 +1528,7 @@ YSDo::evaluate (bool cse)
 		ycp2error ("while condition is nil.");
 		return YCPNull ();
 	    }
-    
+
 	    if (!bval->isBoolean())
 	    {
 		ycp2error ("'do (%s)' evaluates to non-boolean '(%s)'.", m_condition->toString().c_str(), bval->toString().c_str());
@@ -1839,7 +1839,7 @@ YSImport::evaluate (bool cse)
 #if DO_DEBUG
 	y2debug ("Evaluating namespace '%s'", m_name->c_str());
 #endif
-	
+
 	nameSpace()->initialize ();
     }
 
@@ -1957,9 +1957,9 @@ YSSwitch::YSSwitch (bytecodeistream & str)
 	int index = Bytecode::readInt32 (str);
 	m_cases[cv] = index;
     }
-    
+
     m_defaultcase = Bytecode::readInt32 (str);
-    
+
     m_block = (YBlockPtr)Bytecode::readCode (str);
     if (! m_block)
     {
@@ -1976,16 +1976,16 @@ YSSwitch::toStream (std::ostream & str) const
     m_condition->toStream (str);
 
     Bytecode::writeInt32 (str, m_cases.size ());
-    
+
     for (map::const_iterator it = m_cases.begin ()
 	; it != m_cases.end () ; it++)
     {
 	Bytecode::writeValue (str, it->first);
 	Bytecode::writeInt32 (str, it->second);
     }
-    
+
     Bytecode::writeInt32 (str, m_defaultcase);
-    
+
     return m_block->toStream (str);
 }
 
@@ -2014,14 +2014,14 @@ YSSwitch::evaluate (bool cse)
 #endif
     if (cse)
 	return YCPNull ();
-	
+
     YCPValue condition = m_condition->evaluate ();
     if (condition.isNull ())
     {
 	ycperror ("switch condition evaluates to 'nil'");
 	return YCPNull ();
     }
-    
+
     // if there is a case for this value, execute
     if (m_cases.find (condition) != m_cases.end ())
     {
@@ -2033,7 +2033,7 @@ YSSwitch::evaluate (bool cse)
 	// break should not be propagated
 	if (!res.isNull () && res->isBreak ())
 	    res = YCPNull ();
-	    
+
 	return res;
     }
     // no case, try default if defined
@@ -2047,7 +2047,7 @@ YSSwitch::evaluate (bool cse)
 	// break should not be propagated
 	if (!res.isNull () && res->isBreak ())
 	    res = YCPNull ();
-	    
+
 	return res;
     }
 
@@ -2065,11 +2065,11 @@ YSSwitch::setCase (YCPValue value)
     // verify duplicate
     if (m_cases.find (value) != m_cases.end ())
 	return false;
-    
+
     int index = m_block->statementCount ();
-    
+
     m_cases[value]=index;
-    
+
     return true;
 }
 
@@ -2082,7 +2082,7 @@ YSSwitch::setDefaultCase ()
 	return false;
 
     m_defaultcase = m_block->statementCount ();
-    
+
     return true;
 }
 
diff --git a/libycp/src/YSymbolEntry.cc b/libycp/src/YSymbolEntry.cc
index c19796c52..bf596d7a3 100644
--- a/libycp/src/YSymbolEntry.cc
+++ b/libycp/src/YSymbolEntry.cc
@@ -155,7 +155,7 @@ YSymbolEntry::onlyDeclared () const
 }
 
 
-string 
+string
 YSymbolEntry::toString (bool with_type) const
 {
     string s = (with_type && m_global) ? "global " : "";
diff --git a/libycp/src/pathsearch.cc b/libycp/src/pathsearch.cc
index a9ebdc097..03a729ff5 100644
--- a/libycp/src/pathsearch.cc
+++ b/libycp/src/pathsearch.cc
@@ -184,9 +184,9 @@ Y2PathSearch::findy2exe (string root, string compname, bool server,
 	subdir = (non_y2 ? "/clients_non_y2/" : "/clients/");
     }
     string pathname = root + searchPath (EXECCOMP, level) + subdir + compname;
-    
+
     y2debug ("Trying file %s", pathname.c_str ());
-    
+
     struct stat buf;
     if (stat (pathname.c_str (), &buf) == 0)
     {
@@ -207,7 +207,7 @@ Y2PathSearch::findy2plugin (string name, int level)
 {
     // All plugins must follow this naming convention.
     string filename = searchPath (PLUGIN, level) + "/libpy2" + name + ".so.2";
-    
+
     y2debug ("Testing existence of plugin %s", filename.c_str ());
 
     // Check if it is a regular file.
@@ -372,7 +372,7 @@ YCPPathSearch::bytecodeForFile (string filename)
 {
     y2debug ("Testing existence of bytecode for %s", filename.c_str() );
     string ybc;
-    
+
     // check the YCP extension
     if (filename.find_last_of ("ycp") == filename.length ()-1)
     {
@@ -385,7 +385,7 @@ YCPPathSearch::bytecodeForFile (string filename)
 	// no extension, no ybc lookup
 	return "";
     }
-    
+
     // check the modification times
     struct stat file_stat;
     if (stat (ybc.c_str (), &file_stat) != 0 || ! S_ISREG(file_stat.st_mode))
@@ -394,22 +394,22 @@ YCPPathSearch::bytecodeForFile (string filename)
 	return "";
     }
     time_t ybc_time = file_stat.st_mtime;
-    
+
     if (stat (filename.c_str (), &file_stat) != 0 || ! S_ISREG(file_stat.st_mode))
     {
 	// return empty file
 	return "";
     }
-    
+
     time_t ycp_time = file_stat.st_mtime;
-    
+
     // compare the times
     if (ycp_time > ybc_time)
     {
 	// too new
 	return "";
     }
-    
+
     return ybc;
 }
 
diff --git a/libycp/testsuite/runc.cc b/libycp/testsuite/runc.cc
index 7cb94b23a..f6d1e6659 100644
--- a/libycp/testsuite/runc.cc
+++ b/libycp/testsuite/runc.cc
@@ -31,16 +31,16 @@ class TestY2Component : public Y2Component {
     virtual Y2Namespace *import (const char* name)
     {
 	YBlockPtr block = (YBlockPtr)Bytecode::readModule (name);
-	if (block == 0 ) 
+	if (block == 0 )
 	{
 	    y2debug ("Cannot import module");
 	    return NULL;
 	}
-	
+
 	return block->nameSpace();
     }
     virtual string name () const { return "test";}
-    
+
 } TestComponent;
 
 
@@ -124,7 +124,7 @@ processfile (const char *infname, char *outfname)
 	    return 1;
 	}
     }
-    
+
     if (parser != 0)
     {
 	FILE *infile = fopen (infname, "r");
@@ -206,7 +206,7 @@ processfile (const char *infname, char *outfname)
 	    std::cout << result << std::endl;
 	}
     }
-    
+
     if (!quiet) printf ("done\n");
 
     return 0;
@@ -413,7 +413,7 @@ int main (int argc, char *argv[])
 	fprintf (stderr, "No input file or directory given\n");
 	exit (1);
     }
-	
+
     for (i = optind; i < argc;i++)
     {
 	if (recursive)
diff --git a/libycp/testsuite/runycp.cc b/libycp/testsuite/runycp.cc
index aa5471e12..baa1abcd5 100644
--- a/libycp/testsuite/runycp.cc
+++ b/libycp/testsuite/runycp.cc
@@ -1,14 +1,14 @@
 /*---------------------------------------------------------------------\
-|                                                                      |  
-|                      __   __    ____ _____ ____                      |  
-|                      \ \ / /_ _/ ___|_   _|___ \                     |  
-|                       \ V / _` \___ \ | |   __) |                    |  
-|                        | | (_| |___) || |  / __/                     |  
-|                        |_|\__,_|____/ |_| |_____|                    |  
-|                                                                      |  
-|                               core system                            | 
-|                                                        (C) SuSE GmbH |  
-\----------------------------------------------------------------------/ 
+|                                                                      |
+|                      __   __    ____ _____ ____                      |
+|                      \ \ / /_ _/ ___|_   _|___ \                     |
+|                       \ V / _` \___ \ | |   __) |                    |
+|                        | | (_| |___) || |  / __/                     |
+|                        |_|\__,_|____/ |_| |_____|                    |
+|                                                                      |
+|                               core system                            |
+|                                                        (C) SuSE GmbH |
+\----------------------------------------------------------------------/
 
    File:       runycp.cc
 
@@ -126,7 +126,7 @@ main (int argc, const char *argv[])
 	        && (argv[argp][1] == '-')
 	        && (strcmp (argv[argp] + 2, "depends") == 0))
 	    {
-		make_depends = true;	
+		make_depends = true;
 	    }
 	    else if ((argv[argp][0] != '-')
 		     && fname == 0)
@@ -169,7 +169,7 @@ main (int argc, const char *argv[])
     parser->setBuffered();
     if (make_depends)
 	parser->setDepends();
-	
+
     YaST::ee.setFilename(string(fname));
 
     YCodePtr code = 0;
@@ -191,7 +191,7 @@ main (int argc, const char *argv[])
 	    break;
 	}
 
-	fprintf (stderr, 
+	fprintf (stderr,
 	    "Parsed:\n"
 	    "----------------------------------------------------------------------\n"
 	    "%s\n"
diff --git a/libycp/testsuite/testscope.cc b/libycp/testsuite/testscope.cc
index d00770800..b15ec00a5 100644
--- a/libycp/testsuite/testscope.cc
+++ b/libycp/testsuite/testscope.cc
@@ -1,14 +1,14 @@
 /*---------------------------------------------------------------------\
-|                                                                      |  
-|                      __   __    ____ _____ ____                      |  
-|                      \ \ / /_ _/ ___|_   _|___ \                     |  
-|                       \ V / _` \___ \ | |   __) |                    |  
-|                        | | (_| |___) || |  / __/                     |  
-|                        |_|\__,_|____/ |_| |_____|                    |  
-|                                                                      |  
-|                               core system                            | 
-|                                                        (C) SuSE GmbH |  
-\----------------------------------------------------------------------/ 
+|                                                                      |
+|                      __   __    ____ _____ ____                      |
+|                      \ \ / /_ _/ ___|_   _|___ \                     |
+|                       \ V / _` \___ \ | |   __) |                    |
+|                        | | (_| |___) || |  / __/                     |
+|                        |_|\__,_|____/ |_| |_____|                    |
+|                                                                      |
+|                               core system                            |
+|                                                        (C) SuSE GmbH |
+\----------------------------------------------------------------------/
 
    File:       testscope.cc
 
diff --git a/package/yast2-core.changes b/package/yast2-core.changes
index 1ba3c405f..775114940 100644
--- a/package/yast2-core.changes
+++ b/package/yast2-core.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Tue Sep  3 13:28:44 UTC 2013 - jreidinger@suse.com
+
+- libscr: added "root" attribute to SCRAgent (FATE#314695). Agents
+  must be adapted to respect it instead of relying on chroot(2)
+  having been run.
+
 -------------------------------------------------------------------
 Wed Aug  7 07:46:14 UTC 2013 - dmajda@suse.cz
 
diff --git a/scr/src/Makefile.am b/scr/src/Makefile.am
index e913abc70..33f3a9e9f 100644
--- a/scr/src/Makefile.am
+++ b/scr/src/Makefile.am
@@ -9,7 +9,8 @@ serversdir = $(execcompdir)/servers
 plugin_LTLIBRARIES = libpy2scr.la
 
 libpy2scr_la_SOURCES =				\
-	Y2CCSCR.cc				\
+	Y2CCSCR.cc Y2CCSCR.h				\
+	Y2SCRComponent.cc Y2SCRComponent.h	\
 	ScriptingAgent.cc ScriptingAgent.h	\
 	StdioSCRAgent.cc StdioSCRAgent.h	\
 	SCRSubAgent.cc SCRSubAgent.h
diff --git a/scr/src/ScriptingAgent.cc b/scr/src/ScriptingAgent.cc
index 29b213084..2555a8909 100644
--- a/scr/src/ScriptingAgent.cc
+++ b/scr/src/ScriptingAgent.cc
@@ -25,8 +25,9 @@
 #include "ScriptingAgent.h"
 
 
-ScriptingAgent::ScriptingAgent ()
-    : done_sweep (false)
+ScriptingAgent::ScriptingAgent (const string &root_)
+    : done_sweep (false),
+      root_path(root_)
 {
     InitRegDirs ();
     // to test the old behavior
@@ -35,12 +36,13 @@ ScriptingAgent::ScriptingAgent ()
 }
 
 
-ScriptingAgent::ScriptingAgent (const string& file)
-    : done_sweep (false)
+ScriptingAgent::ScriptingAgent (const string &root_, const string& file)
+    : done_sweep (false),
+      root_path(root_)
 {
     InitRegDirs ();
     y2debug( "Scripting agent using only SCR %s", file.c_str () );
-    
+
     parseSingleConfigFile (file);
 }
 
@@ -55,7 +57,7 @@ ScriptingAgent::InitRegDirs ()
 	rd.name = Y2PathSearch::searchPath (Y2PathSearch::GENERIC, level) + "/scrconf";
 	y2debug( "Scripting agent searching SCRs in %s", rd.name.c_str() );
 //	parseConfigFiles (rd.name);
-	
+
 	struct stat st;
 	if (stat (rd.name.c_str(), &st) != 0) {
 	    y2debug ("Can't read dir %s: %m", rd.name.c_str ());
@@ -74,6 +76,11 @@ ScriptingAgent::~ScriptingAgent ()
     UnregisterAllAgents ();
 }
 
+const char* ScriptingAgent::root() const
+{
+    return root_path.c_str();
+}
+
 bool less_than_inodes (const pair& a,
 		       const pair& b)
 {
@@ -604,7 +611,7 @@ ScriptingAgent::executeSubagentCommand (const char *command,
 	ycp2error ("Couldn't mount agent to handle '%s'", path->toString().c_str ());
 	return YCPNull ();
     }
-    
+
     YCPTerm commandterm (command);
     commandterm->add (path->at ((*agent)->get_path ()->length ())); // relative path
 
diff --git a/scr/src/ScriptingAgent.h b/scr/src/ScriptingAgent.h
index 71487ed85..d0f8ea497 100644
--- a/scr/src/ScriptingAgent.h
+++ b/scr/src/ScriptingAgent.h
@@ -27,7 +27,7 @@ class ScriptingAgent : public SCRAgent
     /**
      * Constructor.
      */
-    ScriptingAgent ();
+    ScriptingAgent (const string& root = "/");
 
     // used only in agent-ini/testsuite...?
     // TODO try to eliminate it
@@ -36,13 +36,19 @@ class ScriptingAgent : public SCRAgent
      * 
      * @param file	SCR configuration file to be registered.
      */
-    ScriptingAgent (const string& file);
+    ScriptingAgent (const string& root, const string& file);
 
     /**
      * Destructor. Also deletes subagents.
      */
     ~ScriptingAgent ();
 
+    /**
+     * Overrides root getter to provide root from constructor
+     * \see SCRAgent#root
+     */
+    virtual const char* root() const;
+
     /**
      * Reads data.
      * @param path Specifies what part of the subtree should
@@ -123,6 +129,8 @@ class ScriptingAgent : public SCRAgent
     // that we do not unnecessarily sweep again
     bool done_sweep;
 
+    string root_path;
+
     // FIXME rethink the caching
     struct RegistrationDir {
 	string name;
diff --git a/scr/src/StdioSCRAgent.cc b/scr/src/StdioSCRAgent.cc
index 385319191..ca2957a4d 100644
--- a/scr/src/StdioSCRAgent.cc
+++ b/scr/src/StdioSCRAgent.cc
@@ -21,21 +21,21 @@ StdioSCRAgent::Read (const YCPPath &path, const YCPValue &arg, const YCPValue &o
 {
     if (! m_handler)
 	return YCPNull ();
-	
+
     y2debug( "This is StdioSCRAgent(%p)::Read", this );
-    
+
     YCPTerm r ( "Read" );
     r.add (path);
-    if (!arg.isNull ()) 
+    if (!arg.isNull ())
     {
 	r.add (arg);
-	
+
 	if (! opt.isNull ())
 	{
 	    r.add (opt);
 	}
     }
-    
+
     return m_handler->evaluate (r);
 }
 
@@ -46,16 +46,16 @@ StdioSCRAgent::Write (const YCPPath &path, const YCPValue &value,
 {
     if (! m_handler)
 	return YCPNull ();
-	
+
     y2debug( "This is StdioSCRAgent(%p)::Write", this );
-    
+
     YCPTerm r ( "Write" );
     r.add (path);
-    
-    if (!value.isNull ()) 
+
+    if (!value.isNull ())
     {
 	r.add (value);
-	
+
 	if (! arg.isNull ())
 	{
 	    r.add (arg);
@@ -65,7 +65,7 @@ StdioSCRAgent::Write (const YCPPath &path, const YCPValue &value,
     {
 	r.add (YCPVoid ());
     }
-    
+
     YCPValue v = m_handler->evaluate (r);
 
     if (v.isNull())
@@ -87,12 +87,12 @@ StdioSCRAgent::Dir (const YCPPath &path)
 {
     if (! m_handler)
 	return YCPNull ();
-	
+
     y2debug( "This is StdioSCRAgent(%p)::Dir", this );
-    
+
     YCPTerm r ( "Dir" );
     r.add (path);
-    
+
     YCPValue v = m_handler->evaluate (r);
     if (v.isNull())
     {
@@ -114,21 +114,21 @@ StdioSCRAgent::Execute (const YCPPath &path, const YCPValue &value,
 {
     if (! m_handler)
 	return YCPNull ();
-	
+
     y2debug( "This is StdioSCRAgent(%p)::Execute", this );
-    
+
     YCPTerm r ( "Execute" );
     r.add (path);
-    if (!value.isNull ()) 
+    if (!value.isNull ())
     {
 	r.add (value);
-	
+
 	if (! arg.isNull ())
 	{
 	    r.add (arg);
 	}
     }
-    
+
     return m_handler->evaluate (r);
 }
 
@@ -138,12 +138,12 @@ StdioSCRAgent::Error (const YCPPath &path)
 {
     if (! m_handler)
 	return YCPNull ();
-	
+
     y2debug( "This is StdioSCRAgent(%p)::Error", this );
-    
+
     YCPTerm r ( "Error" );
     r.add (path);
-    
+
     YCPValue v = m_handler->evaluate (r);
     if (v.isNull())
     {
@@ -163,13 +163,13 @@ YCPBoolean
 StdioSCRAgent::RegisterAgent (const YCPPath& path, const YCPValue& value) {
     if (! m_handler)
 	return YCPNull ();
-	
+
     y2debug( "This is StdioSCRAgent(%p)::RegisterAgent", this );
 
     YCPTerm r ( "RegisterAgent" );
     r.add (path);
     r.add (value);
-    
+
     YCPValue v = m_handler->evaluate (r);
 
     if (v.isNull())
@@ -192,12 +192,12 @@ YCPBoolean
 StdioSCRAgent::UnregisterAgent (const YCPPath& path) {
     if (! m_handler)
 	return YCPNull ();
-	
+
     y2debug( "This is StdioSCRAgent(%p)::UnregisterAgent", this );
 
     YCPTerm r ( "UnregisterAgent" );
     r.add (path);
-    
+
     YCPValue v = m_handler->evaluate (r);
 
     if (v.isNull())
@@ -221,9 +221,9 @@ StdioSCRAgent::otherCommand (const YCPTerm &term)
 {
     if (! m_handler)
 	return YCPNull ();
-	
+
     y2error( "This is StdioSCRAgent(%p)::otherCommand (unhandled)", this );
-    
+
     return YCPNull ();
 }
 
diff --git a/scr/src/Y2CCSCR.cc b/scr/src/Y2CCSCR.cc
index 0e662f10c..991be3ac4 100644
--- a/scr/src/Y2CCSCR.cc
+++ b/scr/src/Y2CCSCR.cc
@@ -5,15 +5,56 @@
  */
 
 
-#include 
-#include 
+#include "Y2CCSCR.h"
+#include "Y2SCRComponent.h"
 
-#include "ScriptingAgent.h"
+using namespace std;
 
+Y2CCSCR::Y2CCSCR () :
+  Y2ComponentCreator (Y2ComponentBroker::BUILTIN)
+{
+}
 
-// create Agent called Y2SCRComp out of ScriptingAgent
-typedef Y2AgentComp  Y2SCRComp;
+Y2CCSCR::~Y2CCSCR () {
+    for (map::iterator i = scr_instances.begin();
+        i != scr_instances.end(); ++i)
+      delete i->second;
+}
 
-// create Component Creator for Y2SCRComp
-Y2CCAgentComp  g_y2ccscr ("scr");
+/* local helper for CC#create */
+static void split_name( const char *name, string &root, string &real_name)
+{
+    real_name = name;
+    root = "/";
+
+    if (strncmp (name, "chroot=", 7) == 0)
+    {
+      const char *p = index (name, ':');
+
+      if (p) {
+        root = string (name, 7, p - name - 7);
+        real_name = string (p + 1);
+      }
+    }
+}
+
+Y2Component *Y2CCSCR::create( const char* name) const
+{
+    string root, real_name;
+
+    split_name(name, root, real_name);
 
+    if (real_name != "scr")
+        return NULL;
+
+    map::iterator i = scr_instances.find(root);
+    if (i != scr_instances.end())
+        return i->second;
+
+    scr_instances[root] = new Y2SCRComponent(root.c_str());
+	  return scr_instances[root];
+}
+
+
+// create Component Creator for Y2SCRComp
+Y2CCSCR g_y2ccscr;
diff --git a/scr/src/Y2CCSCR.h b/scr/src/Y2CCSCR.h
new file mode 100644
index 000000000..890e61e53
--- /dev/null
+++ b/scr/src/Y2CCSCR.h
@@ -0,0 +1,50 @@
+#ifndef Y2CCSCR_H
+#define Y2CCSCR_H
+
+#include 
+#include 
+#include 
+
+#include "ScriptingAgent.h"
+#include "Y2SCRComponent.h"
+
+class Y2CCSCR : public Y2ComponentCreator
+{
+public:
+
+    /**
+     * Constructor of a SCR component creator.
+     */
+    Y2CCSCR ();
+
+
+    /**
+     * Destructor of a SCR component creator.
+     */
+    ~Y2CCSCR ();
+
+
+    /**
+     * Returns true since all agents are server components.
+     */
+    bool isServerCreator () const { return true; }
+
+    /**
+     * Creates a new @ref Y2Component if the name matches the one
+     * provided in the constructor.
+     */
+    Y2Component* create (const char*) const;
+
+    /**
+     * Agent components do not provide any namespaces.
+     */
+    Y2Component* provideNamespace (const char*) { return NULL; }
+
+private:
+
+    /* SCR instances, owned by this class, keyed by target root.
+     * Target root must be valid absolute path like "/" or "/mnt".*/
+    mutable std::map scr_instances;
+};
+
+#endif
diff --git a/scr/src/Y2SCRComponent.cc b/scr/src/Y2SCRComponent.cc
new file mode 100644
index 000000000..d3297dfdd
--- /dev/null
+++ b/scr/src/Y2SCRComponent.cc
@@ -0,0 +1,14 @@
+#include "Y2SCRComponent.h"
+#include "ScriptingAgent.h"
+
+
+Y2SCRComponent::Y2SCRComponent(const char *root) :
+  Y2AgentComp("scr")
+{
+  agent = new ScriptingAgent(root);
+}
+
+Y2SCRComponent::~Y2SCRComponent()
+{
+  //agent is destructed in parent
+}
diff --git a/scr/src/Y2SCRComponent.h b/scr/src/Y2SCRComponent.h
new file mode 100644
index 000000000..87b44f26b
--- /dev/null
+++ b/scr/src/Y2SCRComponent.h
@@ -0,0 +1,15 @@
+#ifndef Y2SCRCOMPONENT_H
+#define Y2SCRCOMPONENT_H
+
+#include 
+#include "ScriptingAgent.h"
+
+class Y2SCRComponent : public Y2AgentComp
+{
+public:
+  Y2SCRComponent(const char* root);
+
+  ~Y2SCRComponent();
+};
+
+#endif
diff --git a/wfm/src/WFM.cc b/wfm/src/WFM.cc
index 46750130e..914c912e9 100644
--- a/wfm/src/WFM.cc
+++ b/wfm/src/WFM.cc
@@ -174,7 +174,7 @@ WFM::WFM ()
 #define ETC 0, NULL, constTypePtr(), NULL
 #define ETCf   NULL, constTypePtr(), NULL
 	{ "WFM",		"",				NULL, 		DECL_NAMESPACE, ETCf },
-	{ "SCROpen",		"integer (string, boolean)",	(void*)WFMSCROpen,               ETC }, 
+	{ "SCROpen",		"integer (string, boolean)",	(void*)WFMSCROpen,               ETC },
 	{ "SCRClose",		"void (integer)",		(void*)WFMSCRClose,		 ETC },
 	{ "SCRGetName",		"string (integer)",		(void*)WFMSCRGetName,		 ETC },
 	{ "SCRSetDefault",	"void (integer)",		(void*)WFMSCRSetDefault,	 ETC },
diff --git a/wfm/src/Y2CCWFM.cc b/wfm/src/Y2CCWFM.cc
index 3830baeba..f25f6b217 100644
--- a/wfm/src/Y2CCWFM.cc
+++ b/wfm/src/Y2CCWFM.cc
@@ -50,7 +50,7 @@
 
 Y2CCWFM::Y2CCWFM()
     : Y2ComponentCreator(Y2ComponentBroker::SCRIPT)
-{    
+{
 }
 
 static void initializeBuiltins ()
@@ -69,13 +69,13 @@ Y2Component *Y2CCWFM::createInLevel(const char *name, int level, int) const
     {
 	return 0;
     }
-    
+
     if ( strcasecmp ( name, "wfm" ) == 0 )
     {
 	y2debug ("Creating just the component WFM");
 	return Y2WFMComponent::instance ();
     }
-    
+
     string modulename = name;
     string filename = string(name) + ".ycp";
     FILE *file = 0;
@@ -131,10 +131,10 @@ Y2Component *Y2CCWFM::createInLevel(const char *name, int level, int) const
 
     // to be on the safe side
     initializeBuiltins ();
-    
+
     // check, if there is a newer YBC client
     YCPCode script;
-    
+
     string ybc_filename = YCPPathSearch::bytecodeForFile (fullname);
     if (ybc_filename.empty ())
     {
@@ -144,7 +144,7 @@ Y2Component *Y2CCWFM::createInLevel(const char *name, int level, int) const
 
 	script = YCPCode( parser.parse() );
 	fclose(file);
-    
+
 	y2milestone ("Parsing finished");
     }
     else
@@ -153,7 +153,7 @@ Y2Component *Y2CCWFM::createInLevel(const char *name, int level, int) const
 	script = YCPCode ( Bytecode::readFile (ybc_filename) );
 	y2milestone ("Bytecode file loaded");
     }
-    
+
 #if KMTRACE
     kuntrace ();
 #endif
@@ -183,7 +183,7 @@ Y2Component* Y2CCWFM::provideNamespace(const char* name)
 	return Y2WFMComponent::instance ();
 
     }
-    
+
     // check the filename
     string filename = YCPPathSearch::findModule (name);
     if (filename.empty())
@@ -197,7 +197,7 @@ Y2Component* Y2CCWFM::provideNamespace(const char* name)
     // But see bug 37338 - this helps for code paths which do not reach UI
     initializeBuiltins ();
 
-    y2debug ("Component to provide the namespace: %p", Y2WFMComponent::instance ());    
+    y2debug ("Component to provide the namespace: %p", Y2WFMComponent::instance ());
     return Y2WFMComponent::instance ();
 }
 
diff --git a/wfm/src/Y2StdioFunction.cc b/wfm/src/Y2StdioFunction.cc
index ac540b41a..3c7460c88 100644
--- a/wfm/src/Y2StdioFunction.cc
+++ b/wfm/src/Y2StdioFunction.cc
@@ -55,7 +55,7 @@ Y2StdioFunction::~Y2StdioFunction ()
 {
 }
 
-bool 
+bool
 Y2StdioFunction::attachParameter (const YCPValue& arg, const int pos)
 {
     if (pos >= m_parameters.size())
@@ -64,7 +64,7 @@ Y2StdioFunction::attachParameter (const YCPValue& arg, const int pos)
     return true;
 }
 
-constTypePtr 
+constTypePtr
 Y2StdioFunction::wantedParameterType () const
 {
     y2internal ("Somebody asking for a parameter type redirector");
@@ -72,7 +72,7 @@ Y2StdioFunction::wantedParameterType () const
 }
 
 
-bool 
+bool
 Y2StdioFunction::appendParameter (const YCPValue& arg)
 {
     if (arg.isNull())
@@ -80,13 +80,13 @@ Y2StdioFunction::appendParameter (const YCPValue& arg)
 	ycp2error ("NULL parameter to %s::%s", m_namespace.c_str(), m_name.c_str ());
 	return false;
     }
-			    
+
     m_parameters.push_back(arg);
     return true;
 }
 
 
-bool 
+bool
 Y2StdioFunction::finishParameters ()
 {
     // FIXME if m_type is set, then check parameters
@@ -94,7 +94,7 @@ Y2StdioFunction::finishParameters ()
 }
 
 
-YCPValue 
+YCPValue
 Y2StdioFunction::evaluateCall ()
 {
     y2milestone ("Evaluating remote call to '%s::%s'"
@@ -103,7 +103,7 @@ Y2StdioFunction::evaluateCall ()
     // FIXME: ensure connected
 
     string params = "";
-    
+
     if (!m_parameters.empty())
     {
 	params = m_parameters[0]->toString ();
@@ -112,15 +112,15 @@ Y2StdioFunction::evaluateCall ()
 	    params += ", " + m_parameters[i]->toString ();
 	}
     }
-    
+
     string call = string ("{ import \"") + m_namespace
-	+ "\"; return " + m_namespace + "::" 
+	+ "\"; return " + m_namespace + "::"
 	+ m_name + "(" + params + "); }";
 
 #if DO_DEBUG
     y2debug ("Going to evaluate a call: %s", call.c_str ());
 #endif
-    
+
     Y2ProgramComponent* sender = dynamic_cast(m_sender);
 
     // send command
@@ -132,7 +132,7 @@ Y2StdioFunction::evaluateCall ()
 }
 
 
-bool 
+bool
 Y2StdioFunction::reset ()
 {
     m_parameters.clear();
diff --git a/wfm/src/Y2SystemFunction.cc b/wfm/src/Y2SystemFunction.cc
index 8e4c2362f..93c5bc8ef 100644
--- a/wfm/src/Y2SystemFunction.cc
+++ b/wfm/src/Y2SystemFunction.cc
@@ -56,7 +56,7 @@ Y2SystemFunction::~Y2SystemFunction ()
     delete m_local;
 }
 
-bool 
+bool
 Y2SystemFunction::attachParameter (const YCPValue& arg, const int position)
 {
 #ifdef DEBUG
@@ -65,20 +65,20 @@ Y2SystemFunction::attachParameter (const YCPValue& arg, const int position)
 	, arg->toString ().c_str (), position);
 #endif
     Y2Function* cur = m_use_remote ? m_remote : m_local;
-    
+
     return cur->attachParameter (arg, position);
 }
 
-constTypePtr 
+constTypePtr
 Y2SystemFunction::wantedParameterType () const
 {
     Y2Function* cur = m_use_remote ? m_remote : m_local;
-    
+
     return cur->wantedParameterType ();
 }
 
 
-bool 
+bool
 Y2SystemFunction::appendParameter (const YCPValue& arg)
 {
 #ifdef DEBUG
@@ -87,25 +87,25 @@ Y2SystemFunction::appendParameter (const YCPValue& arg)
 	, arg->toString ().c_str ());
 #endif
     Y2Function* cur = m_use_remote ? m_remote : m_local;
-    
+
     return cur->appendParameter (arg);
 }
 
 
-bool 
+bool
 Y2SystemFunction::finishParameters ()
 {
     Y2Function* cur = m_use_remote ? m_remote : m_local;
-    
+
     return cur->finishParameters ();
 }
 
 
-YCPValue 
+YCPValue
 Y2SystemFunction::evaluateCall ()
 {
     Y2Function* cur = m_use_remote ? m_remote : m_local;
-    
+
 #ifdef DEBUG
     y2debug ("Going to call proxied function '%s' (%p)", m_local->name ().c_str (), m_local);
 #endif
@@ -114,11 +114,11 @@ Y2SystemFunction::evaluateCall ()
 }
 
 
-bool 
+bool
 Y2SystemFunction::reset ()
 {
     Y2Function* cur = m_use_remote ? m_remote : m_local;
-    
+
     return cur->reset ();
 }
 
@@ -130,7 +130,7 @@ Y2SystemFunction::useRemote (Y2Function* remote_call)
 
     m_remote = remote_call;
     m_use_remote = true;
-    
+
     y2milestone ("'%s': switched to remote", m_local->name ().c_str ());
 }
 
diff --git a/wfm/src/Y2SystemNamespace.cc b/wfm/src/Y2SystemNamespace.cc
index d94963c79..af80e883e 100644
--- a/wfm/src/Y2SystemNamespace.cc
+++ b/wfm/src/Y2SystemNamespace.cc
@@ -71,7 +71,7 @@ Y2SystemNamespace::filename () const
 }
 
 YCPValue
-Y2SystemNamespace::evaluate (bool cse) 
+Y2SystemNamespace::evaluate (bool cse)
 {
     // run the local constructor
     m_local_ns->evaluate (cse);
@@ -80,11 +80,11 @@ Y2SystemNamespace::evaluate (bool cse)
 }
 
 
-Y2Function* 
+Y2Function*
 Y2SystemNamespace::createFunctionCall (const string name, constFunctionTypePtr type)
 {
     TableEntry *func_te = table()->find (name.c_str (), SymbolEntry::c_function);
-    
+
     // can't find the function definition
     if (!func_te->sentry ()->isFunction ())
         return 0;
@@ -94,12 +94,12 @@ Y2SystemNamespace::createFunctionCall (const string name, constFunctionTypePtr t
     {
 	return 0;
     }
-    
+
     y2debug ("allocating new Y2SystemFunction %s::%s", m_name.c_str (), name.c_str ());
 
     Y2SystemFunction* fnc = new Y2SystemFunction (local_func, type, this);
     m_functions.push_back (fnc);
-    
+
     // currently we use remote communication
     if (m_use_remote)
     {
@@ -127,7 +127,7 @@ Y2SystemNamespace::useRemote (Y2ProgramComponent* sender)
 	    , (*it)->type ()
 	    , sender));
     }
-    
+
     m_use_remote = true;
     m_remote_sender = sender;
 
@@ -146,7 +146,7 @@ Y2SystemNamespace::useLocal ()
 	(*it)->useLocal ();
   y2milestone("Redirection done: %s",(*it)->name ().c_str ());
     }
-    
+
     m_use_remote = false;
 }
 
diff --git a/wfm/src/Y2WFMComponent.cc b/wfm/src/Y2WFMComponent.cc
index 9b26f0c14..d3d9ee271 100644
--- a/wfm/src/Y2WFMComponent.cc
+++ b/wfm/src/Y2WFMComponent.cc
@@ -135,10 +135,10 @@ YCPValue
 Y2WFMComponent::doActualWork (const YCPList& arglist, Y2Component *displayserver)
 {
     y2debug( "Starting evaluation" );
-    
+
     bool debugger = false;
     YCPList client_arglist = arglist;
-    
+
     // hack: look only at the last entry, if it's debugger or not
     if (arglist->size () > 0)
     {
@@ -192,7 +192,7 @@ Y2WFMComponent::doActualWork (const YCPList& arglist, Y2Component *displayserver
     y2debug ("Script is: %s", script->toString().c_str());
 
     y2debug ("Y2WFMComponent @ %p, displayserver @ %p", this, displayserver);
-    
+
     if (debugger)
 	script = YCPCode ((YCodePtr)new YBreakpoint (script->asCode ()->code (), "code start"));
 
@@ -782,7 +782,7 @@ Y2WFMComponent::import (const char* name_space)
             Y2SystemNamespace* ns = new Y2SystemNamespace (local_ns);
 
             system_namespaces.push_back (ns);
-            
+
             y2milestone("Namespace %s properly imported", ns->name().c_str());
             return ns;
         }
diff --git a/wfm/testsuite/runc.cc b/wfm/testsuite/runc.cc
index fa3ee591e..4cfe9ce9f 100644
--- a/wfm/testsuite/runc.cc
+++ b/wfm/testsuite/runc.cc
@@ -34,16 +34,16 @@ class TestY2Component : public Y2Component {
     virtual Y2Namespace *import (const char* name)
     {
 	YBlockPtr block = (YBlockPtr)Bytecode::readModule (name);
-	if (block == 0 ) 
+	if (block == 0 )
 	{
 	    y2debug ("Cannot import module");
 	    return NULL;
 	}
-	
+
 	return block->nameSpace();
     }
     virtual string name () const { return "test";}
-    
+
 } TestComponent;
 
 
@@ -127,7 +127,7 @@ processfile (const char *infname, char *outfname)
 	    return 1;
 	}
     }
-    
+
     if (parser != 0)
     {
 	FILE *infile = fopen (infname, "r");
@@ -209,7 +209,7 @@ processfile (const char *infname, char *outfname)
 	    std::cout << result << std::endl;
 	}
     }
-    
+
     if (!quiet) printf ("done\n");
 
     return 0;
@@ -420,7 +420,7 @@ int main (int argc, char *argv[])
 	fprintf (stderr, "No input file or directory given\n");
 	exit (1);
     }
-	
+
     for (i = optind; i < argc;i++)
     {
 	if (recursive)
diff --git a/wfm/testsuite/runwfm.cc b/wfm/testsuite/runwfm.cc
index a67b96066..9846118bf 100644
--- a/wfm/testsuite/runwfm.cc
+++ b/wfm/testsuite/runwfm.cc
@@ -104,7 +104,7 @@ main (int argc, char *argv[])
 
     parser->setInput (infile, fname);
     parser->setBuffered();
-    
+
     // register builtins;
     WFM wfm;
 
@@ -117,14 +117,14 @@ main (int argc, char *argv[])
 	{
 	    break;
 	}
-	
+
 	// Prepare the arguments. It has the form [script, [clientargs...]]
 	YCPList wfm_arglist;
 	wfm_arglist->add (YCPCode (value));
 	wfm_arglist->add (YCPString ("testing"));
 	wfm_arglist->add (YCPString ("testing-fullname"));
 	wfm_arglist->add (YCPList());
-	
+
 	workflowmanager->setupComponent ( "testing", "testing-fullname:"
 	    , YCPCode (value));
 
diff --git a/yml/src/YMLparser.cc b/yml/src/YMLparser.cc
index f760aa761..48f2839bd 100644
--- a/yml/src/YMLparser.cc
+++ b/yml/src/YMLparser.cc
@@ -77,7 +77,7 @@ YCPList xml2ycp(xmlNode * node, bool symbol = false)
         switch (cur_node->type)
         {
             case XML_ELEMENT_NODE       :
-   
+
                   if ( !xmlStrcmp(cur_node->name,  (const xmlChar*) "symbol" ) ) {
                       char *prop = (char*) xmlGetProp(cur_node, (const xmlChar *)"name");
                       if (prop)
@@ -162,7 +162,7 @@ string YMLParser(xmlNodePtr &node)
 string YMLDocumentParser(xmlNodePtr &node)
 {
     if ( xmlStrcmp(node->name, (const xmlChar*) "YML") )
-    {   printf("no yml-tag found\n"); 
+    {   printf("no yml-tag found\n");
         exit (0);
     }
 
@@ -246,8 +246,8 @@ int main( void )
 
     if ( xmlStrcmp(current->name, (const xmlChar*) "YML") )
     {
-       fprintf(stderr, "error: wrong document type, root node YML expected"); 
-       xmlFreeDoc(xmldoc); 
+       fprintf(stderr, "error: wrong document type, root node YML expected");
+       xmlFreeDoc(xmldoc);
        return 0;
     }
 
@@ -276,7 +276,7 @@ int main( void )
     return 0;
 }
     /*
-    YCPTerm test("TEST"); test->add( YCPTerm("pups")); test->add( YCPTerm("furz")); YCPTerm popel("popel"); popel->add( YCPTerm("Müller")); popel->add( YCPTerm("Meier")); popel->add( YCPTerm("Piepenhuber")); test->add(popel); element = test; 
+    YCPTerm test("TEST"); test->add( YCPTerm("pups")); test->add( YCPTerm("furz")); YCPTerm popel("popel"); popel->add( YCPTerm("Müller")); popel->add( YCPTerm("Meier")); popel->add( YCPTerm("Piepenhuber")); test->add(popel); element = test;
     printf("TEST %s\n", test->toString().c_str() );
                              for (int i=0; i++ < offset; printf(" "));
                              printf("found ELEMENT %s\n", cur_node->name);