Return space separated lists because they transform directly int Tcl lists.
r1645 | ffr | 2007-03-14 08:06:04 +1100 (Wed, 14 Mar 2007) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
72a14a092f
commit
e508c8c351
20
sicslist.c
20
sicslist.c
@@ -24,9 +24,9 @@ static void listAllObjects(SConnection *pCon, SicsInterp *pSics){
|
||||
while(pCom != NULL){
|
||||
Tcl_DStringAppend(&lst,pCom->pName,-1);
|
||||
pCom = pCom->pNext;
|
||||
Tcl_DStringAppend(&lst, ",",-1);
|
||||
Tcl_DStringAppend(&lst, " ",-1); //ffr "," -> " "
|
||||
}
|
||||
Tcl_DStringAppend(&lst,"ENDLIST",-1);
|
||||
//ffr Tcl_DStringAppend(&lst,"ENDLIST",-1);
|
||||
SCWrite(pCon,Tcl_DStringValue(&lst), eValue);
|
||||
Tcl_DStringFree(&lst);
|
||||
}
|
||||
@@ -76,7 +76,7 @@ static void listAllObjectData(SConnection *pCon, char *name, pDummy data){
|
||||
prop = prop->pNext;
|
||||
}
|
||||
}
|
||||
Tcl_DStringAppend(&lst,"ENDLIST",-1);
|
||||
//ffr Tcl_DStringAppend(&lst,"ENDLIST",-1);
|
||||
SCWrite(pCon,Tcl_DStringValue(&lst),eValue);
|
||||
Tcl_DStringFree(&lst);
|
||||
}
|
||||
@@ -192,7 +192,7 @@ static void listToString(int list,Tcl_DString *txt){
|
||||
pPtr = (char *)LLDnodePtr(list);
|
||||
if(pPtr != NULL){
|
||||
Tcl_DStringAppend(txt,pPtr,-1);
|
||||
Tcl_DStringAppend(txt, ",",-1);
|
||||
Tcl_DStringAppend(txt, " ",-1); //ffr "," -> " "
|
||||
}
|
||||
status = LLDnodePtr2Next(list);
|
||||
}
|
||||
@@ -221,7 +221,7 @@ static void printKeyTypes(SicsInterp *pSics, SConnection *pCon,
|
||||
}
|
||||
pCom = pCom->pNext;
|
||||
}
|
||||
LLDstringAppend(list,"ENDLIST");
|
||||
//ffr LLDstringAppend(list,"ENDLIST");
|
||||
|
||||
listToString(list,&result);
|
||||
SCWrite(pCon,Tcl_DStringValue(&result),eValue);
|
||||
@@ -257,11 +257,11 @@ static void printObjectsMatchingKeyVal(SicsInterp *pSics,
|
||||
}
|
||||
if(status == 1){
|
||||
Tcl_DStringAppend(&result,pCom->pName,-1);
|
||||
Tcl_DStringAppend(&result, ",",-1);
|
||||
Tcl_DStringAppend(&result, " ",-1); //ffr "," -> " "
|
||||
}
|
||||
pCom = pCom->pNext;
|
||||
}
|
||||
Tcl_DStringAppend(&result,"ENDLIST",-1);
|
||||
//ffr Tcl_DStringAppend(&result,"ENDLIST",-1);
|
||||
SCWrite(pCon,Tcl_DStringValue(&result),eValue);
|
||||
Tcl_DStringFree(&result);
|
||||
}
|
||||
@@ -375,7 +375,7 @@ static int printServer(SConnection *pCon){
|
||||
Tcl_DStringAppend(&txt,buffer,-1);
|
||||
current = current->pNext;
|
||||
}
|
||||
Tcl_DStringAppend(&txt,"ENDLIST",-1);
|
||||
//ffr Tcl_DStringAppend(&txt,"ENDLIST",-1);
|
||||
SCWrite(pCon,Tcl_DStringValue(&txt),eValue);
|
||||
Tcl_DStringFree(&txt);
|
||||
return 1;
|
||||
@@ -441,11 +441,11 @@ static void printMatch(SConnection *pCon, SicsInterp *pSics,
|
||||
while(current != NULL){
|
||||
if(!match(mask,current->pName)){
|
||||
Tcl_DStringAppend(&txt, current->pName,-1);
|
||||
Tcl_DStringAppend(&txt, ",",-1);
|
||||
Tcl_DStringAppend(&txt, " ",-1); //ffr "," -> " "
|
||||
}
|
||||
current = current->pNext;
|
||||
}
|
||||
Tcl_DStringAppend(&txt,"ENDLIST",-1);
|
||||
//ffr Tcl_DStringAppend(&txt,"ENDLIST",-1);
|
||||
SCWrite(pCon,Tcl_DStringValue(&txt), eValue);
|
||||
Tcl_DStringFree(&txt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user