- Changed strncpy to strlcpy, strncat to strlcat

- Added strlcpy and strlcat to SICS
- Added a driver for the POLDI power supplies


SKIPPED:
	psi/A1931.c
	psi/autowin.c
	psi/bruker.c
	psi/docho.c
	psi/dornier2.c
	psi/dspcode.c
	psi/ease.c
	psi/ecb.c
	psi/ecbcounter.c
	psi/ecbdriv.c
	psi/el734dc.c
	psi/el734driv.c
	psi/el734hp.c
	psi/el737driv.c
	psi/el737hpdriv.c
	psi/el737hpdrivsps.c
	psi/el737hpv2driv.c
	psi/el755driv.c
	psi/eurodriv.c
	psi/haakedriv.c
	psi/itc4driv.c
	psi/julcho.c
	psi/linadriv.c
	psi/lmd200.c
	psi/lscsupport.c
	psi/ltc11.c
	psi/make_gen
	psi/oicom.c
	psi/oxinst.c
	psi/pimotor.c
	psi/pipiezo.c
	psi/polterwrite.c
	psi/psi.c
	psi/sanscook.c
	psi/sanslirebin.c
	psi/sanswave.c
	psi/sinqhmdriv.c
	psi/sinqhttp.c
	psi/slsecho.c
	psi/slsmagnet.c
	psi/slsvme.c
	psi/sps.c
	psi/swmotor.c
	psi/swmotor2.c
	psi/tabledrive.c
	psi/tasscan.c
	psi/tdchm.c
	psi/velodorn.c
	psi/velodornier.c
This commit is contained in:
koennecke
2010-04-13 15:08:38 +00:00
parent d19e3e5ca9
commit b26b8fc735
83 changed files with 555 additions and 316 deletions

18
tclev.c
View File

@@ -38,7 +38,7 @@ static int TclSetValue(pEVDriver self, float fNew)
snprintf(pBueffel,sizeof(pBueffel)-1, "%s %s %f", pPriv->pSetValue, pPriv->pArray, fNew);
iRet = Tcl_Eval(pPriv->pTcl, pBueffel);
if (iRet != TCL_OK) {
strncpy(pBueffel, pPriv->pTcl->result, 1023);
strlcpy(pBueffel, pPriv->pTcl->result, 1023);
iRet = Tcl_GetInt(pPriv->pTcl, pBueffel, &iErrCode);
if (iRet != TCL_OK) {
pPriv->iLastError = STUPIDTCL;
@@ -65,7 +65,7 @@ static int TclGetValue(pEVDriver self, float *fVal)
snprintf(pBueffel,sizeof(pBueffel)-1, "%s %s", pPriv->pGetValue, pPriv->pArray);
iRet = Tcl_Eval(pPriv->pTcl, pBueffel);
if (iRet != TCL_OK) {
strncpy(pBueffel, pPriv->pTcl->result, 1023);
strlcpy(pBueffel, pPriv->pTcl->result, 1023);
iRet = Tcl_GetInt(pPriv->pTcl, pBueffel, &iErrCode);
if (iRet != TCL_OK) {
pPriv->iLastError = STUPIDTCL;
@@ -106,7 +106,7 @@ static int TclSend(pEVDriver self, char *pCommand,
snprintf(pBueffel,sizeof(pBueffel)-1, "%s %s %s", pPriv->pSend, pPriv->pArray, pCommand);
iRet = Tcl_Eval(pPriv->pTcl, pBueffel);
if (iRet != TCL_OK) {
strncpy(pBueffel, pPriv->pTcl->result, 1023);
strlcpy(pBueffel, pPriv->pTcl->result, 1023);
iRet = Tcl_GetInt(pPriv->pTcl, pBueffel, &iErrCode);
if (iRet != TCL_OK) {
pPriv->iLastError = STUPIDTCL;
@@ -115,7 +115,7 @@ static int TclSend(pEVDriver self, char *pCommand,
pPriv->iLastError = iErrCode;
return 0;
} else {
strncpy(pReply, pPriv->pTcl->result, iReplyLen);
strlcpy(pReply, pPriv->pTcl->result, iReplyLen);
}
return 1;
}
@@ -140,7 +140,7 @@ static int TclGetError(pEVDriver self, int *iCode,
snprintf(pBueffel,sizeof(pBueffel)-1,
"Your Tcl-script returned a stupid answer:\n --> %s <--",
pPriv->pTcl->result);
strncpy(pReply, pBueffel, iReplyLen);
strlcpy(pReply, pBueffel, iReplyLen);
return 1;
}
@@ -149,7 +149,7 @@ static int TclGetError(pEVDriver self, int *iCode,
pPriv->iLastError);
iRet = Tcl_Eval(pPriv->pTcl, pBueffel);
if (iRet != TCL_OK) {
strncpy(pBueffel, pPriv->pTcl->result, 1023);
strlcpy(pBueffel, pPriv->pTcl->result, 1023);
iRet = Tcl_GetInt(pPriv->pTcl, pPriv->pTcl->result, &iErrCode);
if (iRet != TCL_OK) {
pPriv->iLastError = STUPIDTCL;
@@ -158,7 +158,7 @@ static int TclGetError(pEVDriver self, int *iCode,
pPriv->iLastError = iErrCode;
return 0;
} else {
strncpy(pReply, pPriv->pTcl->result, iReplyLen);
strlcpy(pReply, pPriv->pTcl->result, iReplyLen);
}
return 1;
}
@@ -214,7 +214,7 @@ static int TclInit(pEVDriver self)
snprintf(pBueffel,sizeof(pBueffel)-1, "%s %s", pPriv->pInit, pPriv->pArray);
iRet = Tcl_Eval(pPriv->pTcl, pBueffel);
if (iRet != TCL_OK) {
strncpy(pBueffel, pPriv->pTcl->result, 1023);
strlcpy(pBueffel, pPriv->pTcl->result, 1023);
iRet = Tcl_GetInt(pPriv->pTcl, pBueffel, &iErrCode);
if (iRet != TCL_OK) {
pPriv->iLastError = STUPIDTCL;
@@ -240,7 +240,7 @@ static int TclClose(pEVDriver self)
snprintf(pBueffel,sizeof(pBueffel)-1, "%s %s", pPriv->pClose, pPriv->pArray);
iRet = Tcl_Eval(pPriv->pTcl, pBueffel);
if (iRet != TCL_OK) {
strncpy(pBueffel, pPriv->pTcl->result, 1023);
strlcpy(pBueffel, pPriv->pTcl->result, 1023);
iRet = Tcl_GetInt(pPriv->pTcl, pBueffel, &iErrCode);
if (iRet != TCL_OK) {
pPriv->iLastError = STUPIDTCL;