From fc6c4acd79018b19fe11426d4e78eff98dc49563 Mon Sep 17 00:00:00 2001 From: cvs Date: Mon, 11 Sep 2000 09:17:43 +0000 Subject: [PATCH] D.Maden. 11-Sep-2000. Makefiles modified to generate a Linux SICServer. Other files modified to get rid of irritating compiler warning messages. --- Makefile | 51 ++++++++++++++----------- amorstat.c | 2 +- difrac/Makefile | 16 ++++++-- hardsup/Makefile | 16 ++++---- hardsup/sinqhm.c | 8 ++-- macro.c | 4 +- matrix/Makefile | 14 +++---- matrix/matdump.c | 3 -- matrix/matdurbn.c | 1 - matrix/materr.c | 2 - matrix/matinv.c | 1 - matrix/matmul.c | 3 -- matrix/matsubx.c | 2 +- maximize.c | 2 +- mumo.c | 2 +- napi.c | 6 +-- nxdata.c | 4 +- nxdict.c | 10 ++--- nxdict.w | 8 ++-- rmtrail.c | 2 +- status.c | 2 +- tecs/Makefile | 26 +++++++------ velodorn.c | 95 +++++++++++++++++++++-------------------------- 23 files changed, 140 insertions(+), 140 deletions(-) diff --git a/Makefile b/Makefile index 78255448..c25168cf 100644 --- a/Makefile +++ b/Makefile @@ -4,21 +4,26 @@ # Mark Koennecke 1996-2000 # Markus Zolliker March 2000: add tecs #--------------------------------------------------------------------------- -BINTARGET=$(HOME)/bin/sics -#------- comment and uncommanet this if a fortified version is required. -# A -DFORTIFY needs to be added to the CFLAGS as well. +#------- comment or uncomment this if a fortified version is required. +# Note: A -DFORTIFY needs to be added to the CFLAGS as well. +# #FORTIFYOBJ = fortify.o strdup.o +#---- FORTIFYOBJ = +#--------------------------------------------------------------------------- -#----- comment and uncomment according if a difrac version is required + +#----- comment or uncomment if a difrac version is required #DIFOBJ= #DIFIL= #DIFOBJ=difrac.o -Ldifrac -ldif -lfor #---- DIFOBJ=difrac.o -Ldifrac -ldif DIFIL= difrac.o +#--------------------------------------------------------------------------- + COBJ = Sclient.o network.o ifile.o intcli.o $(FORTIFYOBJ) SOBJ = network.o ifile.o conman.o SCinter.o splitter.o passwd.o \ @@ -47,15 +52,18 @@ VELOOBJ = velo.o velosim.o velodorn.o velodornier.o .SUFFIXES: .SUFFIXES: .tcl .htm .c .o +#----- comment or uncomment the following according to operating system + #------------- for Digital Unix -HDFROOT=/data/koenneck -CC=cc -EXTRA= -CFLAGS = -I$(HDFROOT)/include -Ihardsup -I. -std1 -g -warnprotos -c +#BINTARGET=$(HOME)/bin/sics +#HDFROOT=/data/koenneck +#CC=cc +#EXTRA= +#CFLAGS = -I$(HDFROOT)/include -Ihardsup -I. -std1 -g -warnprotos -c #CFLAGS = -I$(HDFROOT)/include -DFORTIFY -Ihardsup -g -std1 -warnprotos -c -LIBS = -L$(HDFROOT)/lib -Lhardsup -lhlib -Lmatrix -lmatrix -Ltecs \ - -ltecsl -ltcl8.0 -lfor -lmfhdf -ldf $(HDFROOT)/lib/libjpeg.a \ - -lz -lm -ll -lc +#LIBS = -L$(HDFROOT)/lib -Lhardsup -lhlib -Lmatrix -lmatrix -Ltecs \ +# -ltecsl -ltcl8.0 -lfor -lmfhdf -ldf $(HDFROOT)/lib/libjpeg.a \ +# -lz -lm -ll -lc #------- for cygnus #HDFROOT=../HDF411 @@ -66,14 +74,15 @@ LIBS = -L$(HDFROOT)/lib -Lhardsup -lhlib -Lmatrix -lmatrix -Ltecs \ # -lmfhdf -ldf -ljpeg -lz -lm #---------- for linux -#HDFROOT=/usr/local -#TCLROOT=/home/koenneck/tcl76 -#CC=gcc -#CFLAGS = -I$(HDFROOT)/include -Ihardsup -fwritable-strings -DCYGNUS -g -c -#LIBS= -L$(HDFROOT)/lib -Lhardsup -L$(TCLROOT)/lib -lhlib \ -# -ltcl7.6 -lmfhdf -ldf -ljpeg -lz -lm -lg2c -ldl -#EXTRA=nintf.o - +BINTARGET=../bin +HDFROOT=/usr/local +CC=gcc +CFLAGS = -I$(HDFROOT)/include -Ihardsup -fwritable-strings \ + -DCYGNUS -DNONINTF -g -c +LIBS= -L$(HDFROOT)/lib -Lhardsup -Ltecs -ltecsl -Lmatrix -lmatrix -lhlib \ + -ltcl8.0 -lmfhdf -ldf -ljpeg -lz -lm -lg2c -ldl +EXTRA=nintf.o +#--------------------------------------------------------------------------- .c.o: $(CC) $(CFLAGS) $*.c @@ -87,8 +96,8 @@ server: $(SOBJ) $(MOTOROBJ) $(COUNTEROBJ) $(DMCOBJ) $(VELOOBJ) $(DIFIL) \ cp SICServer $(BINTARGET) clean: - - rm *.o - - rm SICServer + - rm -f *.o + - rm -f SICServer Dbg.o: Dbg.c cc -g -I/data/koenneck/include -c Dbg.c diff --git a/amorstat.c b/amorstat.c index 5f7b6cb0..7ef6a0bc 100644 --- a/amorstat.c +++ b/amorstat.c @@ -199,7 +199,7 @@ UserData ud; iRet = LLDnodePtr2First(self->iUserList); - while(iRet != NULL) + while(iRet != 0) { LLDnodeDataTo(self->iUserList,&ud); if(ud.fX != NULL) diff --git a/difrac/Makefile b/difrac/Makefile index ed6875b8..54cb1bed 100644 --- a/difrac/Makefile +++ b/difrac/Makefile @@ -3,7 +3,17 @@ # # Mark Koennecke, November 1999 #---------------------------------------------------------------------------- -CFLAGS = -C -g -c + +#---------- for Redhat linux +CC= gcc +CFLAGS= -C -g -c + +#------------ for DigitalUnix +##CC=cc +##CFLAGS= -C -g -c +#---------------------------------------------------------------------------- + + FL = f77 $(CFLAGS) ROOT = .. LIBS = $(ROOT)\libs @@ -32,10 +42,10 @@ GENS = yesno.o freefm.o alfnum.o matrix.o \ all: lib clean: - rm *.o + rm -f *.o lib: $(OBJECTS) $(GENS) - - rm libdif.a + - rm -f libdif.a ar cr libdif.a $(OBJECTS) $(GENS) ranlib libdif.a diff --git a/hardsup/Makefile b/hardsup/Makefile index b3d6b9e6..dabe3cc0 100644 --- a/hardsup/Makefile +++ b/hardsup/Makefile @@ -9,12 +9,14 @@ OBJ= el734_utility.o asynsrv_utility.o stredit.o \ makeprint.o #---------- for Redhat linux -#CC= gcc -#CFLAGS= -I/usr/local/include -I. -I../ -DLINUX -g -c +CC= gcc +###CFLAGS= -I/usr/local/include -I. -I../ -DLINUX -g -c +CFLAGS=-I. -I../ -DLINUX -g -c #------------ for DigitalUnix -CC=cc -CFLAGS= -I/data/koenneck/include -I. -I../ -std1 -g -c +##CC=cc +##CFLAGS= -I/data/koenneck/include -I. -I../ -std1 -g -c + #------------ for DigitalUnix with Fortify #CFLAGS= -I/data/koenneck/include -DFORTIFY -I. -I../ -std1 -g -c @@ -26,10 +28,10 @@ CFLAGS= -I/data/koenneck/include -I. -I../ -std1 -g -c $(CC) $(CFLAGS) $*.c hlib: $(OBJ) - - rm libhlib.a + - rm -f libhlib.a ar cr libhlib.a $(OBJ) ranlib libhlib.a clean: - rm *.o - rm *.a + rm -f *.o + rm -f *.a diff --git a/hardsup/sinqhm.c b/hardsup/sinqhm.c index 0ca98abb..3aebf867 100644 --- a/hardsup/sinqhm.c +++ b/hardsup/sinqhm.c @@ -55,11 +55,9 @@ #include "sinqhm.h" #include "sinqhm.i" -/* missing in cygnus and linux network stuff?? */ -#ifdef LINUX -#define CYGNUS -#endif -#ifdef CYGNUS +/* missing in some network stuff?? */ + +#ifndef MSG_WAITALL #define MSG_WAITALL 0 #endif diff --git a/macro.c b/macro.c index d201ad1a..f08a6d9d 100644 --- a/macro.c +++ b/macro.c @@ -505,7 +505,7 @@ extern Tcl_Interp *InterpGetTcl(SicsInterp *pSics); if(!pInter) { SCWrite(pCon,"ERROR: out of memory in InternalFileEval",eError); - return NULL; + return 0; } SCnoSock(pIntern); @@ -570,7 +570,7 @@ extern Tcl_Interp *InterpGetTcl(SicsInterp *pSics); strtolower(ppCode); while(pCode[i] != NULL) { - if(strcmp(pCode[i],ppCode)== NULL) + if(strcmp(pCode[i],ppCode) == 0) { break; } diff --git a/matrix/Makefile b/matrix/Makefile index 84c91dd4..120acd94 100644 --- a/matrix/Makefile +++ b/matrix/Makefile @@ -8,12 +8,12 @@ OBJ= matadd.o matcreat.o matdet.o matdump.o matdurbn.o materr.o \ mattran.o #---------- for Redhat linux -#CC= gcc -#CFLAGS= -I/usr/local/include -I. -I../ -DLINUX -g -c +CC= gcc +CFLAGS= -I/usr/local/include -I. -I../ -DLINUX -g -c #------------ for DigitalUnix -CC=cc -CFLAGS= -I/data/koenneck/include -I. -I../ -std1 -g -c +#CC=cc +#CFLAGS= -I/data/koenneck/include -I. -I../ -std1 -g -c #------------ for DigitalUnix with Fortify #CFLAGS= -I/data/koenneck/include -DFORTIFY -I. -I../ -std1 -g -c @@ -25,10 +25,10 @@ CFLAGS= -I/data/koenneck/include -I. -I../ -std1 -g -c $(CC) $(CFLAGS) $*.c matrix: $(OBJ) - - rm libmatrix.a + - rm -f libmatrix.a ar cr libmatrix.a $(OBJ) ranlib libmatrix.a clean: - rm *.o - rm *.a + rm -f *.o + rm -f *.a diff --git a/matrix/matdump.c b/matrix/matdump.c index 2bd03175..cbfdd26d 100644 --- a/matrix/matdump.c +++ b/matrix/matdump.c @@ -73,6 +73,3 @@ FILE *fp; return (A); } - - - \ No newline at end of file diff --git a/matrix/matdurbn.c b/matrix/matdurbn.c index 34c6340a..ec668873 100644 --- a/matrix/matdurbn.c +++ b/matrix/matdurbn.c @@ -130,4 +130,3 @@ MATRIX A, B; mat_free( R ); return (X); } - \ No newline at end of file diff --git a/matrix/materr.c b/matrix/materr.c index a49bdab8..827b73ac 100644 --- a/matrix/materr.c +++ b/matrix/materr.c @@ -42,5 +42,3 @@ int errno; return (NULL); } - - \ No newline at end of file diff --git a/matrix/matinv.c b/matrix/matinv.c index 1c134e01..645d3798 100644 --- a/matrix/matinv.c +++ b/matrix/matinv.c @@ -74,4 +74,3 @@ MATRIX a; mat_free(P); return (C); } - \ No newline at end of file diff --git a/matrix/matmul.c b/matrix/matmul.c index e4e5fc1c..f00a1c9c 100644 --- a/matrix/matmul.c +++ b/matrix/matmul.c @@ -55,6 +55,3 @@ MATRIX A; } return (result); } - - - \ No newline at end of file diff --git a/matrix/matsubx.c b/matrix/matsubx.c index 7effb1b8..baea9a51 100644 --- a/matrix/matsubx.c +++ b/matrix/matsubx.c @@ -45,4 +45,4 @@ int i,j; } return (S); -} \ No newline at end of file +} diff --git a/maximize.c b/maximize.c index cf61847c..6b1c6e7b 100644 --- a/maximize.c +++ b/maximize.c @@ -158,7 +158,7 @@ start: lMax = 0; - lMin = 999999999999; + lMin = 0x7fffffff; fStart = pDriv->GetValue(pVar,pCon); if(fStart < -999999.) { diff --git a/mumo.c b/mumo.c index 879a1333..62518206 100644 --- a/mumo.c +++ b/mumo.c @@ -106,7 +106,7 @@ assert(pData); self = (pMulMot)pData; - assert(strcmp(self->pDes->name,"MulMot") == NULL); + assert(strcmp(self->pDes->name,"MulMot") == 0); /* remove string dictionaries */ if(self->pAlias) diff --git a/napi.c b/napi.c index cf530a32..b0d5c755 100644 --- a/napi.c +++ b/napi.c @@ -35,7 +35,7 @@ ----------------------------------------------------------------------------*/ -static const char* rscid = "$Id: napi.c,v 1.2 2000/02/21 08:11:15 cvs Exp $"; /* Revision interted by CVS */ +static const char* rscid = "$Id: napi.c,v 1.3 2000/09/11 09:17:44 cvs Exp $"; /* Revision interted by CVS */ #include #include @@ -1130,8 +1130,8 @@ static const char* rscid = "$Id: napi.c,v 1.2 2000/02/21 08:11:15 cvs Exp $"; /* else { /* write directly */ - iRet = SDwritedata (pFile->iCurrentSDS,iStart, - iStride, iSize, data); + iRet = SDwritedata (pFile->iCurrentSDS, (int32 *) iStart, + iStride, (int32 *) iSize, data); } /* deal with HDF errors */ diff --git a/nxdata.c b/nxdata.c index baa99e8f..656c7391 100644 --- a/nxdata.c +++ b/nxdata.c @@ -352,7 +352,7 @@ int32 iDim[2]; iDim[0] = iLong; - iStat = NXmakedata(Nfil,name,datatype,1,iDim); + iStat = NXmakedata (Nfil, name, datatype, 1, (int *) iDim); if(iStat == NX_ERROR) { NXclose(&Nfil); @@ -388,7 +388,7 @@ int32 iDim[2]; iDim[0] = iLong; - iStat = NXmakedata(Nfil,name,datatype,1,iDim); + iStat = NXmakedata (Nfil, name, datatype, 1, (int *) iDim); if(iStat == NX_ERROR) { NXclose(&Nfil); diff --git a/nxdict.c b/nxdict.c index 7dc51116..cdb5b1b2 100644 --- a/nxdict.c +++ b/nxdict.c @@ -41,7 +41,7 @@ extern void *NXpData; extern void (*NXIReportError)(void *pData, char *pBuffer); /*--------------------------------------------------------------------------*/ -/*#define DEFDEBUG 1*/ +/* #define DEFDEBUG 1*/ /* define DEFDEBUG when you wish to print your definition strings before action. This can help a lot to resolve mysteries when working with dictionaries. @@ -682,7 +682,7 @@ {"-LZW",DLZW}, {"-HUF",DHUF}, {"-RLE",DRLE}, - {NULL,0} }; + {"",0} }; /*-----------------------------------------------------------------------*/ static void NXDIDefToken(ParDat *sStat) @@ -995,7 +995,7 @@ {"DFNT_INT32",DFNT_INT32}, {"DFNT_UINT32",DFNT_UINT32}, {"DFNT_CHAR",DFNT_CHAR}, - {NULL,-122} }; + {"",0} }; @@ -1088,7 +1088,7 @@ iRank = atoi(pParse->pToken); break; case DDIM: - iRet = NXDIParseDim(pParse, iDim); + iRet = NXDIParseDim (pParse, (int *) iDim); if(iRet == NX_ERROR) { LLDdelete(iList); @@ -1153,7 +1153,7 @@ /* we need to create it, if we may */ if(pParse->iMayCreate) { - iRet = NXmakedata(hfil,pName,iType, iRank,iDim); + iRet = NXmakedata (hfil, pName, iType, iRank, (int *) iDim); if(iRet != NX_OK) { /* a comment on this one has already been written! */ diff --git a/nxdict.w b/nxdict.w index 944e8568..10e1c1fb 100644 --- a/nxdict.w +++ b/nxdict.w @@ -941,7 +941,7 @@ This is the tokenizer: {"-type",DTYPE}, {"-rank",DRANK}, {"-attr",DATTR}, - {NULL,0} }; + {"",0} }; /*-----------------------------------------------------------------------*/ static void NXDIDefToken(ParDat *sStat) @@ -1272,7 +1272,7 @@ parsing: iRank = atoi(pParse->pToken); break; case DDIM: - iRet = NXDIParseDim(pParse, iDim); + iRet = NXDIParseDim (pParse, (int *) iDim); if(iRet == NX_ERROR) { LLDdelete(iList); @@ -1328,7 +1328,7 @@ parsing: /* we need to create it, if we may */ if(pParse->iMayCreate) { - iRet = NXmakedata(hfil,pName,iType, iRank,iDim); + iRet = NXmakedata (hfil, pName, iType, iRank, (int *) iDim); if(iRet != NX_OK) { /* a comment on this one has already been written! */ @@ -1386,7 +1386,7 @@ as one of the standard NeXus data types. {"DFNT_UINT16",DFNT_UINT16}, {"DFNT_INT32",DFNT_INT32}, {"DFNT_UINT32",DFNT_UINT32}, - {NULL,-122} }; + {"",0} }; diff --git a/rmtrail.c b/rmtrail.c index a52d0494..154168c3 100644 --- a/rmtrail.c +++ b/rmtrail.c @@ -25,7 +25,7 @@ char *rmtrail(char *str) if (!isspace(str[i])) break; } - str[++i] = NULL; + str[++i] = NUL; } return str; } diff --git a/status.c b/status.c index 4e4d3798..23c7856d 100644 --- a/status.c +++ b/status.c @@ -179,7 +179,7 @@ if(argc > 1) { strtolower(argv[1]); - if(strcmp(argv[1],"interest") == NULL) + if(strcmp(argv[1],"interest") == 0) { lID = RegisterCallback(pCall, VALUECHANGE, StatusCallback, pCon, NULL); diff --git a/tecs/Makefile b/tecs/Makefile index 77340501..16792cd1 100644 --- a/tecs/Makefile +++ b/tecs/Makefile @@ -10,10 +10,12 @@ CLI_OBJ= tecs_cli.o coc_client.o $(LIBR_OBJ) TCLI_OBJ= tecs_client.o tecs_plot.o tecs_for.o sys_aunix.o sys_aunix_c.o str.o cho.o $(CLI_OBJ) $(DLOG_OBJ) #------------ for DigitalUnix (add -DFORTIFY to CFLAGS for fortified version) -CC=cc - -#CFLAGS= -std1 -g -warnprotos -I../ -I. -I../hardsup -DFORTIFY -CFLAGS= -std1 -g -warnprotos -I../ -I. -I../hardsup +##CC=cc +##CFLAGS= -std1 -g -warnprotos -I../ -I. -I../hardsup +#------------ for Linux +CC=gcc +CFLAGS = -fwritable-strings -DCYGNUS -DNONINTF -g -I../ -I. -I../hardsup +#------------ .f.o: f77 -c -g $*.f @@ -21,18 +23,18 @@ CFLAGS= -std1 -g -warnprotos -I../ -I. -I../hardsup .c.o: $(CC) $(CFLAGS) -c $*.c +all: libtecsl.a bin/TecsServer tecs + libtecsl.a: $(CLI_OBJ) - - rm libtecsl.a + - rm -f libtecsl.a ar cr libtecsl.a $(CLI_OBJ) ranlib libtecsl.a -all: libtecsl.a bin/TecsServer tecs - tecs_plot.o: tecs_plot.f90 f90 -c -g tecs_plot.f90 bin/TecsServer: $(SERV_OBJ) - - rm bin/TecsServer + - rm -f bin/TecsServer $(CC) $(CFLAGS) -o bin/TecsServer -g $(SERV_OBJ) fortify1.c \ -lm -L../hardsup -lhlib -lfor @@ -41,7 +43,7 @@ tecs: $(TCLI_OBJ) -L/data/lnslib/lib -lpgplot -so_archive -lreadline -ltermcap -lX11 -lXm clean: - - rm *.o - - rm *.a - - rm bin/TecsServer - - rm tecs + - rm -f *.o + - rm -f *.a + - rm -f bin/TecsServer + - rm -f tecs diff --git a/velodorn.c b/velodorn.c index cfa57dc4..14671236 100644 --- a/velodorn.c +++ b/velodorn.c @@ -76,22 +76,22 @@ "TIME: \0 ", "Hz:\0 "}; - char tok_buf[TOK_BUF_L], *ptr_token, *ptr_src, *ptr; - const char tok_c[] = "/\\\0"; - char status[255]; + char tok_buf[TOK_BUF_L], *ptr_token, *ptr_src, *ptr; + const char tok_c[] = "/\\\0"; + char status[255]; - ptr_src = pText; - memset(pResult,0,sizeof(DornierStatus)); + ptr_src = pText; + memset(pResult,0,sizeof(DornierStatus)); /* skip over first token, should be command echo */ - ptr_token = strtok(ptr_src, tok_c); - if (ptr_token == NULL) return 0; /* error */ - strcpy(pResult->echo,(const char *)ptr_token); - ptr_src += strlen(ptr_token); + ptr_token = strtok(ptr_src, tok_c); + if (ptr_token == NULL) return 0; /* error */ + strcpy(pResult->echo,(const char *)ptr_token); + ptr_src += strlen(ptr_token); - ptr_src = NULL; /* necessary for further search with strtok */ - for (;;) - { + ptr_src = NULL; /* necessary for further search with strtok */ + for (;;) + { /* read text till next separator '/' */ ptr_token = strtok(ptr_src, tok_c); if (ptr_token == NULL) break; @@ -100,52 +100,41 @@ for (key_id = 0; key_id<=15; key_id++) { /* search key ? */ - sl = strlen(keys[key_id]); - if (strncmp(&keys[key_id][0], tok_buf, sl) == NULL) - { + sl = strlen(keys[key_id]); + if (strncmp(&keys[key_id][0], tok_buf, sl) == 0) + { /* step over key */ - for (cnt=0;cnt+sl < TOK_BUF_L; cnt++) + for (cnt=0;cnt+sl < TOK_BUF_L; cnt++) tok_buf[cnt] = tok_buf[cnt+sl]; - switch (key_id) - { - case 0: - { - strcpy(pResult->rm, tok_buf); - break; - } - case 1: {sscanf(tok_buf,"%d",&pResult->nom_rpm); break;} - case 2: {sscanf(tok_buf,"%d",&pResult->cur_rpm); break;} - case 3: {sscanf(tok_buf,"%d",&pResult->pwr); break;} - case 4: {sscanf(tok_buf,"%f",&pResult->curr); break;} - case 5: {sscanf(tok_buf,"%d",&pResult->rot_temp); break;} - case 6: {sscanf(tok_buf,"%d",&pResult->cont_temp); break;} - case 7: {sscanf(tok_buf,"%d",&pResult->inl_temp); break;} - case 8: {sscanf(tok_buf,"%d",&pResult->outl_temp); break;} - case 9: {sscanf(tok_buf,"%f",&pResult->cool_wat); break;} - case 10: {sscanf(tok_buf,"%f",&pResult->vacuum); break;} - case 11: {sscanf(tok_buf,"%f",&pResult->accel); break;} - case 12: - { - if (strcmp(tok_buf, ena_str) == NULL) + switch (key_id) + { + case 0: {strcpy(pResult->rm, tok_buf); break;} + case 1: {sscanf(tok_buf,"%d",&pResult->nom_rpm); break;} + case 2: {sscanf(tok_buf,"%d",&pResult->cur_rpm); break;} + case 3: {sscanf(tok_buf,"%d",&pResult->pwr); break;} + case 4: {sscanf(tok_buf,"%f",&pResult->curr); break;} + case 5: {sscanf(tok_buf,"%d",&pResult->rot_temp); break;} + case 6: {sscanf(tok_buf,"%d",&pResult->cont_temp); break;} + case 7: {sscanf(tok_buf,"%d",&pResult->inl_temp); break;} + case 8: {sscanf(tok_buf,"%d",&pResult->outl_temp); break;} + case 9: {sscanf(tok_buf,"%f",&pResult->cool_wat); break;} + case 10: {sscanf(tok_buf,"%f",&pResult->vacuum); break;} + case 11: {sscanf(tok_buf,"%f",&pResult->accel); break;} + case 12: { + if (strcmp(tok_buf, ena_str) == 0) {pResult->komm = 1; break;} - if (strcmp(tok_buf, dis_str) == NULL) + if (strcmp(tok_buf, dis_str) == 0) {pResult->komm = 0;break;} - break; - } - case 13: - /* date */ - break; - case 14: - /* time */ - break; - case 15: - sscanf(tok_buf,"%d",&pResult->iHz); - break; - } - } + break; + } + case 13: break; /* date */ + case 14: break; /* time */ + case 15: {sscanf(tok_buf,"%d",&pResult->iHz); break;} + } + } } - } - return(1); + } + return(1); } /*-------------------------------------------------------------------------*/ int DornierSend(void **pData, char *pCommand, char *pReply, int iRepLen)