- Removed SCStart/EndBuffering as far as possible and fixed an issue with

the capture command in that it not put resluts into the Tcl interpreter.
  This broke scriptcontext scripts in complicated situations.
- Resolved some issues with the TAS calculation and negative scattering sense.
- Fixed a bug which did not reset the state to idle after checking
  reachability in confvirtualmot.c


SKIPPED:
	psi/autowin.c
	psi/eigera2.c
	psi/jvlprot.c
	psi/makefile_linux
	psi/sinqhttpopt.c
	psi/tasscan.c
This commit is contained in:
koennecke
2012-10-29 12:56:29 +00:00
parent d798373fdf
commit 4f560552c4
27 changed files with 599 additions and 129 deletions

View File

@ -982,17 +982,21 @@ void HMListOption(pHistMem self, SConnection * pCon)
memset(pValue, 0, sizeof(pValue));
memset(name, 0, sizeof(name));
SCStartBuffering(pCon);
buf = CreateDynString(256,256);
if(buf == NULL){
SCWrite(pCon,"ERROR: out of memory listing HM Options",eError);
return;
}
iRet = StringDictGet(self->pDriv->pOption, "name", name, 19);
if (0 == iRet) {
strcpy(name, "*");
}
iRet =
StringDictGet(self->pDriv->pOption, "driver", pValue,
sizeof(pValue) - 1);
StringDictGet(self->pDriv->pOption, "driver", pValue,
sizeof(pValue) - 1);
if (0 < iRet) {
snprintf(pBuffer,sizeof(pBuffer)-1, "%s.driver = %s", name, pValue);
SCWrite(pCon, pBuffer, eValue);
DynStringConcatLine(buf,pBuffer);
}
iRet = StringDictGetAsNumber(self->pDriv->pOption, "update", &fVal);
@ -1001,13 +1005,13 @@ void HMListOption(pHistMem self, SConnection * pCon)
} else {
snprintf(pBuffer,sizeof(pBuffer)-1, "%s.update = 0 (no buffering)", name);
}
SCWrite(pCon, pBuffer, eValue);
DynStringConcatLine(buf,pBuffer);
iRet = StringDictGetAsNumber(self->pDriv->pOption, "rank", &fVal);
if (0 < iRet) {
iRank = (int) rint(fVal);
snprintf(pBuffer,sizeof(pBuffer)-1, "%s.rank = %d", name, iRank);
SCWrite(pCon, pBuffer, eValue);
DynStringConcatLine(buf,pBuffer);
} else {
iRank = 0;
}
@ -1016,12 +1020,12 @@ void HMListOption(pHistMem self, SConnection * pCon)
iRet = StringDictGetAsNumber(self->pDriv->pOption, pValue, &fVal);
if (0 < iRet) {
snprintf(pBuffer,sizeof(pBuffer)-1, "%s.dim%1.1d = %d", name, i, (int) rint(fVal));
SCWrite(pCon, pBuffer, eValue);
DynStringConcatLine(buf,pBuffer);
}
}
pKey =
StringDictGetNext(self->pDriv->pOption, pValue, sizeof(pValue) - 1);
StringDictGetNext(self->pDriv->pOption, pValue, sizeof(pValue) - 1);
while (pKey != NULL) {
iDiscard = 0;
if (0 == strcmp("name", pKey))
@ -1036,20 +1040,21 @@ void HMListOption(pHistMem self, SConnection * pCon)
iDiscard = 1;
if (0 == iDiscard) {
snprintf(pBuffer, 511, "%s.%s = %s", name, pKey, pValue);
SCWrite(pCon, pBuffer, eValue);
DynStringConcatLine(buf,pBuffer);
}
pKey =
StringDictGetNext(self->pDriv->pOption, pValue,
sizeof(pValue) - 1);
StringDictGetNext(self->pDriv->pOption, pValue,
sizeof(pValue) - 1);
}
/* Display Count Mode */
snprintf(pBuffer,sizeof(pBuffer)-1, "%s.CountMode = %s", name, pMode[self->pDriv->eCount]);
DynStringConcatLine(buf,pBuffer);
SCWrite(pCon, pBuffer, eValue);
/* Display Preset */
snprintf(pBuffer,sizeof(pBuffer)-1, "%s.preset = %f", name, self->pDriv->fCountPreset);
SCWrite(pCon, pBuffer, eValue);
DynStringConcatLine(buf,pBuffer);
if (self->pDriv->data->nTimeChan > 2) {
tofMode = 1;
@ -1057,11 +1062,9 @@ void HMListOption(pHistMem self, SConnection * pCon)
tofMode = 0;
}
snprintf(pBuffer,sizeof(pBuffer)-1, "%s.tofMode = %d", name, tofMode);
SCWrite(pCon, pBuffer, eValue);
buf = SCEndBuffering(pCon);
if (buf != NULL) {
SCWrite(pCon, GetCharArray(buf), eValue);
}
DynStringConcatLine(buf,pBuffer);
SCWrite(pCon, GetCharArray(buf), eValue);
DeleteDynString(buf);
}
/*--------------------------------------------------------------------------*/