summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2020-08-15 22:20:03 +0200
committer couriersud <couriersud@gmx.org>2020-08-15 22:20:24 +0200
commit290ffa74fc56b7f756222fc0dd1f51da31b7e9db (patch)
treea0ac6d2f8de2b11a492e2567293bb5068b94db8b
parenta2248e8e18bf50384344ed88c57c86ee915155e0 (diff)
netlist: Remove printf debugging.
* also raises error if during parsing a local source is not found.
-rw-r--r--src/lib/netlist/nl_errstr.h1
-rw-r--r--src/lib/netlist/nl_parser.cpp3
-rw-r--r--src/lib/netlist/nl_setup.cpp2
3 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/netlist/nl_errstr.h b/src/lib/netlist/nl_errstr.h
index dc5008404f4..e5844bbb4ab 100644
--- a/src/lib/netlist/nl_errstr.h
+++ b/src/lib/netlist/nl_errstr.h
@@ -50,6 +50,7 @@ namespace netlist
PERRMSGV(MF_DIPPINS_EQUAL_NUMBER_1, 1, "DIPPINS requires equal number of pins to DIPPINS, first pin is {}")
PERRMSGV(MF_PARAM_NOT_FP_1, 1, "Parameter value <{1}> not floating point")
PERRMSGV(MF_TT_LINE_WITHOUT_HEAD, 0, "TT_LINE found without TT_HEAD")
+ PERRMSGV(MF_LOCAL_SOURCE_NOT_FOUND_1, 1, "Local source not found: <{1}>")
// nl_setup.cpp
diff --git a/src/lib/netlist/nl_parser.cpp b/src/lib/netlist/nl_parser.cpp
index f86b3d129eb..d8b8da88419 100644
--- a/src/lib/netlist/nl_parser.cpp
+++ b/src/lib/netlist/nl_parser.cpp
@@ -343,11 +343,10 @@ void parser_t::register_local_as_source(const pstring &name)
auto p = m_local.find(name);
if (p != m_local.end())
{
- printf("found %s\n", name.c_str());
m_setup.register_source<source_token_t>(name, p->second);
}
else
- printf("argh %s\n", name.c_str());
+ error(MF_LOCAL_SOURCE_NOT_FOUND_1(name));
}
void parser_t::net_external_source()
diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp
index 162880ba9e3..394d5008f00 100644
--- a/src/lib/netlist/nl_setup.cpp
+++ b/src/lib/netlist/nl_setup.cpp
@@ -1731,10 +1731,8 @@ source_file_t::stream_ptr source_pattern_t::stream(const pstring &name)
{
pstring filename = plib::pfmt(m_pattern)(name);
auto f = std::make_unique<plib::ifstream>(plib::filesystem::u8path(filename));
- printf("checking <%s> %s\n", name.c_str(), filename.c_str());
if (f->is_open())
{
- printf("found\n");
return stream_ptr(std::move(f), filename);
}
else