Remove superfluous trailing white space from C files
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*---------------------------------------------------------------------------
|
||||
REFL2T.c
|
||||
|
||||
Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
---------------------------------------------------------------------------*/
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
@@ -31,13 +31,13 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
|
||||
|
||||
/*======================================================================
|
||||
The core of it all: The calculation of the settings for the various
|
||||
The core of it all: The calculation of the settings for the various
|
||||
motors.
|
||||
========================================================================*/
|
||||
static int CalculateREFL(pRefl2T self, SConnection *pCon, float fNew)
|
||||
{
|
||||
float fDetPos, HeightOffset, DetLength;
|
||||
int iRet;
|
||||
int iRet;
|
||||
|
||||
/* assume: solid sample, horizontal beam, surface at height zero */
|
||||
/* read vals of motor coy */
|
||||
@@ -52,10 +52,10 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
|
||||
/* calculate det height above beam axis */
|
||||
/* add detector offset height */
|
||||
|
||||
|
||||
fNew = DetLength * tan((double)(fNew * PI / 180.0)) + HeightOffset ;
|
||||
self->fTarget = fNew;
|
||||
return 1;
|
||||
return 1;
|
||||
|
||||
/* Replacement code using MotEntry structure
|
||||
self->toStart[MOTCOZ].pMot = self->aEngine[MOTCOZ];
|
||||
@@ -81,7 +81,7 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
{
|
||||
return iRet;
|
||||
}
|
||||
|
||||
|
||||
/* start them all */
|
||||
/* for(i = 0; i < self->iStart; i++)
|
||||
{*/
|
||||
@@ -94,13 +94,13 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
if(iRet != OKOK)
|
||||
{
|
||||
return iRet;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* } */
|
||||
return OKOK;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
static int R2THalt(void *pData)
|
||||
{
|
||||
@@ -118,7 +118,7 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
if(pDriv != NULL)
|
||||
{
|
||||
iRet = pDriv->Halt(self->aEngine[MOTCOZ].pMot);
|
||||
}
|
||||
}
|
||||
/* } */
|
||||
return OKOK;
|
||||
}
|
||||
@@ -130,7 +130,7 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
pRefl2T self = (pRefl2T) pData;
|
||||
SConnection *pDumCon = NULL;
|
||||
|
||||
/* Define code for this function */
|
||||
/* Define code for this function */
|
||||
assert(self);
|
||||
pDumCon = SCCreateDummyConnection(pServ->pSics);
|
||||
assert(pDumCon);
|
||||
@@ -142,7 +142,7 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
{
|
||||
return iRet;
|
||||
}
|
||||
|
||||
|
||||
/* check them all */
|
||||
/* for(i = 0; i < self->iStart; i++)
|
||||
{*/
|
||||
@@ -156,39 +156,39 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
if(iRet != 1)
|
||||
{
|
||||
return iRet;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* } */
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
static float R2TGetValue(void *pData, SConnection *pCon)
|
||||
{
|
||||
|
||||
|
||||
pRefl2T self = (pRefl2T) pData;
|
||||
|
||||
|
||||
assert(self);
|
||||
|
||||
|
||||
return fResult;
|
||||
}
|
||||
|
||||
|
||||
static void *R2TGetInterface(void *pData, int iID)
|
||||
{
|
||||
pRefl2T self = (pRefl2T) pData;
|
||||
|
||||
|
||||
assert(self);
|
||||
if(iID == DRIVEID)
|
||||
{
|
||||
return self->pDriv;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void Refl2TKill(void *pData)
|
||||
{
|
||||
pRefl2T self = (pRefl2T) pData;
|
||||
|
||||
|
||||
if(self == NULL)
|
||||
return;
|
||||
|
||||
@@ -206,7 +206,7 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
/*--------------------------------------------------------------------------
|
||||
Initialization: All is done from the Factory function. This takes an Tcl
|
||||
array as parameter which is supposed to hold the names of all motors.
|
||||
This must fail if one of the motors cannot be accessed.
|
||||
This must fail if one of the motors cannot be accessed.
|
||||
--------------------------------------------------------------------------*/
|
||||
int Refl2TFactory(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
int argc, char *argv[])
|
||||
@@ -249,7 +249,7 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
SCWrite(pCon,"ERROR: no value for coz motr found",eError);
|
||||
Refl2TKill(pNew);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
pNew->aMot[MOTCOZ] = FindMotor(pSics,pMot);
|
||||
if(!pNew->aEngine[MOTCOZ])
|
||||
{
|
||||
@@ -265,7 +265,7 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
SCWrite(pCon,"ERROR: no value for coy motor found",eError);
|
||||
Refl2TKill(pNew);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
pNew->aEngine[MOTCOY] = FindMotor(pSics,pMot);
|
||||
if(!pNew->aEngine[MOTCOY])
|
||||
{
|
||||
@@ -281,7 +281,7 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
SCWrite(pCon,"ERROR: no value for coz motor found",eError);
|
||||
Refl2TKill(pNew);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
pNew->aEngine[MOTSOZ] = FindMotor(pSics,pMot);
|
||||
if(!pNew->aEngine[MOTSOZ])
|
||||
{
|
||||
@@ -389,7 +389,7 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
|
||||
assert(pCon);
|
||||
assert(self);
|
||||
|
||||
|
||||
Tcl_DStringInit(&tString);
|
||||
sprintf(pBueffel,
|
||||
"%s.detectord %f \n", name, ObVal(self->aParameter,PARDDD));
|
||||
@@ -399,5 +399,5 @@ Paul Hathaway, Nick Hauser, Mark Koennecke, February 2004
|
||||
Tcl_DStringInit(&tString);
|
||||
sprintf(pBueffel,
|
||||
"%s.sampleoffset %f \n", name, ObVal(self->aParameter,PARDSO));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user