fixed small bugs/unproper code
This commit is contained in:
@ -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);
|
||||
|
2
hkl.h
2
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
|
||||
|
4
macro.c
4
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 */
|
||||
|
87
make_forward
87
make_forward
@ -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 ""
|
||||
|
36
makefile
36
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
|
||||
|
36
maketree
36
maketree
@ -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
|
||||
|
4
mesure.c
4
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);
|
||||
|
@ -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
|
||||
|
5
tclev.c
5
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;
|
||||
|
Reference in New Issue
Block a user