- Switched to NAPI-3.0 with XML support
- Fixed exeman to write files by default into the first directory in batchpath - Fixed a bug in nxdict which prevented it from handling attributes containing :/ properly - Removed junk files - Fixed a bug in hklscan.c which made it dump core - Added XML support to nxscript.c - Added support for writing NeXus-XML data files to tasub
This commit is contained in:
63
nxdict.c
63
nxdict.c
@ -733,6 +733,67 @@
|
||||
/* not reached */
|
||||
return;
|
||||
}
|
||||
/*-----------------------------------------------------------------------*/
|
||||
static void NXDIAttValue(ParDat *sStat)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
sStat->pToken[0] = '\0';
|
||||
|
||||
/* skip whitespace */
|
||||
while( (*(sStat->pPtr) == ' ') || (*(sStat->pPtr) == '\t') )
|
||||
{
|
||||
sStat->pPtr++;
|
||||
}
|
||||
|
||||
if(*(sStat->pPtr) == ',')
|
||||
{
|
||||
sStat->iToken = DKOMMA;
|
||||
sStat->pToken[0] = *(sStat->pPtr);
|
||||
sStat->pPtr++;
|
||||
return;
|
||||
}
|
||||
else if(*(sStat->pPtr) == '\0')
|
||||
{
|
||||
sStat->iToken = DEND;
|
||||
sStat->pToken[0] = *(sStat->pPtr);
|
||||
sStat->pPtr++;
|
||||
return;
|
||||
}
|
||||
else if(*(sStat->pPtr) == '{')
|
||||
{
|
||||
sStat->iToken = DOPEN;
|
||||
sStat->pToken[0] = *(sStat->pPtr);
|
||||
sStat->pPtr++;
|
||||
return;
|
||||
}
|
||||
else if(*(sStat->pPtr) == '}')
|
||||
{
|
||||
sStat->iToken = DCLOSE;
|
||||
sStat->pToken[0] = *(sStat->pPtr);
|
||||
sStat->pPtr++;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
sStat->iToken = DWORD;
|
||||
/* copy word to pToken */
|
||||
i = 0;
|
||||
while( (*(sStat->pPtr) != ' ') && (*(sStat->pPtr) != '\t') &&
|
||||
(*(sStat->pPtr) != '\0') &&
|
||||
(*(sStat->pPtr) != ',') && (*(sStat->pPtr) != '}') )
|
||||
{
|
||||
sStat->pToken[i] = *(sStat->pPtr);
|
||||
sStat->pPtr++;
|
||||
i++;
|
||||
}
|
||||
sStat->pToken[i] = '\0';
|
||||
return;
|
||||
}
|
||||
/* not reached */
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
@ -864,7 +925,7 @@
|
||||
}
|
||||
|
||||
/* a word is expected */
|
||||
NXDIDefToken(pParse);
|
||||
NXDIAttValue(pParse);
|
||||
if(pParse->iToken != DWORD)
|
||||
{
|
||||
sprintf(pError,"ERROR: expected attribute value, got %s",pParse->pToken);
|
||||
|
Reference in New Issue
Block a user