PSI sics-cvs-psi-2008-10-02
This commit is contained in:
19
nxutil.c
19
nxutil.c
@@ -28,8 +28,9 @@
|
||||
int iRet;
|
||||
|
||||
/* Find the motor */
|
||||
strtolower(pName);
|
||||
pMot = FindMotor(pSics,pName);
|
||||
strncpy(pBueffel,pName,511);
|
||||
strtolower(pBueffel);
|
||||
pMot = FindMotor(pSics,pBueffel);
|
||||
if(!pMot)
|
||||
{
|
||||
sprintf(pBueffel,"WARNING: cannot find motor %s",pName);
|
||||
@@ -58,8 +59,9 @@
|
||||
int iRet;
|
||||
|
||||
/* Find the motor */
|
||||
strtolower(pName);
|
||||
pMot = FindMotor(pSics,pName);
|
||||
strncpy(pBueffel,pName,511);
|
||||
strtolower(pBueffel);
|
||||
pMot = FindMotor(pSics,pBueffel);
|
||||
if(!pMot)
|
||||
{
|
||||
sprintf(pBueffel,"WARNING: cannot find motor %s",pName);
|
||||
@@ -95,8 +97,9 @@
|
||||
char *pText = NULL;
|
||||
|
||||
/* find it */
|
||||
strtolower(pName);
|
||||
pVar = FindVariable(pSics,pName);
|
||||
strncpy(pBueffel,pName,511);
|
||||
strtolower(pBueffel);
|
||||
pVar = FindVariable(pSics,pBueffel);
|
||||
if(!pVar)
|
||||
{
|
||||
sprintf(pBueffel,"WARNING: cannot find variable %s",pName);
|
||||
@@ -112,7 +115,9 @@
|
||||
VarGetText(pVar,&pText);
|
||||
if(pText != NULL)
|
||||
{
|
||||
iRet = NXDputalias(hFil,pDict,pAlias,pText);
|
||||
memset(pBueffel,0,511);
|
||||
strncpy(pBueffel,pText,511);
|
||||
iRet = NXDputalias(hFil,pDict,pAlias,pBueffel);
|
||||
free(pText);
|
||||
return iRet;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user