*** empty log message ***
This commit is contained in:
14
tclintimpl.c
14
tclintimpl.c
@@ -136,13 +136,21 @@ int TclIntAction(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
pTclInt self = NULL;
|
||||
char pBuffer[1024];
|
||||
char *cmd;
|
||||
float val;
|
||||
|
||||
self = (pTclInt)pData;
|
||||
assert(self);
|
||||
if(argc < 2){
|
||||
sprintf(pBuffer,"ERROR: %s expects at least one argument!", argv[0]);
|
||||
SCWrite(pCon,pBuffer,eError);
|
||||
return 0;
|
||||
if(self->pDriv->GetValue != NULL){
|
||||
val = self->pDriv->GetValue(self,pCon);
|
||||
snprintf(pBuffer,1024,"%s = %f", argv[0], val);
|
||||
SCWrite(pCon,pBuffer,eValue);
|
||||
return 1;
|
||||
} else {
|
||||
sprintf(pBuffer,"ERROR: %s expects at least one argument!", argv[0]);
|
||||
SCWrite(pCon,pBuffer,eError);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
strtolower(argv[1]);
|
||||
|
||||
Reference in New Issue
Block a user