Remove superfluous trailing white space from C files
This commit is contained in:
@@ -42,11 +42,11 @@ extern int DMC2280MotionControl;
|
||||
#define INST_READY_BIT (1 << 16)
|
||||
#define LAMP_TEST_BIT (1 << 17)
|
||||
|
||||
#define KEY_BOTH_BITS (KEY_ENABLED_BIT | KEY_DISABLED_BIT)
|
||||
#define SEC_BOTH_BITS (SEC_OPENED_BIT | SEC_CLOSED_BIT)
|
||||
#define TER_BOTH_BITS (TER_OPENED_BIT | TER_CLOSED_BIT)
|
||||
#define MOTOR_BOTH_BITS (MOTOR_ENABLED_BIT | MOTOR_DISABLED_BIT)
|
||||
#define ACCESS_BOTH_BITS (ACCESS_LOCKED_BIT | ACCESS_UNLOCKED_BIT)
|
||||
#define KEY_BOTH_BITS (KEY_ENABLED_BIT | KEY_DISABLED_BIT)
|
||||
#define SEC_BOTH_BITS (SEC_OPENED_BIT | SEC_CLOSED_BIT)
|
||||
#define TER_BOTH_BITS (TER_OPENED_BIT | TER_CLOSED_BIT)
|
||||
#define MOTOR_BOTH_BITS (MOTOR_ENABLED_BIT | MOTOR_DISABLED_BIT)
|
||||
#define ACCESS_BOTH_BITS (ACCESS_LOCKED_BIT | ACCESS_UNLOCKED_BIT)
|
||||
|
||||
static pAsyncProtocol LSS_Protocol = NULL;
|
||||
|
||||
@@ -198,10 +198,10 @@ static mxml_type_t xmlLoadStringCallback(mxml_node_t *node) {
|
||||
|
||||
|
||||
sprintf(value, "NO VALUE");
|
||||
|
||||
|
||||
type = mxmlElementGetAttr(node, "type");
|
||||
|
||||
if (type == NULL)
|
||||
if (type == NULL)
|
||||
type = node->value.element.name;
|
||||
|
||||
|
||||
@@ -215,10 +215,10 @@ static mxml_type_t xmlLoadStringCallback(mxml_node_t *node) {
|
||||
|
||||
if (myType == (MXML_INTEGER))
|
||||
sprintf(value, "%d", node->value.integer);
|
||||
|
||||
|
||||
if (myType == (MXML_TEXT))
|
||||
sprintf(value, "%s", "text");
|
||||
|
||||
|
||||
if (myType == (MXML_REAL))
|
||||
sprintf(value, "%f", node->value.real);
|
||||
|
||||
@@ -226,14 +226,14 @@ static mxml_type_t xmlLoadStringCallback(mxml_node_t *node) {
|
||||
sprintf(value, "%s", node->value.opaque);
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
if (node->value.text.string != NULL) {
|
||||
if (myType == (MXML_TEXT))
|
||||
snprintf(value, 132, "[%c]", node->value.text.string);
|
||||
}
|
||||
*/
|
||||
sprintf(line, "xmlLoadStringCallback: [%s] [%s] [%s] [%s] [%s] [%s]", node->value.element.name, type, mxmlElementGetAttr(node, "description"), mxmlElementGetAttr(node, "time"), mxmlElementGetAttr(node, "tag"), value);
|
||||
SICSLogWrite(line, eLog);
|
||||
SICSLogWrite(line, eLog);
|
||||
|
||||
return myType;
|
||||
}
|
||||
@@ -266,7 +266,7 @@ static int GetCallback(pAsyncTxn txn)
|
||||
|
||||
|
||||
/* free memory from previous tree */
|
||||
if (tree) {
|
||||
if (tree) {
|
||||
mxmlDelete(tree);
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ static int MyOneShotCallback(void* context, int mode)
|
||||
{
|
||||
|
||||
char line[132];
|
||||
|
||||
|
||||
pLSSController self = (pLSSController) context;
|
||||
self->oneshot = 0;
|
||||
AsyncUnitSendTxn(self->unit, "WRITE 0", 7, NULL, NULL, 132);
|
||||
@@ -316,7 +316,7 @@ static int MyTimerCallback(void* context, int mode)
|
||||
|
||||
/* disable READ-polling timer for now - wait for reply ... */
|
||||
NetWatchRemoveTimer(self->nw_tmr);
|
||||
|
||||
|
||||
|
||||
AsyncUnitSendTxn(self->unit, "READ", 4, GetCallback, self, 1024*1024);
|
||||
sprintf(line, "lssmonitor.c: MyTimerCallback() -> AsyncUnitSendTxn(READ 1MB)");
|
||||
@@ -425,28 +425,28 @@ static int LSS_Action(SConnection *pCon, SicsInterp *pSics,
|
||||
return OKOK;
|
||||
}
|
||||
else if (argc == 2) {
|
||||
if (strcasecmp(argv[1], "list") == 0) {
|
||||
if (strcasecmp(argv[1], "list") == 0) {
|
||||
|
||||
current = tree;
|
||||
|
||||
|
||||
for (node = mxmlWalkNext(current, tree, MXML_DESCEND); node != NULL; node = mxmlWalkNext(node, tree, MXML_DESCEND)) {
|
||||
if (node->value.element.attrs) {
|
||||
if (node->value.element.attrs) {
|
||||
if (mxmlElementGetAttr(node, "version") == NULL) {
|
||||
|
||||
snprintf(line, 132, "%s.%s %s = %s (%s)", argv[0], mxmlElementGetAttr(node, "description"), mxmlElementGetAttr(node, "tag"), node->child->value.text.string, mxmlElementGetAttr(node, "time"));
|
||||
SCWrite(pCon, line, eLog);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return OKOK;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* search by sub string */
|
||||
if (findElement(pCon, argv[1]) > 0) {
|
||||
return OKOK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
snprintf(line, 132, "%s does not understand %s", argv[0], argv[1]);
|
||||
@@ -480,13 +480,13 @@ static int LSS_Init(pLSSController self)
|
||||
NetWatchRemoveTimer(self->nw_tmr);
|
||||
|
||||
AsyncUnitSendTxn(self->unit, "READ", 4, GetCallback, self, 1024*1024);
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
NetWatchRegisterTimerPeriodic(&self->nw_tmr,
|
||||
2000, 2000,
|
||||
MyTimerCallback,
|
||||
self);
|
||||
self->timeout=120000;
|
||||
self->timeout=120000;
|
||||
*/
|
||||
return 1;
|
||||
}
|
||||
@@ -494,7 +494,7 @@ static int LSS_Init(pLSSController self)
|
||||
static void LSS_Kill(void* pData)
|
||||
{
|
||||
/* free memory from previous tree */
|
||||
if (tree) {
|
||||
if (tree) {
|
||||
mxmlDelete(tree);
|
||||
}
|
||||
|
||||
@@ -537,10 +537,10 @@ int LSSFactory(SConnection *pCon, SicsInterp *pSics,
|
||||
}
|
||||
|
||||
/*
|
||||
create data structure and open port
|
||||
create data structure and open port
|
||||
*/
|
||||
pNew = LSS_Create(argv[2]);
|
||||
|
||||
|
||||
if(!pNew)
|
||||
{
|
||||
SCWrite(pCon,"ERROR: failed to create LSS in LSSFactory",eError);
|
||||
@@ -553,7 +553,7 @@ int LSSFactory(SConnection *pCon, SicsInterp *pSics,
|
||||
sprintf(pError,"ERROR: failed to connect to %s",argv[2]);
|
||||
SCWrite(pCon,pError,eError);
|
||||
}
|
||||
/*
|
||||
/*
|
||||
for (i=0; i < sizeof(lss_parname)/sizeof(lss_parname[0]); i++) {
|
||||
lssVar = VarCreate(LSS_UserPriv,veText,lss_parname[i]);
|
||||
LSS_GetState(pNew,lss_parname[i],&lssState);
|
||||
|
||||
Reference in New Issue
Block a user