summaryrefslogtreecommitdiff
path: root/ldmicro/circuit.cpp
diff options
context:
space:
mode:
authorNatsuDrag92018-06-20 10:26:35 +0530
committerGitHub2018-06-20 10:26:35 +0530
commit8e2c2404515f5620b7dfd4874920a7186a54d4b2 (patch)
tree53e2dc05dbb3e4197065e1cc6eba739958339e8f /ldmicro/circuit.cpp
parent01962644e01a465f49e6bf6081c969175b18535a (diff)
parentc411d23bc89a22a3a18f69b339262e65ae91b8e2 (diff)
downloadLDMicroGtk-8e2c2404515f5620b7dfd4874920a7186a54d4b2.tar.gz
LDMicroGtk-8e2c2404515f5620b7dfd4874920a7186a54d4b2.tar.bz2
LDMicroGtk-8e2c2404515f5620b7dfd4874920a7186a54d4b2.zip
Merge pull request #19 from NatsuDrag9/GUI_port
Gui port
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();
}