Remove unused variables and code
r2414 | dcl | 2008-04-14 08:33:45 +1000 (Mon, 14 Apr 2008) | 2 lines
This commit is contained in:
@@ -46,7 +46,7 @@ typedef struct{
|
||||
char *config;
|
||||
}TcpDoCho, *pTcpDoCho;
|
||||
|
||||
static int fixDirection(pTcpDoCho self, int choNum, char *value, int value_len);
|
||||
// static int fixDirection(pTcpDoCho self, int choNum, char *value, int value_len);
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
Error codes:
|
||||
@@ -68,6 +68,7 @@ extern char *trim(char *str);
|
||||
#define PHASETOL 0.2
|
||||
#define VALUE_LEN 80
|
||||
/*=============== support functions ===================================*/
|
||||
#if 0
|
||||
static int asciiToUnicode(char *input, char **output){
|
||||
int len, i;
|
||||
char *result = NULL;
|
||||
@@ -84,7 +85,9 @@ static int asciiToUnicode(char *input, char **output){
|
||||
*output = result;
|
||||
return 2*len;
|
||||
}
|
||||
#endif
|
||||
/*-------------------------------------------------------------------*/
|
||||
#if 0
|
||||
static int unicodeToAscii(char *input, int len, char **output){
|
||||
int i, alen;
|
||||
char *result = NULL;
|
||||
@@ -102,6 +105,7 @@ static int unicodeToAscii(char *input, int len, char **output){
|
||||
*output = result;
|
||||
return alen;
|
||||
}
|
||||
#endif
|
||||
/*----------------------------------------------------------------*/
|
||||
static int tcpDoChoSend(pTcpDoCho self, char *command, int choNum,
|
||||
char *value){
|
||||
@@ -217,7 +221,7 @@ static int parseStatus(pTcpDoCho self, char *statusMessage){
|
||||
/*-----------------------------------------------------------------*/
|
||||
static int tcpDoChoReceive(pTcpDoCho self){
|
||||
char buffer[1024];
|
||||
int len, bytesRead, bufferStart, status;
|
||||
int bytesRead, bufferStart, status;
|
||||
time_t endTime;
|
||||
|
||||
endTime = time(NULL) + self->timeout;
|
||||
@@ -330,6 +334,7 @@ static int TcpDoChoConnect(pTcpDoCho self){
|
||||
return 1;
|
||||
}
|
||||
/*==================== actual driver implementation code ==================*/
|
||||
#if 0
|
||||
static int TcpChopperTask(void *pData){
|
||||
pCodri self = NULL;
|
||||
pTcpDoCho pPriv = NULL;
|
||||
@@ -373,6 +378,7 @@ static int TcpChopperTask(void *pData){
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
/*------------------------------------------------------------------------------*/
|
||||
static int TcpDoChoKill(pCodri self){
|
||||
pTcpDoCho pPriv = NULL;
|
||||
@@ -468,7 +474,6 @@ static void waitForBusy(pTcpDoCho self){
|
||||
/*----------------------------------------------------------------------*/
|
||||
static int TcpDoChoClose(pCodri pDriv){
|
||||
pTcpDoCho self = NULL;
|
||||
int status;
|
||||
|
||||
assert(pDriv != NULL);
|
||||
self = (pTcpDoCho)pDriv->pPrivate;
|
||||
@@ -501,6 +506,7 @@ static int dissectName(char *name, char par[80], int *num){
|
||||
* errno = 0 if successful
|
||||
* on failure errorcode is set in lastError
|
||||
*/
|
||||
#if 0
|
||||
static int fixDirection(pTcpDoCho self, int choNum, char *value, int value_len) {
|
||||
double dValue;
|
||||
errno=0;
|
||||
@@ -512,8 +518,9 @@ static int fixDirection(pTcpDoCho self, int choNum, char *value, int value_len)
|
||||
dValue = -1.0*dValue;
|
||||
snprintf(value, value_len, "%5.1f", dValue);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
/*----------------------------------------------------------------------*/
|
||||
static int TcpDoChoSetPar2(pCodri pDriv, char *parname, char *value){
|
||||
|
||||
@@ -571,7 +578,6 @@ static int TcpDoChoSetPar2(pCodri pDriv, char *parname, char *value){
|
||||
static int TcpDoChoHalt(pCodri pDriv){
|
||||
|
||||
pTcpDoCho self = NULL;
|
||||
int status;
|
||||
|
||||
assert(pDriv != NULL);
|
||||
self = (pTcpDoCho)pDriv->pPrivate;
|
||||
@@ -585,7 +591,7 @@ static int TcpDoChoHalt(pCodri pDriv){
|
||||
static int TcpDoChoSetPar(pCodri pDriv, char *parname, float fValue){
|
||||
|
||||
pTcpDoCho self = NULL;
|
||||
int status, choNum;
|
||||
int choNum;
|
||||
char value[80];
|
||||
char par[80];
|
||||
|
||||
@@ -619,7 +625,7 @@ static int TcpDoChoGetPar(pCodri pDriv, char *parname,
|
||||
pTcpDoCho self = NULL;
|
||||
int status = 0, choNum, i, j, ready;
|
||||
char par[80], buffer[80], value[80];
|
||||
float val, aspeed, rspeed, aphase, rphase, delta;
|
||||
float aspeed, rspeed, aphase, rphase, delta;
|
||||
|
||||
assert(pDriv != NULL);
|
||||
self = (pTcpDoCho)pDriv->pPrivate;
|
||||
@@ -726,7 +732,7 @@ static int TcpDoChoGetPar(pCodri pDriv, char *parname,
|
||||
/*----------------------------------------------------------------------*/
|
||||
static int TcpDoChoCheckPar(pCodri pDriv, char *parname){
|
||||
pTcpDoCho self = NULL;
|
||||
int status = 0, choNum;
|
||||
int choNum;
|
||||
float val, soll, delta;
|
||||
char value[80], csoll[80], par[80], buffer[80], state[80];
|
||||
|
||||
@@ -797,9 +803,6 @@ static int TcpDoChoCheckPar(pCodri pDriv, char *parname){
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int TcpDoChoError(pCodri pDriv, int *iCode, char *pError, int iLen){
|
||||
pTcpDoCho self = NULL;
|
||||
int status = 0;
|
||||
float val, soll, delta;
|
||||
char value[80];
|
||||
|
||||
assert(pDriv != NULL);
|
||||
self = (pTcpDoCho)pDriv->pPrivate;
|
||||
@@ -844,8 +847,8 @@ static int TcpDoChoError(pCodri pDriv, int *iCode, char *pError, int iLen){
|
||||
static int TcpDoChoFix(pCodri pDriv, int iCode){
|
||||
pTcpDoCho self = NULL;
|
||||
int status = 0;
|
||||
float val, soll, delta;
|
||||
char value[80];
|
||||
|
||||
|
||||
|
||||
assert(pDriv != NULL);
|
||||
self = (pTcpDoCho)pDriv->pPrivate;
|
||||
|
||||
Reference in New Issue
Block a user