- Added new napi files

- Port to Linux
This commit is contained in:
cvs
2001-11-14 07:14:04 +00:00
parent 6c5db4ffd0
commit 3712dca74e
13 changed files with 93 additions and 61 deletions

View File

@ -61,17 +61,16 @@ VELOOBJ = velo.o velosim.o velodorn.o velodornier.o
#----- comment or uncomment the following according to operating system
#------------- for Digital Unix
BINTARGET=bin
HDFROOT=/data/lnslib
CC=cc
EXTRA=
CFLAGS = -I$(HDFROOT)/include -Ihardsup -DHDF4 -DHDF5 -I. -std1 \
-g -warnprotos -c
#HDFROOT=/data/koenneck
#CC=cc
#EXTRA=
#CFLAGS = -I$(HDFROOT)/include -Ihardsup -DHDF4 -DHDF5 -I. -std1 \
# -g -warnprotos -c
#CFLAGS = -I$(HDFROOT)/include -DFORTIFY -DHDF4 -DHDF5 -Ihardsup -g \
# -std1 -warnprotos -c
LIBS = -L$(HDFROOT)/lib -Lhardsup -lhlib -Lmatrix -lmatrix -Ltecs \
-ltecsl -ltcl8.0 -lfor $(HDFROOT)/lib/libhdf5.a \
-lmfhdf -ldf $(HDFROOT)/lib/libjpeg.a -lz -lm -ll -lc
#LIBS = -L$(HDFROOT)/lib -Lhardsup -lhlib -Lmatrix -lmatrix -Ltecs \
# -ltecsl -ltcl8.0 -lfor $(HDFROOT)/lib/libhdf5.a \
# -lmfhdf -ldf $(HDFROOT)/lib/libjpeg.a -lz -lm -ll -lc
#------- for cygnus
#HDFROOT=../HDF411
@ -82,15 +81,17 @@ LIBS = -L$(HDFROOT)/lib -Lhardsup -lhlib -Lmatrix -lmatrix -Ltecs \
# -lmfhdf -ldf -ljpeg -lz -lm
#---------- for linux
#BINTARGET=$(HOME)/bin/linux.i686
#HDFROOT=/usr/local
#CC=gcc
#CFLAGS = -I$(HDFROOT)/include -Ihardsup -fwritable-strings \
BINTARGET=../bin
HDFROOT=/usr/local
CC=gcc
CFLAGS = -I$(HDFROOT)/include -DHDF4 -Ihardsup -fwritable-strings \
-DCYGNUS -DNONINTF -g -c
#CFLAGS = -I$(HDFROOT)/include -Ihardsup -fwritable-strings -DFORTIFY \
# -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
#---------------------------------------------------------------------------
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

View File

@ -158,6 +158,9 @@
return HWPause;
}
}
#ifdef NONINTF
extern float nintf(float f);
#endif
/*-------------------------------------------------------------------------*/
static int EL737Start(struct __COUNTER *self)
{

View File

@ -593,6 +593,9 @@
assert(self);
return self->pDriv->iNoOfMonitors;
}
#ifdef NONINTF
extern float nintf(float f);
#endif
/*------------------------------------------------------------------------*/
int SetCounterPreset(pCounter self, float fVal)
{

View File

@ -3,23 +3,19 @@
#
# Mark Koennecke, November 1996
#--------------------------------------------------------------------------
.SUFFIXES:
.SUFFIXES: .c .o
OBJ= el734_utility.o asynsrv_utility.o stredit.o \
strjoin.o failinet.o geterrno.o el737_utility.o sinqhm.o serialsinq.o \
itc4util.o dillutil.o table.o el755_utility.o el755_errorlog.o \
makeprint.o StrMatch.o
#---------- for Redhat linux
#CC= gcc
#CFLAGS= -I. -I../ -DLINUX -g -c
## CC= gcc
## CFLAGS= -I. -I../ -DLINUX -g -c
CC= gcc
CFLAGS= -I/usr/local/include -I. -I../ -DLINUX -g -c
#------------ for DigitalUnix
CC=cc
CFLAGS= -I. -I../ -std1 -g -c
CC=cc
CFLAGS= -I. -I../ -std1 -g -c
#CC=cc
#CFLAGS= -I/data/koenneck/include -I. -I../ -std1 -g -c
#------------ for DigitalUnix with Fortify
## CC=cc
## CFLAGS= -DFORTIFY -I. -I../ -std1 -g -c

View File

@ -2581,7 +2581,13 @@
#include <time.h>
struct timespec delay = {0, 250000000};
struct timespec delay_left;
#ifdef LINUX
#define hibernate nanosleep(&delay, &delay_left)
#else
#define hibernate nanosleep_d9 (&delay, &delay_left)
#endif
#endif
int msr, ss;
struct EL734info *info_ptr;

View File

@ -1711,7 +1711,12 @@
#include <time.h>
struct timespec delay = {0, 250000000};
struct timespec delay_left;
#ifdef LINUX
#define hibernate nanosleep(&delay, &delay_left)
#else
#define hibernate nanosleep_d9 (&delay, &delay_left)
#endif
#endif
int my_rs;
struct EL737info *info_ptr;

View File

@ -34,20 +34,20 @@
#include "nextrics.h"
#define DET1X 256 /* x -length of detector 1 */
#define DET1Y 256 /* y-length of detector 1 */
#define DET1Y 128 /* y-length of detector 1 */
#define DET1XS 2 /* pixel size in x of detector 1 */
#define DET1YS 2 /* pixel size in y of detector 1 */
#define DET1DESC "EMBL PSD"
#define DET2X 256 /* x -length of detector 1 */
#define DET2Y 256 /* y-length of detector 1 */
#define DET2Y 128 /* y-length of detector 1 */
#define DET2XS 2 /* pixel size in x of detector 1 */
#define DET2YS 2 /* pixel size in y of detector 1 */
#define DET2DESC "Non existent second Detector"
#define DET2DESC "EMBL PSD"
#define DET3X 256 /* x -length of detector 1 */
#define DET3Y 256 /* y-length of detector 1 */
#define DET3Y 128 /* y-length of detector 1 */
#define DET3XS 2 /* pixel size in x of detector 1 */
#define DET3YS 2 /* pixel size in y of detector 1 */
#define DET3DESC "Non existent third Detector"
#define DET3DESC "EMBL PSD"
#define DETAMAX 256 /* maximum length of pixelsize array */
/* histogram memory names */
@ -444,7 +444,7 @@ name of hkl object holding crystallographic information
NXDupdate(self->pDict,"dnumber",pBueffel);
SNXSPutMotor(pServ->pSics,pCon,hfil,self->pDict,
"frametilt","DG3");
GetHistogram(self->pHistogram2,pCon,0,0,DET3X*DET3Y,lData,
GetHistogram(self->pHistogram3,pCon,0,0,DET3X*DET3Y,lData,
DET3X*DET3Y*sizeof(HistInt));
NXDputalias(hfil,self->pDict,"framecounts",lData);
@ -1523,3 +1523,4 @@ name of hkl object holding crystallographic information
return 0;
}

View File

@ -8,10 +8,11 @@
#include <math.h>
float nintf(float f)
{
double ip, rm;
double ip, rm, dVal;
float fRes;
rm = modf(f,&ip);
dVal = (double)f;
rm = modf(dVal,&ip);
if(rm < .0)rm = -rm;
if(rm > .5)
{

View File

@ -446,7 +446,9 @@
}
return SNputdata1att(hfil,dataname, DFNT_FLOAT32,1,&fVal,"Units",units);
}
#ifdef NONINTF
extern float nintf(float f);
#endif
/*--------------------------------------------------------------------------*/
int SNMakeDMC(SConnection *pCon, SicsInterp *pSics)
{

View File

@ -10,10 +10,17 @@ TCLI_OBJ= sys_aunix.o sys_aunix_c.o $(CLI_OBJ)
TECLI_OBJ= tecs_client.o tecs_plot.o tecs_for.o sys_util.o str.o instr_hosts.o $(TCLI_OBJ)
#------------ for DigitalUnix (add -DFORTIFY to CFLAGS for fortified version)
CC=cc
#CC=cc
#CFLAGS= -std1 -g -warnprotos -I../ -I. -I../hardsup -DFORTIFY
CFLAGS= -std1 -g -warnprotos -I../ -I. -I../hardsup
#CFLAGS= -std1 -g -warnprotos -I../ -I. -I../hardsup
#---------- for Redhat linux
CC= gcc
CFLAGS= -I/usr/local/include -I. -I../ -I../hardsup -DLINUX -g
#------------ for Linux
##CC=gcc
##CFLAGS = -fwritable-strings -DCYGNUS -DNONINTF -g -I../ -I. -I../hardsup
#------------
.f.o:
f77 -c -u -g $*.f
@ -31,10 +38,18 @@ all: libtecsl.a bin/TecsServer bin/TecsClient rstart bin/keep_running
tecs_plot.o: tecs_plot.f90
f90 -c -u -g tecs_plot.f90
#------------ DigitalUnix4.0D
#bin/TecsServer: $(LIBR_OBJ) $(SERV_OBJ)
# - rm bin/TecsServer
# $(CC) $(CFLAGS) -g -o bin/TecsServer -g $(LIBR_OBJ) $(SERV_OBJ) fortify1.c \
# -lm -L../hardsup -lhlib -lfor
#---------- Linux
bin/TecsServer: $(SERV_OBJ)
- rm bin/TecsServer
$(CC) $(CFLAGS) -o bin/TecsServer -g $(SERV_OBJ) fortify1.c \
-lm -L../hardsup -lhlib -lfor
$(CC) $(CFLAGS) -o bin/TecsServer $(SERV_OBJ) fortify1.c \
-lm -L../hardsup -lhlib
bin/TecsClient: $(TECLI_OBJ)
f77 -o bin/TecsClient -g $(TECLI_OBJ) \

View File

@ -31,7 +31,7 @@ typedef size_t sys_adr_len; /* argument of accept and gethostbyadr */
void sys_ctrl_init(void);
#elif defined __alpha
#elif defined __unix
#define F_CHAR(VAR) char *VAR
#define STR_TO_C(DST,SRC) str_ntrim(DST, SRC, sizeof(DST), SRC##_len)
@ -39,7 +39,7 @@ void sys_ctrl_init(void);
typedef int sys_adr_len; /* argument of accept and gethostbyadr */
#define sys_ctrl_init(DUMMY)
#define sys_ctrl_init() {}
#else

View File

@ -13,7 +13,6 @@
logical done
integer i,iostat
data lunw/0/
if (lunw .ne. 0) then
call err_msg('file already open for write')
@ -24,7 +23,7 @@
vers=0
open(lunw, name=file, status='old', access='direct', shared
open(lunw, name=file, status='old', access='direct'
1 , recl=recl, iostat=iostat)
if (iostat .eq. 0) then
read(lunw, rec=1, iostat=iostat) vers, stim, etim, wrec, rrec, wdir
@ -45,7 +44,7 @@
etim=0
wrec=-1
rrec=0
open(lunw, name=file, status='new', access='direct', shared
open(lunw, name=file, status='new', access='direct'
1 , recl=recl, err=93)
else
dlog_open_w=1 ! reopened
@ -78,7 +77,6 @@
include 'tecs_dlog.inc'
integer p,r,i,j,btim
data update/.true./
logical done
integer dlog_put_
@ -220,7 +218,6 @@
logical done
integer iostat
data lunr/0/
integer sys_gmt_off
@ -232,8 +229,8 @@
lunr=39
open(lunr, name=file, status='old', access='direct', shared
1 , recl=recl, err=99, readonly)
open(lunr, name=file, status='old', access='direct'
1 , recl=recl, err=99)
call dlog_read_block(1, done)
if (.not. done) then
close(lunr)

View File

@ -7,15 +7,16 @@
#--------------------------------------------------------------------------
#------------ for DigitalUnix (add -DFORTIFY to CFLAGS for fortified version)
CC = cc
CFLAGS = -std -g -warnprotos -I. -I../hardsup
BIN = ../bin
LFLAGS = -L../hardsup
#CC = cc
#CFLAGS = -std -g -warnprotos -I. -I../hardsup
#BIN = ../bin
#LFLAGS = -L../hardsup
#------------ for Linux
#CC = gcc
#CFLAGS = -g -I. -I../hardsup -DLinux
#BIN = linux.i686
#LFLAGS = -L../hardsup -L/usr/X11R6/lib
CC = gcc
CFLAGS = -g -I. -I../hardsup -DLinux
BIN = ../bin
LFLAGS = -L../hardsup -L/usr/X11R6/lib
#------------
#----------------------------------------------------------
@ -33,6 +34,7 @@ $(BIN)/SerPortServer: SerPortServer.c
$(CC) $(CFLAGS) -o $(BIN)/SerPortServer \
SerPortServer.c $(LFLAGS) -lhlib -lX11
$(BIN)/asynsrv_test: asynsrv_test.c
rm -f $(BIN)/asynsrv_test
$(CC) $(CFLAGS) -o $(BIN)/asynsrv_test \