- Adapted indenation to new agreed upon system

- Added support for second generation scriptcontext based counter
This commit is contained in:
koennecke
2009-02-13 09:00:03 +00:00
parent a3dcad2bfa
commit 91d4af0541
405 changed files with 88101 additions and 88173 deletions

View File

@ -21,10 +21,11 @@
static int UserScanPoints(pScanData self, int iPoint)
{
/*
do nothing as the user is supposed to take care of the data file
*/
do nothing as the user is supposed to take care of the data file
*/
return 1;
}
/*-----------------------------------------------------------------------
Execute the users special procedure
------------------------------------------------------------------------*/
@ -38,33 +39,33 @@ static int UserCount(pScanData self, int iPoint)
assert(self->pCon);
/* check for existence of command to run */
if(self->pCommand == NULL)
{
if (self->pCommand == NULL) {
SCWrite(self->pCon,
"ERROR: configuration error, need procedure to run for user scan",
"ERROR: configuration error, need procedure to run for user scan",
eLogError);
SCSetInterrupt(self->pCon,eAbortScan);
SCSetInterrupt(self->pCon, eAbortScan);
return 0;
}
/* invoke command */
snprintf(pBueffel,511,"%s %d",self->pCommand, iPoint);
status = Tcl_Eval(self->pSics->pTcl,pBueffel);
if(status != TCL_OK)
{
sprintf(pBueffel,"ERROR in count script: %s",
Tcl_GetStringResult(self->pSics->pTcl));
SCWrite(self->pCon,pBueffel,eLogError);
snprintf(pBueffel, 511, "%s %d", self->pCommand, iPoint);
status = Tcl_Eval(self->pSics->pTcl, pBueffel);
if (status != TCL_OK) {
sprintf(pBueffel, "ERROR in count script: %s",
Tcl_GetStringResult(self->pSics->pTcl));
SCWrite(self->pCon, pBueffel, eLogError);
return 0;
}
return 1;
}
/*------------------------------------------------------------------------*/
int UserCollect(pScanData self, int iPoint)
{
/* do nothing, its the users job*/
/* do nothing, its the users job */
return 1;
}
/*------------------------------------------------------------------------*/
void ConfigureUserScan(pScanData self)
{