summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/nltool.c
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2015-05-27 13:47:22 +0200
committer couriersud <couriersud@arcor.de>2015-05-27 23:18:44 +0200
commitcef370aa13953c3bcfa185c818c76812c34f13fc (patch)
tree6ecc90526c03f1e2411328ac2e3d635f9b952922 /src/tools/nltool.c
parente9fe1e74c46f40379bcdc472b97c4aef4d3a91e6 (diff)
Moved all files in src/emu/netlist starting with p into plib folder.
This is a first step to ease synchronisation with a stand alone, e.g. outside mame, netlist implementation. More signed/unsigned cleanups and started work on generic truthtable devices. (nw)
Diffstat (limited to 'src/tools/nltool.c')
-rw-r--r--src/tools/nltool.c41
1 files changed, 18 insertions, 23 deletions
diff --git a/src/tools/nltool.c b/src/tools/nltool.c
index 555131defce..78d0633d121 100644
--- a/src/tools/nltool.c
+++ b/src/tools/nltool.c
@@ -11,23 +11,24 @@
#include <cstdio>
#ifdef PSTANDALONE
-#if (PSTANDALONE)
+ #if (PSTANDALONE)
#define PSTANDALONE_PROVIDED
+ #endif
#endif
-#endif
-
-#ifdef PSTANDALONE_PROVIDED
-#include <ctime>
-
-#include "poptions.h"
-#include "pstring.h"
-#include "plists.h"
+#include "plib/poptions.h"
+#include "plib/pstring.h"
+#include "plib/plists.h"
#include "nl_setup.h"
#include "nl_factory.h"
#include "nl_parser.h"
#include "devices/net_lib.h"
+
+#ifdef PSTANDALONE_PROVIDED
+
+#include <ctime>
+
#define osd_ticks_t clock_t
inline osd_ticks_t osd_ticks_per_second() { return CLOCKS_PER_SEC; }
@@ -35,14 +36,8 @@ inline osd_ticks_t osd_ticks_per_second() { return CLOCKS_PER_SEC; }
osd_ticks_t osd_ticks(void) { return clock(); }
#else
-#include "netlist/poptions.h"
-#include "netlist/pstring.h"
-#include "netlist/plists.h"
-#include "netlist/nl_setup.h"
-#include "netlist/nl_factory.h"
-#include "netlist/nl_parser.h"
-#include "netlist/devices/net_lib.h"
#endif
+
/***************************************************************************
* MAME COMPATIBILITY ...
*
@@ -209,7 +204,7 @@ public:
void log_setup()
{
NL_VERBOSE_OUT(("Creating dynamic logs ...\n"));
- nl_util::pstring_list ll = nl_util::split(m_logs, ":");
+ pstring_list_t ll(m_logs, ":");
for (int i=0; i < ll.size(); i++)
{
pstring name = "log_" + ll[i];
@@ -360,7 +355,7 @@ public:
void convert(const pstring &contents)
{
- nl_util::pstring_list spnl = nl_util::split(contents, "\n");
+ pstring_list_t spnl(contents, "\n");
// Add gnd net
@@ -369,7 +364,7 @@ public:
pstring line = "";
- for (int i=0; i < spnl.size(); i++)
+ for (std::size_t i=0; i < spnl.size(); i++)
{
// Basic preprocessing
pstring inl = spnl[i].trim().ucase();
@@ -393,14 +388,14 @@ protected:
: m_name(aname), m_no_export(false) {}
const pstring &name() { return m_name;}
- nl_util::pstring_list &terminals() { return m_terminals; }
+ pstring_list_t &terminals() { return m_terminals; }
void set_no_export() { m_no_export = true; }
bool is_no_export() { return m_no_export; }
private:
pstring m_name;
bool m_no_export;
- nl_util::pstring_list m_terminals;
+ pstring_list_t m_terminals;
};
struct sp_dev_t
@@ -538,7 +533,7 @@ protected:
{
if (line != "")
{
- nl_util::pstring_list tt = nl_util::split(line, " ", true);
+ pstring_list_t tt(line, " ", true);
double val = 0.0;
switch (tt[0].cstr()[0])
{
@@ -646,7 +641,7 @@ convert_t::sp_unit convert_t::m_sp_units[] = {
{"", "%g", 1.0e0 },
{"M", "CAP_M(%g)", 1.0e-3 },
{"U", "CAP_U(%g)", 1.0e-6 },
- {"??", "CAP_U(%g)", 1.0e-6 },
+ {"ยต", "CAP_U(%g)", 1.0e-6 },
{"N", "CAP_N(%g)", 1.0e-9 },
{"P", "CAP_P(%g)", 1.0e-12},
{"F", "%ge-15", 1.0e-15},