Cleaned up ANSTO code to merge with sinqdev.sics

This is our new RELEASE-4_0 branch which was taken from ansto/93d9a7c
Conflicts:
	.gitignore
	SICSmain.c
	asynnet.c
	confvirtualmot.c
	counter.c
	devexec.c
	drive.c
	event.h
	exebuf.c
	exeman.c
	histmem.c
	interface.h
	motor.c
	motorlist.c
	motorsec.c
	multicounter.c
	napi.c
	napi.h
	napi4.c
	network.c
	nwatch.c
	nxscript.c
	nxxml.c
	nxxml.h
	ofac.c
	reflist.c
	scan.c
	sicshipadaba.c
	sicsobj.c
	site_ansto/docs/Copyright.txt
	site_ansto/instrument/lyrebird/config/tasmad/sicscommon/nxsupport.tcl
	site_ansto/instrument/lyrebird/config/tasmad/taspub_sics/tasscript.tcl
	statusfile.c
	tasdrive.c
	tasub.c
	tasub.h
	tasublib.c
	tasublib.h
This commit is contained in:
Ferdi Franceschini
2015-04-23 20:49:26 +10:00
parent c650788a2c
commit 10d29d597c
1336 changed files with 9430 additions and 226646 deletions

View File

@@ -143,11 +143,17 @@ int SetSICSInterrupt(SConnection * pCon, SicsInterp * pSics, void *pData,
return 1;
}
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------
This method does nothing anymore. Status is now calculated from the state
of SICS and no longer explicitly set. I left the code in because I am to
lazy to find all use cases and eliminate them
M.K. 07/2014
--------------------------------------------------------------------------*/
int SetSICSStatus(SConnection * pCon, SicsInterp * pSics, void *pData,
int argc, char *argv[])
{
int iInt;
int iInt = 0;
char pBueffel[132];
assert(pCon);
@@ -166,6 +172,13 @@ int SetSICSStatus(SConnection * pCon, SicsInterp * pSics, void *pData,
return 0;
}
SCWrite(pCon,"Status is calculated, cannot be set manually any longer", eValue);
return 1;
/*
The code below is defunct and just here for documentary reasons
*/
/* is there a value ? */
if (argc < 2) {
SCWrite(pCon, "ERROR: missing parameter for SetStatus", eError);
@@ -174,7 +187,7 @@ int SetSICSStatus(SConnection * pCon, SicsInterp * pSics, void *pData,
/* actually do a job */
strtolower(argv[1]);
iInt = SetStatusFromText(argv[1]);
/* iInt = SetStatusFromText(argv[1]); */
if (iInt) {
SCSendOK(pCon);
return 1;
@@ -193,7 +206,7 @@ static int isNum(char *pText)
for (i = 0; i < strlen(pText); i++) {
if (!isdigit(pText[i])) {
if (!((pText[i] == '+') || (pText[i] == '-') || (pText[i] == '.'))) {
if (!((pText[i] == '+') || (pText[i] == '-') || (pText[i] == '.') || (tolower(pText[i]) == 'e' ))) {
iRet = 0;
break;
}