Skip to content
Extraits de code Groupes Projets
Valider 4b3b3d79 rédigé par Etienne BRATEAU's avatar Etienne BRATEAU
Parcourir les fichiers

Reindent some files

parent f8422085
Branches update-structs
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #1765 en échec
#include "attrs.h"
#include "settings.h"
#include <string.h>
#include <utils/strings.h>
#include "settings.h"
void newattrs(log_gattrrec **gattr, short numattrs, log_kattrrec *kattr)
{
......
......@@ -271,8 +271,11 @@ void closergate(short x, short y)
log_page *current_page = get_current_page();
if (gg.textinvisible)
{
gg.nearlabel = NULL;
else {
}
else
{
gg.nearlabel = current_page->lbase;
while (gg.nearlabel != NULL &&
(x < gg.nearlabel->x ||
......@@ -282,12 +285,16 @@ void closergate(short x, short y)
gg.nearlabel = gg.nearlabel->next;
}
}
if (gg.nearlabel != NULL) {
if (gg.nearlabel != NULL)
{
gg.nearbox = NULL;
gg.neargate = NULL;
return;
}
if (!gg.textinvisible) {
if (!gg.textinvisible)
{
gg.nearbox = current_page->bbase;
while (gg.nearbox != NULL &&
((x != gg.nearbox->x1 && x != gg.nearbox->x2 &&
......@@ -295,13 +302,18 @@ void closergate(short x, short y)
y != gg.nearbox->y2) || x < gg.nearbox->x1 ||
x > gg.nearbox->x2 || y < gg.nearbox->y1 || y > gg.nearbox->y2))
gg.nearbox = gg.nearbox->next;
} else
}
else
{
gg.nearbox = NULL;
}
if (gg.nearbox != NULL)
{
gg.neargate = NULL;
return;
}
gg.neargate = current_page->gbase;
while (gg.neargate != NULL && !insidegate(gg.neargate, x, y))
gg.neargate = gg.neargate->next;
......@@ -463,7 +475,8 @@ void disconnectgate(log_grec *gate)
if (!P_inset(i, done))
{
j = i;
do {
do
{
chggatepin(gate, j, &oldnode[i - 1]);
P_addset(done, j);
j = gate->kind->pin[j - 1].c;
......@@ -601,11 +614,14 @@ int connectgate(log_grec *gate)
}
g1 = g1->next;
}
if (n1 != NULL)
queuecombine(&cnbase, &gate->pin[ptrs[i] - 1], n1);
}
if (gate->kind->simtype == simtype_common && gate->sig != 0)
queuecombine(&cnbase, &gg.signaltab[gate->sig - 1].np, gate->pin);
gg.actflag = true;
calltoolgate(gate, act_connectgate);
success = gg.actflag;
......@@ -682,11 +698,13 @@ void addgate2(short x, short y, short gtype, short sig, log_gattrrec *attrs)
clipon();
drawgatex(g);
clipoff();
if (!connectgate(g))
{
frygate(g);
disposegate(&g);
}
gg.refrflag = true;
gg.neargate = g;
}
......
......@@ -75,6 +75,7 @@ void disposenode(log_nrec **node)
trace_message("Dispose node %p\n", *node);
if (*node == NULL)
return;
if ((*node)->conflict || (*node)->oconflict)
{
n1 = nodeconflictbase;
......@@ -91,8 +92,10 @@ void disposenode(log_nrec **node)
else
n2->confnext = (*node)->confnext;
}
if (*node == gg.probenode)
gg.probenode = NULL;
stamp(&(*node)->simtype->netstamp);
calltoolnode(*node, act_disposenode);
n1 = gg.nbase;
......@@ -104,6 +107,7 @@ void disposenode(log_nrec **node)
{
while (n1 != NULL && n1->next != *node)
n1 = n1->next;
if (n1 == NULL)
report(10, rtn);
else
......@@ -151,13 +155,19 @@ void unrefnode(log_nrec **node)
{
if (*node == NULL)
return;
(*node)->ref--;
trace_message("Unref node %p -> %d\n", *node, (*node)->ref);
if ((*node)->ref > 0)
return;
if ((*node)->ref < 0)
{
report(10, rtn);
else {
}
else
{
if (!(*node)->keep)
disposenode(node);
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter