diff --git a/fourtable.h b/fourtable.h index 37d2d33f..6824728a 100644 --- a/fourtable.h +++ b/fourtable.h @@ -11,7 +11,7 @@ #ifndef FOURTABLE #define FOURTABLE - int MakeFourCircleTable(); + int MakeFourCircleTable(void); void DeleteFourCircleTable(int handle); int HandleFourCircleCommands(int handle, SConnection *pCon, int argc, char *argv[], int *err); diff --git a/hkl.h b/hkl.h index 867f68ea..d5fa6885 100644 --- a/hkl.h +++ b/hkl.h @@ -47,6 +47,6 @@ int HKLAction(SConnection *pCon, SicsInterp *pSics, void *pData, int argc, char *argv[]); - + void SetHKLScanTolerance(pHKL self, float fVal); #endif diff --git a/macro.c b/macro.c index 258e8bb6..c79fd1bc 100644 --- a/macro.c +++ b/macro.c @@ -320,7 +320,9 @@ static int ProtectedExec(ClientData clientData, Tcl_Interp *interp, pUnknown->iStack = 0; pUnknown->pInter = pSics; pUnbekannt = pUnknown; - Tcl_CreateCommand(pInter,"unknown",SicsUnknownProc, + /* the cast before SicsUnknwonProc is to avoid a warning + Tcl_CmdProc has a const char instead of char as argument M.Z. */ + Tcl_CreateCommand(pInter,"unknown",(Tcl_CmdProc *)SicsUnknownProc, pUnknown, UnknownKill); /* delete dangers */ diff --git a/make_forward b/make_forward deleted file mode 100644 index 9db81950..00000000 --- a/make_forward +++ /dev/null @@ -1,87 +0,0 @@ -# This file is included by the makefile. -# It forwards the execution to a version specific makefile. -# S_UP and SICS_VERSION must be defined -# M. Zolliker 08.2003 - -VERS_UNDEFINED= -VERS_UNDEFINED$(SICS_VERSION)=version_undefined - -SICS_ROOT=$(PWD)/$(S_UP) -MD=cd $(SICS_VERSION); \ - make -f $(SRC)makefile_$(SICS_VERSION) SRC=$(SRC) - -#define TREE only when version defined -TREE$(VERS_UNDEFINED)=$(SICS_ROOT)/obj/$(SICS_VERSION)/tree - -# overwrite MD when SICS_VERSION undefined -MD$(SICS_VERSION)=@ true - -SRC=src/ - -.SUFFIXES: .none - -default: $(VERS_UNDEFINED) $(TREE) - $(MD) - -%.o: $(VERS_UNDEFINED) $(TREE) - $(MD) $@ - -%: $(VERS_UNDEFINED) $(TREE) - $(MD) $@ - -.DEFAULT: $(VERS_UNDEFINED) $(TREE) - $(MD) $@ - -makefile: - @ echo makefile - -tree: $(TREE) - @ true - -cleantree: - rm -f $(SICS_ROOT)/obj/$(SICS_VERSION)/tree - -$(TREE): - @ $(VERS_UNDEFINED) test 1 - @ echo --- Make object tree --- - @ $(SICS_ROOT)/maketree . - @ $(SICS_ROOT)/maketree matrix - @ $(SICS_ROOT)/maketree dummy - @ $(SICS_ROOT)/maketree psi - @ $(SICS_ROOT)/maketree psi/hardsup - @ $(SICS_ROOT)/maketree psi/utils - @ $(SICS_ROOT)/maketree psi/tecs - @ $(SICS_ROOT)/maketree psi/tecs/pg_plus - touch $(TREE) - @ echo --- End object tree --- - -cleanall: - $(MD) clean - -version_undefined: - @ echo "" - @ echo "Usage:" - @ echo "" - @ echo "Creating objects and targets mixed up with sources:" - @ echo "" - @ echo " make -f makefile_xxx [target]" - @ echo "" - @ echo ' where makefile_xxx is one of' - @ echo "" - @ ls -1 makefile_* | pr -t -o 4 - @ echo "" - @ echo "Creating objects and targets in separate subdirectories" - @ echo "" - @ echo " setenv SICS_VERSION version_xxx (assume we are using tcsh)" - @ echo " make [target]" - @ echo "" - @ echo " where version_xxx is one of" - @ echo "" - @ ls -1 makefile_* | cut -b 10-99 | pr -t -o 4 - @ echo "" - @ echo " Remarks:" - @ echo " All objects for alpha version will be created in subdirectory obj/alpha/," - @ echo " SICServer is also found there." - @ echo " Tip: define SICS_VERSION at login" - @ echo "" - diff --git a/makefile b/makefile index 11342d79..8f5a8ebc 100644 --- a/makefile +++ b/makefile @@ -1,6 +1,34 @@ -# this makefile delegates to a version specific makefile +# Forwards the execution to a version specific makefile. +# SICS_VERSION must be defined, else usage is printed +# M. Zolliker 03.2005 -# where root is -S_UP=. +VERS_UNDEFINED= +VERS_UNDEFINED$(SICS_VERSION)=version_undefined + +INCL_MF=makefile_$(SICS_VERSION) + +-include $(INCL_MF) + +version_undefined: + @ echo "" + @ echo "Usage:" + @ echo "" + @ echo " make -f makefile_xxx [target]" + @ echo "" + @ echo ' where makefile_xxx is one of' + @ echo "" + @ ls -1 makefile_* | pr -t -o 4 + @ echo "" + @ echo "Or, more convenient, define the following in the login script" + @ echo "" + @ echo " setenv SICS_VERSION version_xxx (assume we are using tcsh)" + @ echo "" + @ echo " where version_xxx is one of" + @ echo "" + @ ls -1 makefile_* | cut -b 10-99 | pr -t -o 4 + @ echo "" + @ echo "and then use simply" + @ echo "" + @ echo " make [target]" + @ echo "" -include make_forward diff --git a/maketree b/maketree deleted file mode 100755 index dae810fa..00000000 --- a/maketree +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/tcsh -# create the version specific object tree -# -# M.Zolliker 08.2003 -# -if ("$SICS_VERSION" == "") then - - echo SICS_VERSION undefined - -else - - if (${0:h} != $0) then - cd ${0:h} - endif - set SICS_ROOT=$PWD - -# determine object directory - set o="$SICS_ROOT/obj/$SICS_VERSION/$1" - -# determine makefile - set m="$SICS_ROOT/$1/makefile_$SICS_VERSION" - - if (-e $m) then - if (! -e $o) then - echo create directory $o - mkdir -p $o - else - echo $o exists - endif - rm -f $o/src - echo ln -s $SICS_ROOT/$1 $o/src - ln -s $SICS_ROOT/$1 $o/src - ln -s $o $SICS_ROOT/$1/$SICS_VERSION - endif -endif - diff --git a/mesure.c b/mesure.c index 85bff41a..f36e4d8f 100644 --- a/mesure.c +++ b/mesure.c @@ -93,7 +93,7 @@ static int SaveMesure(void *pData, char *name, FILE *fd) fprintf(fd,"%s np %d\n", name, self->np); fprintf(fd,"%s preset %f\n", name, self->fPreset); fprintf(fd,"%s step %f\n", name, self->fStep); - fprintf(fd,"%s weakthreshold %f\n", name, self->weakThreshold); + fprintf(fd,"%s weakthreshold %ld\n", name, self->weakThreshold); fprintf(fd,"%s compact %d\n", name, self->iCompact); fprintf(fd,"%s weak %d\n", name, self->weak); fprintf(fd,"%s fastscan %d\n", name, self->fastScan); @@ -122,7 +122,7 @@ static void ListMesure(pMesure self, char *name, SConnection *pCon) Tcl_DStringAppend(&list,pBuffer,-1); snprintf(pBuffer,131,"%s.step %f\n", name, self->fStep); Tcl_DStringAppend(&list,pBuffer,-1); - snprintf(pBuffer,131,"%s.weakthreshold %f\n", name, self->weakThreshold); + snprintf(pBuffer,131,"%s.weakthreshold %ld\n", name, self->weakThreshold); Tcl_DStringAppend(&list,pBuffer,-1); snprintf(pBuffer,131,"%s.compact %d\n", name, self->iCompact); Tcl_DStringAppend(&list,pBuffer,-1); diff --git a/motreglist.h b/motreglist.h index a148e708..5a1bcadb 100644 --- a/motreglist.h +++ b/motreglist.h @@ -19,7 +19,7 @@ pMotReg FindMotFromDataStructure(int iList, void *pData); int CheckAllMotors(int iList, SConnection *pCon); void KillMotList(int iList); - + void StopAllMotors(int iList); #endif diff --git a/tclev.c b/tclev.c index e44a2286..211cb887 100644 --- a/tclev.c +++ b/tclev.c @@ -334,7 +334,8 @@ pEVDriver pNew = NULL; pTclEv pPriv = NULL; int iRet; - char *pPtr = NULL; + /* the "const" saves us from a couple of warnings M.Z.*/ + const char *pPtr = NULL; if(argc < 1)/* we expect a Tcl array with all data */ { @@ -478,7 +479,7 @@ { pTclEv pPriv = NULL; char pBueffel[132]; - char *pPtr = NULL; + const char *pPtr = NULL; assert(self); pPriv = (pTclEv)self->pPrivate; diff --git a/telnet.c b/telnet.c index 2399b5f0..c4eca379 100644 --- a/telnet.c +++ b/telnet.c @@ -12,6 +12,7 @@ #include "sics.h" #include "passwd.h" #include "telnet.h" +#include "commandlog.h" #include "fortify.h" #define LOGINWAIT 300 /* 300 == 5 minutes to wait for valid username password */