First commit towards replacing pCon-> with someFunc(pCon)

This is accompanied with the removal of dead code in conman.c and else
This commit is contained in:
2016-10-31 08:33:36 +01:00
parent fd5451e8fd
commit 0e2605b570
21 changed files with 171 additions and 433 deletions

View File

@ -295,9 +295,9 @@ int InterpExecute(SicsInterp * self, SConnection * pCon, char *pText)
assert(pCon);
/* write info to Log
if (pCon->sockHandle >= 0) {
if (SCGetSockHandle(pCon) >= 0) {
snprintf(pBueffel,1023, "Executing -> %s <- from socket %d", pText,
pCon->sockHandle);
SCGetSockHandle(pCon));
SICSLogWrite(pBueffel, eCommand);
} else {
snprintf(pBueffel,1023, "Executing -> %s <- from dummy socket\n", pText);
@ -348,14 +348,14 @@ int InterpExecute(SicsInterp * self, SConnection * pCon, char *pText)
self->eOut = eValue;
Tcl_ResetResult((Tcl_Interp *) self->pTcl);
MacroPush(pCon);
pCon->conStatus = 0;
SCSetConStatus(pCon,0);
old = StatisticsBegin(pCommand->stat);
iRet = pCommand->OFunc(pCon, self, pCommand->pData, argc, argv);
StatisticsEnd(old);
/* If a task is registered with the dev exec then conStatus is HWBusy */
if (pCon->conStatus != HWBusy) {
if (SCGetConStatus(pCon) != HWBusy) {
/*comCon = SCGetContext(pCon); */
if (0 != strcmp("contextdo", pCon->deviceID))
if (0 != strcmp("contextdo", SCGetDeviceID(pCon)))
SCWrite(pCon, "", eFinish);
}
MacroPop();