mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
error: declaration of 'in' shadows a previous local
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@110 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -30,7 +30,7 @@
|
|||||||
* -----------
|
* -----------
|
||||||
*
|
*
|
||||||
* - extension of lines across multiple lines using \ is not supported
|
* - extension of lines across multiple lines using \ is not supported
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool read_file(const std::string filename, std::list<std::string> &line)
|
bool read_file(const std::string filename, std::list<std::string> &line)
|
||||||
@@ -83,7 +83,7 @@ std::string remove_interface_from_line(const std::string interface, const std::s
|
|||||||
if (in >> s)
|
if (in >> s)
|
||||||
{
|
{
|
||||||
out << s; /* auto */
|
out << s; /* auto */
|
||||||
|
|
||||||
while (in >> s)
|
while (in >> s)
|
||||||
{
|
{
|
||||||
if (s != interface)
|
if (s != interface)
|
||||||
@@ -109,13 +109,13 @@ bool write_interface(const std::string filename, const std::string name, const b
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
std::istringstream in((*it).c_str());
|
std::istringstream in((*it).c_str());
|
||||||
|
|
||||||
if (!(in >> s))
|
if (!(in >> s))
|
||||||
{
|
{
|
||||||
it++;
|
it++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s != std::string("iface"))
|
if (s != std::string("iface"))
|
||||||
{
|
{
|
||||||
if (s == std::string("auto"))
|
if (s == std::string("auto"))
|
||||||
@@ -147,14 +147,14 @@ bool write_interface(const std::string filename, const std::string name, const b
|
|||||||
it++;
|
it++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s != std::string(name))
|
if (s != std::string(name))
|
||||||
{
|
{
|
||||||
it++;
|
it++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
found = true;
|
found = true;
|
||||||
|
|
||||||
/* replace line */
|
/* replace line */
|
||||||
@@ -164,7 +164,7 @@ bool write_interface(const std::string filename, const std::string name, const b
|
|||||||
|
|
||||||
if (automatic_start)
|
if (automatic_start)
|
||||||
line.insert(it, "auto " + name);
|
line.insert(it, "auto " + name);
|
||||||
|
|
||||||
/* add attributes */
|
/* add attributes */
|
||||||
it++;
|
it++;
|
||||||
it = add_attributes(attribute, line, it);
|
it = add_attributes(attribute, line, it);
|
||||||
@@ -174,27 +174,27 @@ bool write_interface(const std::string filename, const std::string name, const b
|
|||||||
{
|
{
|
||||||
std::istringstream in((*it).c_str());
|
std::istringstream in((*it).c_str());
|
||||||
|
|
||||||
if (!(in >> s)) /* retain empty lines */
|
if (!(in >> s)) /* retain empty lines */
|
||||||
{
|
{
|
||||||
it++;
|
it++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s[0] == '#') /* retain comments */
|
if (s[0] == '#') /* retain comments */
|
||||||
{
|
{
|
||||||
it++;
|
it++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s == std::string("iface"))
|
if (s == std::string("iface"))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (s == std::string("auto"))
|
if (s == std::string("auto"))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (s == std::string("mapping"))
|
if (s == std::string("mapping"))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
it = line.erase(it);
|
it = line.erase(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -238,16 +238,16 @@ bool read_interface(const std::string filename, const std::string name, bool &au
|
|||||||
advance = true;
|
advance = true;
|
||||||
|
|
||||||
{
|
{
|
||||||
std::istringstream in(s.c_str());
|
std::istringstream in2(s.c_str());
|
||||||
|
|
||||||
if (!(in >> s))
|
if (!(in2 >> s))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (s != std::string("iface"))
|
if (s != std::string("iface"))
|
||||||
{
|
{
|
||||||
if (s == std::string("auto"))
|
if (s == std::string("auto"))
|
||||||
{
|
{
|
||||||
while (in >> s)
|
while (in2 >> s)
|
||||||
{
|
{
|
||||||
if (s == std::string(name))
|
if (s == std::string(name))
|
||||||
{
|
{
|
||||||
@@ -259,18 +259,18 @@ bool read_interface(const std::string filename, const std::string name, bool &au
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(in >> s))
|
if (!(in2 >> s))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (s != std::string(name))
|
if (s != std::string(name))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!(in >> s))
|
if (!(in2 >> s))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!(in >> t))
|
if (!(in2 >> t))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
family = s;
|
family = s;
|
||||||
method = t;
|
method = t;
|
||||||
}
|
}
|
||||||
@@ -280,26 +280,26 @@ bool read_interface(const std::string filename, const std::string name, bool &au
|
|||||||
if (!getline(in, s))
|
if (!getline(in, s))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
std::istringstream in(s.c_str());
|
std::istringstream in3(s.c_str());
|
||||||
|
|
||||||
if (!(in >> t)) /* ignore empty lines */
|
if (!(in3 >> t)) /* ignore empty lines */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (t[0] == '#') /* ignore comments */
|
if (t[0] == '#') /* ignore comments */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (t == std::string("iface"))
|
if (t == std::string("iface"))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (t == std::string("auto"))
|
if (t == std::string("auto"))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (t == std::string("mapping"))
|
if (t == std::string("mapping"))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (!(in >> s))
|
if (!(in3 >> s))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
attribute[t] = s;
|
attribute[t] = s;
|
||||||
}
|
}
|
||||||
advance = false;
|
advance = false;
|
||||||
|
Reference in New Issue
Block a user