From cbc7fdf33441cfdba27dfbf35b241860faee17a4 Mon Sep 17 00:00:00 2001 From: cvs Date: Fri, 18 Feb 2000 15:54:23 +0000 Subject: [PATCH] Compiled under Redhat Linux IO to SICS instead of LPT RETURN ENDIF 10000 FORMAT (3I4,' Scan Collision in GOLOOP') -11000 FORMAT (10X,A1'-stop. Restart at'/ +11000 FORMAT (10X,A1,'-stop. Restart at'/ $ 3I4,', number',I5,' in set',I3,' segment',I2, $ ' at Idata Record',I4) -12000 FORMAT (10X'End of Segment. Start next data at Record',I4) -13000 FORMAT (10X'End of Data Collection ---- HURRAY !!') +12000 FORMAT (10X,'End of Segment. Start next data at Record',I4) +13000 FORMAT (10X,'End of Data Collection ---- HURRAY !!') END diff --git a/difrac/grid.f b/difrac/grid.f index 3f89527a..39b949a0 100644 --- a/difrac/grid.f +++ b/difrac/grid.f @@ -145,7 +145,7 @@ C----------------------------------------------------------------------- KI = ' ' RETURN ENDIF - CALL CTIME (TIMSTP,COUNT) + CALL CCTIME (TIMSTP,COUNT) ICOUNT(N1) = COUNT ANG(IFIRST) = ANG(IFIRST) + ANSTEP(IFIRST) CALL MOD360 (ANG(IFIRST)) diff --git a/difrac/indmes.f b/difrac/indmes.f index d4b8677e..5be62352 100644 --- a/difrac/indmes.f +++ b/difrac/indmes.f @@ -424,7 +424,7 @@ C----------------------------------------------------------------------- ENDIF RETURN 10000 FORMAT (' Scan Collision') -11000 FORMAT (/,3X' h k l 2-Theta Time', +11000 FORMAT (/,3X, ' h k l 2-Theta Time', $ ' Att Bkg Peak Bkg Psi Inet ') 12000 FORMAT (3I4,F7.2,F7.3,1X,I1,I5,I7,I5,F7.2,I7,I4) 13000 FORMAT (3I4,5F8.2,I8) diff --git a/difrac/latmod.f b/difrac/latmod.f index 52053778..da56bc8e 100644 --- a/difrac/latmod.f +++ b/difrac/latmod.f @@ -35,4 +35,3 @@ C----------------------------------------------------------------------- RETURN 10000 FORMAT (A1) END - \ No newline at end of file diff --git a/difrac/linprf.f b/difrac/linprf.f index fde5c257..2f9e03c5 100644 --- a/difrac/linprf.f +++ b/difrac/linprf.f @@ -72,7 +72,7 @@ C Loop to count and step through the reflection C----------------------------------------------------------------------- CALL SHUTTR (99) DO 240 J = 1,NPTS - CALL CTIME (TSTEP,COUNT) + CALL CCTIME (TSTEP,COUNT) ACOUNT(J) = COUNT IF (ITYP .EQ. 0) ANG1 = ANG1 + CSTEP IF (ITYP .NE. 0) ANG2 = ANG2 + CSTEP @@ -135,7 +135,7 @@ C----------------------------------------------------------------------- 11000 FORMAT (' There is something WRONG. Please try again.') 13000 FORMAT (' Scan type: Theta/2Theta or Omega, 0 or 1 ',$) 15000 FORMAT (' Type the no. of pts before & after the peak,' - $ '(',I2,',',I2,') ',$) + $ ,'(',I2,',',I2,') ',$) 15100 FORMAT (' Type the step size in degs and the preset/step', $ ' (',F4.2,',',F4.2,') ',$) 17000 FORMAT (' Which attenuator do you wish to use (0) ? ',$) diff --git a/difrac/lister.f b/difrac/lister.f index 7d47f835..978bfaa2 100644 --- a/difrac/lister.f +++ b/difrac/lister.f @@ -202,8 +202,8 @@ C----------------------------------------------------------------------- IF (ISYSF .EQ. 6) ISYSF = 5 WRITE (COUT,15000) FSTRIN,STRING 15000 FORMAT (' Space-group choices are as follows :--'/ - $ ' 1. The safest space-group based on cell-reduction 'A/ - $ ' 2. The safest space-group based on cell lengths 'A/ + $ ' 1. The safest space-group based on cell-reduction ', A/ + $ ' 2. The safest space-group based on cell lengths ', A/ $ ' 3. Any other space-group.'/ $ ' Which do you want (1) ',$) 16000 FORMAT (' Type the space-group symbol ',$) diff --git a/difrac/lsormt.f b/difrac/lsormt.f index 873ca558..71d4dd7f 100644 --- a/difrac/lsormt.f +++ b/difrac/lsormt.f @@ -351,7 +351,7 @@ C----------------------------------------------------------------------- 23000 FORMAT (' Do you wish to insert reflections (N) ? ',$) 24100 FORMAT (' Do you want to include these zero values (Y) ? ',$) 24200 FORMAT (' The new zeroes for Omega and Chi are',2F7.3) -24000 FORMAT (' First non-written record: 'I4) +24000 FORMAT (' First non-written record: ',I4) 25000 FORMAT (/,22X,'Observed',22X,'Calculated',10X,'Angular'/ $ ' h k l 2Theta Omega Chi Phi ', $ ' 2Theta Omega Chi Phi ', diff --git a/difrac/matrix.f b/difrac/matrix.f index 61272e00..f6475bbf 100644 --- a/difrac/matrix.f +++ b/difrac/matrix.f @@ -231,4 +231,4 @@ C----------------------------------------------------------------------- 520 RETURN 10000 FORMAT(' Matrix operation ',A6,' is not programmed') END - + diff --git a/difrac/mesint.f b/difrac/mesint.f index f0e401ae..000b8288 100644 --- a/difrac/mesint.f +++ b/difrac/mesint.f @@ -38,7 +38,7 @@ C----------------------------------------------------------------------- PRESET = SPRESET RETURN ENDIF - 120 CALL CTIME (TTIME,COUNT) + 120 CALL CCTIME (TTIME,COUNT) IF (COUNT/TTIME .GE. ICPSMX) THEN NATT = NATT + 1 CALL ANGSET (THETA,OMEGA,CHI,PHI,NATT,ICOL) @@ -72,7 +72,7 @@ C----------------------------------------------------------------------- C Measure the low angle background for BGDTIM C----------------------------------------------------------------------- BGDTIM = FRAC*PRESET - CALL CTIME (BGDTIM,BGRD1) + CALL CCTIME (BGDTIM,BGRD1) C----------------------------------------------------------------------- C Do the scan: C ITYPE Type of scan 0 -- theta/2-theta b-p-b @@ -202,7 +202,7 @@ C----------------------------------------------------------------------- I = BGRD1*PRESET*FRAC/BGDTIM + 0.5 BGRD1 = I BGDTIM = PRESET*FRAC - CALL CTIME (BGDTIM,BGRD2) + CALL CCTIME (BGDTIM,BGRD2) IF (BGRD1 + BGRD2 .GT. 4.0*COUNT) THEN WRITE (COUT,11000) IH,IK,IL CALL GWRITE(ITP,' ') @@ -251,7 +251,7 @@ C----------------------------------------------------------------------- C----------------------------------------------------------------------- C Count at peak for time TIME C----------------------------------------------------------------------- - 420 CALL CTIME (PRESET,COUNT) + 420 CALL CCTIME (PRESET,COUNT) C C = COUNT/PRESET IF (C .GE. ICPSMX .AND. NATTEN .GT. 0 .AND. NATT .LT. NATTEN) THEN NATT = NATT + 1 @@ -271,9 +271,9 @@ C Measure the backgrounds C----------------------------------------------------------------------- IF (ITYPE .EQ. 5 .OR. ITYPE .EQ. 6) THEN BGDTIM = FRAC*PRESET - CALL CTIME (BGDTIM,BGRD2) + CALL CCTIME (BGDTIM,BGRD2) CALL ANGSET (ANG1,ANG2,CHI,PHI,NATT,ICOL) - CALL CTIME (BGDTIM,BGRD1) + CALL CCTIME (BGDTIM,BGRD1) IF (BGRD1 + BGRD2 .GT. 4.0*COUNT) THEN WRITE (COUT,11000) IH,IK,IL CALL GWRITE(LPT,' ') @@ -287,7 +287,7 @@ C----------------------------------------------------------------------- C Sample background on high side C----------------------------------------------------------------------- PRESET = STIME*0.5 - CALL CTIME (PRESET,BGRD2) + CALL CCTIME (PRESET,BGRD2) C----------------------------------------------------------------------- C Evaluate rough Peak/Background ratio and Time required to C accumulate a preset number FRAC of counts on the peak. @@ -308,7 +308,7 @@ C Finish measurement of high background C----------------------------------------------------------------------- BCT = (IBCT - (STIME/2.0)) IF (BCT .GT. 0.) THEN - CALL CTIME (BCT,BKG2) + CALL CCTIME (BCT,BKG2) BGRD2 = BGRD2 + BKG2 BCT = IBCT ICC = 0 @@ -327,7 +327,7 @@ C----------------------------------------------------------------------- ENDIF PPCT = PCT PCT = IPCT - CALL CTIME (PPCT,PC) + CALL CCTIME (PPCT,PC) COUNT = COUNT + PC ELSE PCT = STIME @@ -341,7 +341,7 @@ C----------------------------------------------------------------------- RETURN ENDIF PRESET = BCT - CALL CTIME (PRESET,BGRD1) + CALL CCTIME (PRESET,BGRD1) PRESET = PCT + BCT CALL FILLN2 (IFILN,NFLG) IF (NFLG .EQ. 1) GO TO 100 @@ -373,7 +373,7 @@ C----------------------------------------------------------------------- WRITE (COUT,10000) CALL GWRITE (ITP,' ') 100 TIM1 = 1500 - CALL CTIME (TIM1,CONT) + CALL CCTIME (TIM1,CONT) DUM1 = 1.0/16.0 DUM2 = 0.5 CALL ONEBEP (DUM1,DUM2) @@ -385,7 +385,7 @@ C----------------------------------------------------------------------- CALL GWRITE (ITP,' ') TMIN = DELAY*6000 IF (TMIN .LE. 1) TMIN = 1 - CALL CTIME (TMIN,DUM2) + CALL CCTIME (TMIN,DUM2) IFILN = 1 NFLG = 1 ENDIF diff --git a/difrac/orcel2.f b/difrac/orcel2.f index 6c894768..e9a6d0cf 100644 --- a/difrac/orcel2.f +++ b/difrac/orcel2.f @@ -241,7 +241,7 @@ C----------------------------------------------------------------------- $ ' reflections') 24000 FORMAT (/' Orientation Matrix from M2') 25000 FORMAT (3F12.8) -26000 FORMAT (' Reflection,'I2,' > ',$) +26000 FORMAT (' Reflection,',I2,' > ',$) END C----------------------------------------------------------------------- C Subroutine to calculate the S matrices for ORCEL2 diff --git a/difrac/oscil.f b/difrac/oscil.f index fba814df..6644ae2b 100644 --- a/difrac/oscil.f +++ b/difrac/oscil.f @@ -69,7 +69,7 @@ C----------------------------------------------------------------------- KI = ' ' RETURN ENDIF - CALL CTIME (TISTEP,COUNT) + CALL CCTIME (TISTEP,COUNT) CALL KORQ (KQFLAG) IF (KQFLAG .NE. 1) THEN WRITE (COUT,15000) diff --git a/difrac/pcount.f b/difrac/pcount.f index 662cc162..fd022812 100644 --- a/difrac/pcount.f +++ b/difrac/pcount.f @@ -49,7 +49,7 @@ C----------------------------------------------------------------------- C Single count only C----------------------------------------------------------------------- IF (ANS .EQ. 'N') THEN - CALL CTIME (MPRESET,COUNT) + CALL CCTIME (MPRESET,COUNT) IF (NATTEN .NE. 0) THEN WRITE (COUT,15000) MPRESET,NATT,COUNT CALL GWRITE (ITP,' ') @@ -69,7 +69,7 @@ C----------------------------------------------------------------------- 110 CONTINUE BIGTIM = MPRESET * 5. WRITE (LPT,17000) BIGTIM - CALL CTIME (BIGTIM,COUNT) + CALL CCTIME (BIGTIM,COUNT) COUNT = COUNT*MPRESET/BIGTIM SIGM = SQRT(COUNT) AVC = COUNT + 0.5 @@ -81,7 +81,7 @@ C----------------------------------------------------------------------- WRITE (LPT,20000) DO 150 N = 1,50 DO 120 I = 1,10 - CALL CTIME (MPRESET,COUNT) + CALL CCTIME (MPRESET,COUNT) C(I) = COUNT 120 CONTINUE DO 130 I = 1,10 @@ -119,7 +119,7 @@ C----------------------------------------------------------------------- CALL SHUTTR (-99) KI = ' ' RETURN -10000 FORMAT (' Timed Count at a Point (Y) ? '$) +10000 FORMAT (' Timed Count at a Point (Y) ? ',$) 11000 FORMAT (' Type the Count Preset and the attenuator', $ ' number (1000.0,0) ',$) 12000 FORMAT (' Type the Count Preset (1000.0) ',$) diff --git a/difrac/pfind.f b/difrac/pfind.f index f473483c..9b0b9fd9 100644 --- a/difrac/pfind.f +++ b/difrac/pfind.f @@ -29,7 +29,7 @@ C----------------------------------------------------------------------- ICOUNT = 0 MCOUNT = 0 DO 110 I = 1,NPTS - CALL CTIME (TIM,PCOUNT(I)) + CALL CCTIME (TIM,PCOUNT(I)) IF (PCOUNT(I) .GT. MCOUNT) THEN MCOUNT = PCOUNT(I) ICOUNT = I diff --git a/difrac/prnbas.f b/difrac/prnbas.f index dc7c29a3..983d2efb 100644 --- a/difrac/prnbas.f +++ b/difrac/prnbas.f @@ -259,7 +259,7 @@ C----------------------------------------------------------------------- 22000 FORMAT (' There are NO Explicit Absence Conditions') 23000 FORMAT (' The Explicit Absence Conditions are :--') 24000 FORMAT (' Type',I3,' -- ', - $ I4,'*h +',I2,'*k +',I2,'*l = ',I2'*n +',I2) + $ I4,'*h +',I2,'*k +',I2,'*l = ',I2,'*n +',I2) 30000 FORMAT (' Peak Top Counting - 2Theta range') 31000 FORMAT (' Peak Top Counting - Omega range') 32000 FORMAT (' Economized Peak Top - 2Theta range') @@ -271,8 +271,8 @@ C----------------------------------------------------------------------- 29000 FORMAT (' Omega Scan with Precision Control. ',A, $ 'rofile analysis.') 25000 FORMAT (' Compton or TDS Measurements') -35000 FORMAT (' Bisecting Geometry. Scan speed 'F8.3'deg/min') -34000 FORMAT (' Parallel Geometry. Scan speed 'F8.3'deg/min') +35000 FORMAT (' Bisecting Geometry. Scan speed ',F8.3,'deg/min') +34000 FORMAT (' Parallel Geometry. Scan speed ',F8.3,'deg/min') 36000 FORMAT (' Scan Parameters: ', $ F6.3,' + ',F6.3,'*tan(theta) + ',F6.3) 37000 FORMAT (' Time/Precision Params: ', @@ -285,5 +285,5 @@ C----------------------------------------------------------------------- 43000 FORMAT (' Next reflection: ',3I4,', #',I5,', set',I3, $ ', segment',I2,', at record ',I4) 44000 FORMAT (' This is a low-temperature experiment.'/ - $ ' The waiting time after a refill is'F6.2' minutes.') + $ ' The waiting time after a refill is',F6.2,' minutes.') END diff --git a/difrac/prnint.f b/difrac/prnint.f index 2c6da01a..909bc28a 100644 --- a/difrac/prnint.f +++ b/difrac/prnint.f @@ -240,7 +240,7 @@ C----------------------------------------------------------------------- 13000 FORMAT (' Type 2thetamin ',$) 14000 FORMAT (/' Reflns can be selected on 2theta and Inet/Sig(Inet)'/ $ ' Type 2thetamin, 2thetamax and min(I/sigI)', - $ ' (All Reflns) '$) + $ ' (All Reflns) ',$) 15000 FORMAT (' Intensity data is in records 20 to',I5/ $ ' Type the range of records to be examined ',$) 16000 FORMAT (/' Records',I4,' to',I4,' will be used.') diff --git a/difrac/sgerrs.f b/difrac/sgerrs.f index 75a0071a..70873338 100644 --- a/difrac/sgerrs.f +++ b/difrac/sgerrs.f @@ -38,4 +38,3 @@ C----------------------------------------------------------------------- 10000 FORMAT (' Error no.',I3,' in processing space group symbol ', $ 10A1/1X,A52) END - \ No newline at end of file diff --git a/difrac/sglatc.f b/difrac/sglatc.f index 7e940895..549c2734 100644 --- a/difrac/sglatc.f +++ b/difrac/sglatc.f @@ -654,4 +654,3 @@ C----------------------------------------------------------------------- IF (IER .EQ. 0) IER = 5 RETURN END - \ No newline at end of file diff --git a/difrac/sglpak.f b/difrac/sglpak.f index 762cb007..5a19100e 100644 --- a/difrac/sglpak.f +++ b/difrac/sglpak.f @@ -9,4 +9,3 @@ C----------------------------------------------------------------------- L(2) = 3 RETURN END - \ No newline at end of file diff --git a/difrac/sgmtml.f b/difrac/sgmtml.f index 5dfbd201..5814ca03 100644 --- a/difrac/sgmtml.f +++ b/difrac/sgmtml.f @@ -21,4 +21,3 @@ C----------------------------------------------------------------------- CONTINUE RETURN END - \ No newline at end of file diff --git a/difrac/sgprnh.f b/difrac/sgprnh.f index 788a1c50..422970dc 100644 --- a/difrac/sgprnh.f +++ b/difrac/sgprnh.f @@ -123,4 +123,3 @@ C----------------------------------------------------------------------- 14000 FORMAT (' Friedel Reflections are the -,-,- of these.'/'%') 15000 FORMAT (5X,3(A20,3X)) END - \ No newline at end of file diff --git a/difrac/sgrmat.f b/difrac/sgrmat.f index 5ae411c2..8fa5c7d7 100644 --- a/difrac/sgrmat.f +++ b/difrac/sgrmat.f @@ -28,4 +28,3 @@ C----------------------------------------------------------------------- RT(5,4) = 20. RETURN END - \ No newline at end of file diff --git a/difrac/sgroup.f b/difrac/sgroup.f index c6e7753c..a75238bb 100644 --- a/difrac/sgroup.f +++ b/difrac/sgroup.f @@ -559,4 +559,3 @@ C----------------------------------------------------------------------- RETURN 10000 FORMAT (10A1) END - \ No newline at end of file diff --git a/difrac/sgtrcf.f b/difrac/sgtrcf.f index 9f399ca3..49c13c8f 100644 --- a/difrac/sgtrcf.f +++ b/difrac/sgtrcf.f @@ -66,4 +66,3 @@ C----------------------------------------------------------------------- 11000 FORMAT (' Operator',I2,' generates matrix',I3,' which has a', $ ' translation conflict',2I3) END - \ No newline at end of file diff --git a/difrac/tcentr.f b/difrac/tcentr.f index 7f2ea552..20bf3cc3 100644 --- a/difrac/tcentr.f +++ b/difrac/tcentr.f @@ -182,7 +182,7 @@ C Position on the peak and count for standard preset C----------------------------------------------------------------------- CALL ANGSET (RTHETA,ROMEGA,RCHI,RPHI,NATT,ICOL) CALL SHUTTR (99) - CALL CTIME (PRESET,COUNT) + CALL CCTIME (PRESET,COUNT) ICOUNT = COUNT C----------------------------------------------------------------------- C Do not save a weak count diff --git a/difrac/tfind.f b/difrac/tfind.f index 09d65503..c6f771e9 100644 --- a/difrac/tfind.f +++ b/difrac/tfind.f @@ -16,7 +16,7 @@ C----------------------------------------------------------------------- ICOUNT = 0 MCOUNT = 0 DO 110 I = 1,NPTS - CALL CTIME (TIM,TCOUNT(I)) + CALL CCTIME (TIM,TCOUNT(I)) IF (TCOUNT(I) .GT. MCOUNT) THEN MCOUNT = TCOUNT(I) ICOUNT = I diff --git a/difrac/trics.f b/difrac/trics.f index d2f138fe..3c1a16e3 100644 --- a/difrac/trics.f +++ b/difrac/trics.f @@ -35,7 +35,7 @@ C----------------------------------------------------------------------- C----------------------------------------------------------------------- C CTIME Count for a fixed time C----------------------------------------------------------------------- - SUBROUTINE CTIME (XTIME, XCOUNT) + SUBROUTINE CCTIME (XTIME, XCOUNT) REAL XTIME, XCOUNT INCLUDE 'COMDIF' call setslt (icadsl,icol) @@ -234,7 +234,7 @@ C----- position RETURN ENDIF C----- count - CALL CTIME(PRESET,COUNT) + CALL CCTIME(PRESET,COUNT) CALL KORQ(IT) IF(IT .NE. 1)THEN IERR = 2 @@ -295,7 +295,7 @@ C----- position RETURN ENDIF C----- count - CALL CTIME(SPRESET,COUNT) + CALL CCTIME(SPRESET,COUNT) CALL KORQ(IT) IF(IT .NE. 1)THEN IERR = 2 @@ -341,7 +341,7 @@ C----------------------------------------------------------------------- C Set the microscope viewing position (CAD-4 version) C----------------------------------------------------------------------- SUBROUTINE VUPOS (VTH,VOM,VCH,VPH) - CALL ANGSET(VTH,VOM,VCH,VPH) + CALL ANGSET(VTH,VOM,VCH,VPH,1,1) RETURN END diff --git a/hardsup/Makefile b/hardsup/Makefile index b90b8b5b..83832343 100644 --- a/hardsup/Makefile +++ b/hardsup/Makefile @@ -3,15 +3,20 @@ # # Mark Koennecke, November 1996 #-------------------------------------------------------------------------- -CC=cc -#CC= gcc +#CC=cc +CC= gcc OBJ= el734_utility.o asynsrv_utility.o stredit.o \ strjoin.o geterrno.o el737_utility.o sinqhm.o serialsinq.o \ itc4util.o dillutil.o table.o el755_utility.o el755_errorlog.o \ makeprint.o -CFLAGS= -I/data/koenneck/include -I. -I../ -std1 -g -c +#---------- for Redhat linux +CFLAGS= -I/usr/local/include -I. -I../ -DLINUX -g -c +#------------ for DigitalUnix +#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 +#------------ for CYGNUS toolchain on Win32 #CFLAGS= -I. -I../ -DCYGNUS -g -c .c.o: $(CC) $(CFLAGS) $*.c diff --git a/hardsup/el734_utility.c b/hardsup/el734_utility.c index 6273a476..36ee0736 100644 --- a/hardsup/el734_utility.c +++ b/hardsup/el734_utility.c @@ -676,7 +676,9 @@ #include #include #include +#ifndef LINUX #include +#endif #include #include #include @@ -2135,6 +2137,10 @@ char cILLGText[256]; int *fp_cntr, int *fr_cntr, float *ist_posit) { +#ifdef LINUX +#define nanosleep_d9 nanosleep +#endif + #ifdef __VMS #include #define hibernate lib$wait (0.25) diff --git a/hardsup/el737_utility.c b/hardsup/el737_utility.c index 8467d9dd..b7b9fe75 100644 --- a/hardsup/el737_utility.c +++ b/hardsup/el737_utility.c @@ -500,7 +500,9 @@ #include #include #include +#ifndef LINUX #include +#endif #include #include #include @@ -1444,6 +1446,9 @@ int *c3, int *c4, float *timer) { +#ifdef LINUX +#define nanosleep_d9 nanosleep +#endif #ifdef __VMS #include #define hibernate lib$wait (0.25) diff --git a/hardsup/sinqhm.c b/hardsup/sinqhm.c index cd425795..0ca98abb 100644 --- a/hardsup/sinqhm.c +++ b/hardsup/sinqhm.c @@ -55,8 +55,11 @@ #include "sinqhm.h" #include "sinqhm.i" -/* missing in cygnus network stuff?? */ -#ifdef CYGNUS +/* missing in cygnus and linux network stuff?? */ +#ifdef LINUX +#define CYGNUS +#endif +#ifdef CYGNUS #define MSG_WAITALL 0 #endif diff --git a/nintf.c b/nintf.c new file mode 100644 index 00000000..6d829df9 --- /dev/null +++ b/nintf.c @@ -0,0 +1,25 @@ +/*---------------------------------------------------------------------- + Some systems, such as linux, miss nintf in the math library. This + is an implementation. + + Mark Koennecke, February 2000 + ---------------------------------------------------------------------------*/ + +#include + float nintf(float f) + { + double ip, rm; + float fRes; + + rm = modf(f,&ip); + if(rm < .0)rm = -rm; + if(rm > .5) + { + if(ip < .0) + ip -= 1.; + else + ip += 1.; + + } + return (float) ip; + } diff --git a/nserver.c b/nserver.c index 5a1c47a6..5da87e83 100644 --- a/nserver.c +++ b/nserver.c @@ -424,7 +424,7 @@ tNow = time(NULL); sWait.tFinish = tNow + (time_t)fVal; sWait.iEnd = 0; - lID = TaskRegister(pTask,WaitTask,WaitSignal,free,&sWait,1); + lID = TaskRegister(pTask,WaitTask,WaitSignal,NULL,&sWait,1); TaskWait(pTask,lID); SetStatus(eOld); return i; @@ -441,7 +441,7 @@ tNow = time(NULL); sWait.tFinish = tNow + lTime; sWait.iEnd = 0; - lID = TaskRegister(pTasker,WaitTask,WaitSignal,free,&sWait,1); + lID = TaskRegister(pTasker,WaitTask,WaitSignal,NULL,&sWait,1); TaskWait(pTasker,lID); return 1; } diff --git a/sicsstatus.tcl b/sicsstatus.tcl index 6f029b4f..514403d6 100644 --- a/sicsstatus.tcl +++ b/sicsstatus.tcl @@ -1,7 +1,7 @@ # RuenBuffer wuerg Buf new wuerg hm CountMode timer -hm preset 200.000000 +hm preset 2.000000 hm genbin 120.000000 35.000000 512 hm init datafile focus-1001848.hdf @@ -122,7 +122,7 @@ phone setAccess 2 adress UNKNOWN adress setAccess 2 # Counter counter -counter SetPreset 2.000000 +counter SetPreset 0.500000 counter SetMode Timer # Motor som som SoftZero 0.000000 @@ -364,5 +364,5 @@ sample Bi2212 #1, th vs SGU=-12.5 sample setAccess 2 title TopsiTupsiTapsi title setAccess 2 -starttime 1999-12-16 14:43:50 +starttime 2000-02-18 16:40:55 starttime setAccess 2 diff --git a/task.c b/task.c index 381e0c48..bc9b065a 100644 --- a/task.c +++ b/task.c @@ -70,7 +70,10 @@ if(self->pKill) { - self->pKill(self->pData); + if(self->pData) + { + self->pKill(self->pData); + } } /* unlink */ if(self->pPrevious != NULL) diff --git a/tcl/topsicom.tcl b/tcl/topsicom.tcl index 171393b3..23f4343f 100644 --- a/tcl/topsicom.tcl +++ b/tcl/topsicom.tcl @@ -5,9 +5,9 @@ # Mark Koennecke, October 1997 # Requires a sics scan command called xxxscan #---------------------------------------------------------------------------- -set home /data/koenneck/src/sics/tcl -set datapath /data/koenneck/tmp -set recoverfil /data/koenneck/tmp/recover.bin +set home /home/koenneck/sics/tcl +set datapath /home/koenneck/tmp +set recoverfil /home/koenneck/tmp/recover.bin source $home/utils.tcl diff --git a/test.tcl b/test.tcl index f0a0fb0c..8685514f 100644 --- a/test.tcl +++ b/test.tcl @@ -9,6 +9,9 @@ rename scan stscan +#-------- a home for this, everything else is in relation to this +set shome /home/koenneck + #set auto_path "/data/koenneck/src/sics/tcl" #source $auto_path/tcl8/topsicom.tcl @@ -27,10 +30,10 @@ ServerOption ReadUserPasswdTimeout 7000 # time to wiat for a user/passwd to be sent from a client. Increase this # if there is a problem connecting to a server due to network overload\ -ServerOption LogFileDir /data/koenneck/log +ServerOption LogFileDir $shome/log #LogFileDir is the directory where the command log is going -ServerOption LogFileBaseName /data/koenneck/src/sics/tmp/server +ServerOption LogFileBaseName $shome/sics/tmp/server # the path and base name of the internal server logfile to which all # activity will be logged. @@ -48,7 +51,7 @@ ServerOption InterruptPort 2914 ServerOption TelnetPort 1301 ServerOption TelWord sicslogin -ServerOption DefaultTclDirectory /data/koenneck/src/sics/tcl +ServerOption DefaultTclDirectory $shome/sics/tcl ServerOption DefaultCommandFile topsicom.tcl #------ a port for broadcasting UDP messages @@ -188,7 +191,7 @@ Publish LogBook Spy MakeRuenBuffer #---------------- TestVariables for Storage VarMake SicsDataPath Text Mugger -SicsDataPath "/data/koenneck/src/sics/" +SicsDataPath "$shome/sics/" SicsDataPath lock VarMake SicsDataPrefix Text Mugger SicsDataPrefix test @@ -203,8 +206,8 @@ VarMake fax Text User VarMake email Text User VarMake sample_mur Float User -MakeDataNumber SicsDataNumber "/data/koenneck/src/sics/danu.dat" -InitSANS /data/koenneck/src/sics/sansdict.dic +MakeDataNumber SicsDataNumber "$shome/sics/danu.dat" +InitSANS $shome/sics/sansdict.dic #InitDMC MakeScanCommand xxxscan counter topsi.hdd recover.bin @@ -227,15 +230,15 @@ banana CountMode Timer #banana configure Counter counter banana init ClientPut "HM initialized" -source /data/koenneck/src/sics/tcl/topsicom.tcl -source /data/koenneck/src/sics/countf.tcl +source $shome/sics/tcl/topsicom.tcl +source $shome/sics/countf.tcl Publish count User Publish repeat user -source /data/koenneck/src/sics/tcl/cscan.tcl +source $shome/sics/tcl/cscan.tcl Publish cscan User Publish sscan User Publish sftime Spy -source /data/koenneck/src/sics/tcl/fit.tcl +source $shome/sics/tcl/fit.tcl Publish fit Spy SerialInit Publish serialport User @@ -275,7 +278,7 @@ HKL setub -0.1247023 0.0016176 -0.0413566 \ -0.1044479 -0.0013264 0.0493878 \ 0.0007513 0.0840941 0.0015745 MakeOptimise opti counter -MakeMesure mess HKL xxxscan omega o2t /data/koenneck/src/sics/tmp \ +MakeMesure mess HKL xxxscan omega o2t $shome/sics/tmp \ SicsDataNumber MakeHklscan xxxscan HKL @@ -367,9 +370,9 @@ Publish co User source helium.tcl -MakeTRICSNEXUS sicsdatanumber /data/koenneck/src/sics/tmp trics.dic +MakeTRICSNEXUS sicsdatanumber $shome/sics/tmp trics.dic source autofile.tcl -autofilepath /data/koenneck/tmp/auto +autofilepath $shome/tmp/auto MakeXYTable omth