- added new scriptcontext with devser

This commit is contained in:
zolliker
2008-05-14 14:23:16 +00:00
parent bbb0b971a9
commit 3967dc8844
28 changed files with 1307 additions and 1363 deletions

View File

@ -179,6 +179,11 @@
else
{
strncpy(pResult,sVal.value,iLen);
/* strncpy is not guaranteed to be '\0' terminated */
if (iLen > 0 && pResult[iLen-1] != '\0') {
/* overflow */
pResult[iLen-1] = '\0';
}
return 1;
}
}
@ -186,6 +191,24 @@
}
return 0;
}
/*--------------------------------------------------------------------------*/
char *StringDictGetShort(pStringDict self, char *name)
{
SDE sVal;
int iRet;
iRet = LLDnodePtr2First(self->iList);
while(iRet != 0)
{
LLDnodeDataTo(self->iList,&sVal);
if(strcmp(sVal.name,name) == 0)
{
return sVal.value;
}
iRet = LLDnodePtr2Next(self->iList);
}
return NULL;
}
/*------------------------------------------------------------------------*/
int StringDictDelete(pStringDict self, char *name)
{