|
a/src/utils/conftree.cpp |
|
b/src/utils/conftree.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid [] = "@(#$Id: conftree.cpp,v 1.15 2007-12-13 06:58:22 dockes Exp $ (C) 2003 J.F.Dockes";
|
2 |
static char rcsid [] = "@(#$Id: conftree.cpp,v 1.16 2008-07-01 11:51:51 dockes Exp $ (C) 2003 J.F.Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
/*
|
4 |
/*
|
5 |
* This program is free software; you can redistribute it and/or modify
|
5 |
* This program is free software; you can redistribute it and/or modify
|
6 |
* it under the terms of the GNU General Public License as published by
|
6 |
* it under the terms of the GNU General Public License as published by
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
... |
|
... |
387 |
// For all submaps:
|
387 |
// For all submaps:
|
388 |
for (map<string, map<string, string> >::iterator sit = m_submaps.begin();
|
388 |
for (map<string, map<string, string> >::iterator sit = m_submaps.begin();
|
389 |
sit != m_submaps.end(); sit++) {
|
389 |
sit != m_submaps.end(); sit++) {
|
390 |
|
390 |
|
391 |
// Possibly emit submap name:
|
391 |
// Possibly emit submap name:
|
392 |
if (!sit->first.empty() && walker(clidata, "", sit->first.c_str())
|
392 |
if (!sit->first.empty() && walker(clidata, string(), sit->first.c_str())
|
393 |
== WALK_STOP)
|
393 |
== WALK_STOP)
|
394 |
return WALK_STOP;
|
394 |
return WALK_STOP;
|
395 |
|
395 |
|
396 |
// Walk submap
|
396 |
// Walk submap
|
397 |
map<string, string> &sm = sit->second;
|
397 |
map<string, string> &sm = sit->second;
|
|
... |
|
... |
537 |
// name.c_str(), msk.c_str()));
|
537 |
// name.c_str(), msk.c_str()));
|
538 |
if (ConfSimple::get(name, value, msk))
|
538 |
if (ConfSimple::get(name, value, msk))
|
539 |
return 1;
|
539 |
return 1;
|
540 |
string::size_type pos = msk.rfind("/");
|
540 |
string::size_type pos = msk.rfind("/");
|
541 |
if (pos != string::npos) {
|
541 |
if (pos != string::npos) {
|
542 |
msk.replace(pos, string::npos, "");
|
542 |
msk.replace(pos, string::npos, string());
|
543 |
} else
|
543 |
} else
|
544 |
break;
|
544 |
break;
|
545 |
}
|
545 |
}
|
546 |
return 0;
|
546 |
return 0;
|
547 |
}
|
547 |
}
|