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

Some syntac clean

parent 56086ba0
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
#include "configreader.h"
#include <utils/strings.h>
#include "graphics/newci.h"
#include "graphics/newcrt.h"
#include "utils/strings.h"
......@@ -72,7 +73,7 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
FILE *tx;
char txbuf[256], txarg[256], txarg2[256];
int erasegates, eraseload, erasemenu;
strlist_t *l1, *l2;
strlist_t *l1;
log_tool *tp;
cnfrec *cnfp;
char *TEMP;
......@@ -93,7 +94,6 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
strcpy(fn, "log.cnf");
if (!locatefile(fn, LINK))
*fn = '\0';
}
}
else
......@@ -160,8 +160,10 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
doimmedcnffunction();
docnffunction();
}
if (*LINK->cmdbuf == '\0' || strcmp(gg.func, LINK->cmdbuf))
continue;
if (strends(LINK->cmdbuf, ":") && strlen(LINK->cmdbuf) > 1)
{
if (*txbuf == '\0')
......@@ -181,6 +183,7 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
LINK->cnflast = cnfp;
continue;
}
if (!strcmp(LINK->cmdbuf, "INCLUDE"))
{
do
......@@ -193,11 +196,13 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
continue;
}
if (!strcmp(LINK->cmdbuf, "HOME"))
{
sethomedirname(txbuf);
continue;
}
if (!strcmp(LINK->cmdbuf, "GATES"))
{
strwordx(txbuf, txarg);
......@@ -216,6 +221,7 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
}
continue;
}
if (!strcmp(LINK->cmdbuf, "HELP"))
{
if (locatefile(txbuf, LINK))
......@@ -223,6 +229,7 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
continue;
}
if (!strcmp(LINK->cmdbuf, "NEWS"))
{
if (locatefile(txbuf, LINK))
......@@ -230,6 +237,7 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
continue;
}
if (!strcmp(LINK->cmdbuf, "MENU"))
{
getword(txbuf, txarg);
......@@ -243,12 +251,13 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
erasemenu = false;
while (*txarg != '\0')
{
l1 = strlist_append(&LINK->logmenu, txarg);
strlist_append(&LINK->logmenu, txarg);
getword(txbuf, txarg);
}
continue;
}
if (!strcmp(LINK->cmdbuf, "GET") || !strcmp(LINK->cmdbuf, "LOAD"))
{
getword(txbuf, txarg);
......@@ -262,11 +271,12 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
eraseload = false;
while (*txarg != '\0')
{
l1 = strlist_append(&LINK->loadgates, txarg);
strlist_append(&LINK->loadgates, txarg);
getword(txbuf, txarg);
}
continue;
}
if (!strcmp(LINK->cmdbuf, "GETGROUP"))
{
getword(txbuf, txarg);
......@@ -282,11 +292,12 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
l1->value = (na_long)NULL;
while (*txarg != '\0')
{
l2 = strlist_append((strlist_t **)(&l1->value), txarg);
strlist_append((strlist_t **)(&l1->value), txarg);
getword(txbuf, txarg);
}
continue;
}
if (!strcmp(LINK->cmdbuf, "TOOL"))
{
getword(txbuf, txarg);
......@@ -308,6 +319,7 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
getword(txbuf, txarg);
continue;
}
if (!strcmp(LINK->cmdbuf, "COMMAND"))
{
getword(txbuf, txarg2);
......@@ -327,6 +339,7 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
continue;
}
if (!strcmp(LINK->cmdbuf, "SIGNALS") || !strcmp(LINK->cmdbuf, "NODES"))
{
LINK->j = getint(txbuf, 0L);
......@@ -338,13 +351,17 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
gg.maxsignal = LINK->j;
continue;
}
if (!strcmp(LINK->cmdbuf, "DO"))
{
l2 = strlist_append(&thingstodo, gg.funcarg);
strlist_append(&thingstodo, gg.funcarg);
continue;
}
if (!strcmp(LINK->cmdbuf, "UNDO"))
{
strlist_empty(&thingstodo);
}
else if (strcmp(LINK->cmdbuf, "CTOLERANCE") &&
strcmp(LINK->cmdbuf, "CLOCK") &&
strcmp(LINK->cmdbuf, "SCOPE") &&
......@@ -374,6 +391,4 @@ void readcnf(char *fn_, struct LOC_initialize *LINK)
}
if (tx != NULL)
fclose(tx);
/*obsolete*/
}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter