D.Maden. 11-Sep-2000.

Makefiles modified to generate a Linux SICServer.
   Other files modified to get rid of irritating compiler warning messages.
This commit is contained in:
cvs
2000-09-11 09:17:43 +00:00
parent b88e4c1a7b
commit fc6c4acd79
23 changed files with 140 additions and 140 deletions

View File

@ -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

View File

@ -199,7 +199,7 @@
UserData ud;
iRet = LLDnodePtr2First(self->iUserList);
while(iRet != NULL)
while(iRet != 0)
{
LLDnodeDataTo(self->iUserList,&ud);
if(ud.fX != NULL)

View File

@ -3,7 +3,17 @@
#
# Mark Koennecke, November 1999
#----------------------------------------------------------------------------
#---------- 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

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -73,6 +73,3 @@ FILE *fp;
return (A);
}


View File

@ -130,4 +130,3 @@ MATRIX A, B;
mat_free( R );
return (X);
}


View File

@ -42,5 +42,3 @@ int errno;
return (NULL);
}


View File

@ -74,4 +74,3 @@ MATRIX a;
mat_free(P);
return (C);
}


View File

@ -55,6 +55,3 @@ MATRIX A;
}
return (result);
}


View File

@ -45,4 +45,4 @@ int i,j;
}
return (S);
}
}

View File

@ -158,7 +158,7 @@
start:
lMax = 0;
lMin = 999999999999;
lMin = 0x7fffffff;
fStart = pDriv->GetValue(pVar,pCon);
if(fStart < -999999.)
{

2
mumo.c
View File

@ -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)

6
napi.c
View File

@ -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 <stdlib.h>
#include <assert.h>
@ -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 */

View File

@ -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);

View File

@ -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! */

View File

@ -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} };

View File

@ -25,7 +25,7 @@ char *rmtrail(char *str)
if (!isspace(str[i]))
break;
}
str[++i] = NULL;
str[++i] = NUL;
}
return str;
}

View File

@ -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);

View File

@ -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

View File

@ -101,18 +101,14 @@
{
/* search key ? */
sl = strlen(keys[key_id]);
if (strncmp(&keys[key_id][0], tok_buf, sl) == NULL)
if (strncmp(&keys[key_id][0], tok_buf, sl) == 0)
{
/* step over key */
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 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;}
@ -124,23 +120,16 @@
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)
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;
case 13: break; /* date */
case 14: break; /* time */
case 15: {sscanf(tok_buf,"%d",&pResult->iHz); break;}
}
}
}