From 25152bd69a070aa7ba84248b368b0803e407272a Mon Sep 17 00:00:00 2001 From: couriersud Date: Mon, 23 Jan 2017 21:20:09 +0100 Subject: Netlist refactoring: - Refactored netlist pmf code. - Small optimization for diode calculations. - Minor refactoring across the board. (nw) --- src/lib/netlist/prg/nltool.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/lib/netlist/prg/nltool.cpp') diff --git a/src/lib/netlist/prg/nltool.cpp b/src/lib/netlist/prg/nltool.cpp index 910f9078561..14b7409b95e 100644 --- a/src/lib/netlist/prg/nltool.cpp +++ b/src/lib/netlist/prg/nltool.cpp @@ -502,12 +502,30 @@ static const pstring pmf_verbose[] = }; #endif +struct tt +{ + void test(int a) {printf ("test :%d\n", a);} + int test1() { return 1;} +}; + +plib::pmfp atest; +plib::pmfp atest1; int main(int argc, char *argv[]) { tool_options_t opts; int ret; + tt x; + + atest.set(&tt::test, &x); + atest1.set(&tt::test1, &x); + + atest(1); + int a = atest1(); + + printf("%d\n", a); + //return 1 ; /* make SIGFPE actually deliver signals on supoorted platforms */ plib::fpsignalenabler::global_enable(true); plib::fpsignalenabler sigen(plib::FP_ALL & ~plib::FP_INEXACT & ~plib::FP_UNDERFLOW); -- cgit v1.2.3