summaryrefslogtreecommitdiff
path: root/ldmicro/circuit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ldmicro/circuit.cpp')
-rw-r--r--ldmicro/circuit.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/ldmicro/circuit.cpp b/ldmicro/circuit.cpp
index 1d9d3d7..8b1a8e9 100644
--- a/ldmicro/circuit.cpp
+++ b/ldmicro/circuit.cpp
@@ -24,9 +24,11 @@
#include <linuxUI.h>
#include <stdio.h>
#include <stdlib.h>
+#include <iostream>
#include "ldmicro.h"
+using namespace std;
static ElemSubcktSeries *LoadSeriesFromFile(FILE *f);
@@ -35,10 +37,12 @@ static ElemSubcktSeries *LoadSeriesFromFile(FILE *f);
//-----------------------------------------------------------------------------
ElemLeaf *AllocLeaf(void)
{
+ cout << "Inside AlocLeaf" << "\n";
return (ElemLeaf *)CheckMalloc(sizeof(ElemLeaf));
}
ElemSubcktSeries *AllocSubcktSeries(void)
{
+ cout << "Inside AllocSub" << "\n";
return (ElemSubcktSeries *)CheckMalloc(sizeof(ElemSubcktSeries));
}
ElemSubcktParallel *AllocSubcktParallel(void)
@@ -638,7 +642,7 @@ void FreeCircuit(int which, void *any)
//-----------------------------------------------------------------------------
void FreeEntireProgram(void)
{
- ForgetEverything();
+ // ForgetEverything();
int i;
for(i = 0; i < Prog.numRungs; i++) {
@@ -742,11 +746,15 @@ void DeleteSelectedRung(void)
//-----------------------------------------------------------------------------
static ElemSubcktSeries *AllocEmptyRung(void)
{
+ cout << "Inside AllocEmpty" << "\n";
ElemSubcktSeries *s = AllocSubcktSeries();
+ cout << "Checking series count" << "\n";
s->count = 1;
+ cout << "Series count done" << "\n";
s->contents[0].which = ELEM_PLACEHOLDER;
ElemLeaf *l = AllocLeaf();
s->contents[0].d.leaf = l;
+ cout << "Exiting AllocEmpty" << "\n";
return s;
}
@@ -815,7 +823,7 @@ void NewProgram(void)
{
UndoFlush();
FreeEntireProgram();
-
+
Prog.numRungs = 1;
Prog.rungs[0] = AllocEmptyRung();
}