Changeset 12840
- Timestamp:
- Apr 17, 2007, 9:59:02 AM (19 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 11 added
- 4 deleted
- 35 edited
-
Configure.in (modified) (1 diff)
-
Makefile.Common (modified) (1 diff)
-
Makefile.in (modified) (1 diff)
-
configure (modified) (1 diff)
-
configure.tcsh (modified) (16 diffs)
-
src/addstar/include/addstar.h (modified) (1 diff)
-
src/addstar/src/ReadImageHeader.c (modified) (2 diffs)
-
src/addstar/src/SetSignals.c (modified) (1 diff)
-
src/addstar/src/args.c (modified) (1 diff)
-
src/delstar/src/SetSignals.c (modified) (1 diff)
-
src/getstar/Makefile (modified) (2 diffs)
-
src/getstar/include/dvoImageExtract.h (added)
-
src/getstar/src/ConfigInit_extract.c (added)
-
src/getstar/src/SelectImages.c (added)
-
src/getstar/src/SetSignals.c (modified) (1 diff)
-
src/getstar/src/WriteImageFITS.c (added)
-
src/getstar/src/WriteImages.c (added)
-
src/getstar/src/args_extract.c (added)
-
src/getstar/src/dvoImageExtract.c (added)
-
src/libdvo/include/dvo.h (modified) (1 diff)
-
src/libdvo/src/mosaic_astrom.c (modified) (4 diffs)
-
src/libohana/Makefile (modified) (2 diffs)
-
src/opihi/cmd.astro/Makefile (modified) (1 diff)
-
src/opihi/cmd.astro/imfit-Pgauss.c (deleted)
-
src/opihi/cmd.astro/imfit-Qgauss.c (deleted)
-
src/opihi/cmd.astro/imfit-Sgauss.c (deleted)
-
src/opihi/cmd.astro/imfit-pgauss-psf.c (added)
-
src/opihi/cmd.astro/imfit-qgauss-psf.c (added)
-
src/opihi/cmd.astro/imfit-sgauss-psf.c (added)
-
src/opihi/cmd.astro/imfit-test.c (modified) (2 diffs)
-
src/opihi/cmd.astro/imfit.c (modified) (1 diff)
-
src/opihi/cmd.astro/imsub.c (modified) (1 diff)
-
src/opihi/dvo/Makefile (modified) (1 diff)
-
src/opihi/dvo/cmpRead.c (deleted)
-
src/opihi/dvo/cmpReadFile.c (added)
-
src/opihi/include/pantasks.h (modified) (1 diff)
-
src/opihi/include/pcontrol.h (modified) (2 diffs)
-
src/opihi/pantasks/CheckJobs.c (modified) (3 diffs)
-
src/opihi/pantasks/ControllerOps.c (modified) (2 diffs)
-
src/opihi/pantasks/JobOps.c (modified) (2 diffs)
-
src/opihi/pantasks/LocalJob.c (modified) (2 diffs)
-
src/opihi/pclient/ChildOps.c (modified) (1 diff)
-
src/opihi/pcontrol/CheckDoneJob.c (modified) (1 diff)
-
src/opihi/pcontrol/GetJobOutput.c (modified) (3 diffs)
-
src/opihi/pcontrol/HostOps.c (modified) (1 diff)
-
src/opihi/pcontrol/JobOps.c (modified) (2 diffs)
-
src/opihi/pcontrol/PclientCommand.c (modified) (2 diffs)
-
src/opihi/pcontrol/StartHost.c (modified) (1 diff)
-
src/opihi/pcontrol/StopHosts.c (modified) (2 diffs)
-
src/opihi/pcontrol/stdout.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/Configure.in
r11888 r12840 18 18 CPPFLAGS = @CPPFLAGS@ 19 19 LDFLAGS = @LDFLAGS@ 20 DLLTYPE = @DLLTYPE@ 20 21 21 22 # flags for external dependencies -
trunk/Ohana/Makefile.Common
r12160 r12840 62 62 @echo "" 63 63 64 $(LIB)/%.$(ARCH).dylib: 65 @if [ ! -d $(LIB) ]; then mkdir -p $(LIB); fi 66 rm -f $@ 67 gcc -dynamiclib -o $@ $^ -lc 68 @echo "compiled shared library $*" 69 @echo "" 70 64 71 # shared objects have a different compilation on solaris: 65 72 # gcc -shared -o $@ $^ -lc 66 73 67 74 $(DESTLIB)/%.so: $(LIB)/%.$(ARCH).so 75 @if [ ! -d $(DESTLIB) ]; then mkdir -p $(DESTLIB); fi 76 rm -f $@ 77 cp $< $@ 78 @echo "installed shared library $*" 79 @echo "" 80 81 $(DESTLIB)/%.dylib: $(LIB)/%.$(ARCH).dylib 68 82 @if [ ! -d $(DESTLIB) ]; then mkdir -p $(DESTLIB); fi 69 83 rm -f $@ -
trunk/Ohana/Makefile.in
r11954 r12840 46 46 relphot \ 47 47 shell \ 48 tools \ 48 49 tcl \ 49 50 uniphot -
trunk/Ohana/configure
r11968 r12840 39 39 done 40 40 41 echo ./configure.tcsh $args 41 42 ./configure.tcsh $args -
trunk/Ohana/configure.tcsh
r12332 r12840 5 5 6 6 # we need to be able to list the required libraries for a given distribution 7 8 # libX11.a9 # libsocket.a10 # libnsl.a11 # libpng.a12 # libjpeg.a13 # libz.a14 # libreadline.a15 # libtermcap.a16 7 17 8 # evaluate command-line options … … 28 19 set datadir = "" 29 20 set sysconfdir = "" 21 set exec_prefix = "" 30 22 31 23 set root = "" … … 67 59 set prefix = `echo $1 | tr = ' ' | awk '{print $2}'` 68 60 endif 69 set exec_prefix = $prefix 61 breaksw; 62 case --exec-prefix* 63 if ("$1" == "--exec-prefix") then 64 shift 65 set exec_prefix = $1 66 else 67 set exec_prefix = `echo $1 | tr = ' ' | awk '{print $2}'` 68 endif 70 69 breaksw; 71 70 case --bindir* … … 88 87 if ("$1" == "--includedir") then 89 88 shift 90 set inc ludedir = $191 else 92 set inc ludedir = `echo $1 | tr = ' ' | awk '{print $2}'`89 set incdir = $1 90 else 91 set incdir = `echo $1 | tr = ' ' | awk '{print $2}'` 93 92 endif 94 93 breaksw; … … 131 130 if ($#args != 1) goto usage 132 131 132 if ("$exec_prefix" == "") then 133 set exec_prefix = $prefix 134 endif 135 136 # replace $exec_prefix in variables 137 #echo "setting libdir ($libdir)" 138 #set libdir = `echo $libdir | sed 's|\$exec_prefix|$exec_prefix|'` 139 133 140 # set values for CC, CFLAGS, CPPFLAGS, LDFLAGS 134 141 if (! $?CC) then … … 152 159 endif 153 160 154 set syslibpath = "/lib /usr/lib /usr/X11R6/lib /usr/openwin/lib /usr/local/lib" 155 set needlibs = "png z jpeg readline X11 pthread m" 161 set syslibpath = "/lib /usr/lib /usr/X11R6/lib /usr/local/lib" 162 set needlibs = "" 163 set needlibs = "$needlibs png" 164 set needlibs = "$needlibs z" 165 set needlibs = "$needlibs jpeg" 166 set needlibs = "$needlibs readline" 167 set needlibs = "$needlibs X11" 168 set needlibs = "$needlibs pthread" 169 set needlibs = "$needlibs m" 156 170 157 171 # /usr/local/include/libpng is really pretty lame... 158 set sysincpath = "/usr/include /usr/local/include /usr/X11R6/include /usr/openwin/include /usr/local/include/libpng"172 set sysincpath = "/usr/include /usr/local/include /usr/X11R6/include" 159 173 160 174 set needincs = "" … … 210 224 set sys=`uname -s` 211 225 set ranlib = "ranlib" 226 set dlltype = "so" 212 227 switch ($sys) 213 228 case IRIX64: … … 222 237 endif 223 238 # sun (at least) seems to need the socket library (linux does not) 239 set syslibpath = "$syslibpath /usr/openwin/lib" 240 set sysincpath = "$sysincpath /usr/openwin/include" 224 241 set needlibs = "$needlibs libsocket libnsl" 225 242 set ranlib = "touch" … … 234 251 endif 235 252 breaksw; 253 case Darwin: 254 set arch="darwin"; 255 set mach=`uname -m` 256 if ("$mach" == "i386") then 257 set arch="darwin_x86"; 258 endif 259 set syslibpath = "$syslibpath /sw/lib /usr/local/lib/mysql" 260 set sysincpath = "$sysincpath /sw/include /usr/include/sys" 261 set dlltype = dylib 262 breaksw; 236 263 case HP-UX: 237 264 set arch="hpux"; … … 247 274 set root = `pwd` 248 275 if ($prefix == "") set prefix = $root 249 if ($vararch) then 250 set inc = $prefix/include/$arch 251 set lib = $prefix/lib/$arch 252 else 253 set inc = $prefix/include 254 set lib = $prefix/lib 255 endif 276 277 # set the install include directory 278 if ($incdir == "") then 279 if ($vararch) then 280 set incdir = $prefix/include/$arch 281 else 282 set incdir = $prefix/include 283 endif 284 endif 285 286 # set the install lib directory 287 if ($libdir == "") then 288 if ($vararch) then 289 set libdir = $prefix/lib/$arch 290 else 291 set libdir = $prefix/lib 292 endif 293 endif 294 256 295 if ($?LD_LIBRARY_PATH) then 257 296 set libpath = `echo $LD_LIBRARY_PATH | tr ':' ' '` … … 268 307 set nonomatch 269 308 foreach f ( $needlibs ) 270 foreach g ( $syslibpath $lib $libpath ) 271 if (! -e $g) continue 272 set name = $g/lib$f.a 273 if (-e $name[1]) goto got_lib; 274 set name = $g/lib$f.so* 275 if (-e $name[1]) goto got_lib; 276 end 277 echo "missing lib$f" 278 set faillibs = "$faillibs lib$f" 279 continue 309 foreach g ( $syslibpath $libdir $libpath ) 310 set name = $g/lib$f.a 311 if (-e $name[1]) goto got_lib; 312 set name = $g/lib$f.$dlltype 313 if (-e $name[1]) goto got_lib; 314 end 315 echo "missing lib$f" 316 set faillibs = "$faillibs lib$f" 317 continue 280 318 got_lib: 281 echo "found lib$f ($name[$#name])" 282 echo "$libdirs" | grep -- "-L$g " > /dev/null 283 if ($status) then 284 set libdirs = "$libdirs-L$g " 285 endif 286 echo "$libflags" | grep -- "-l$f " > /dev/null 287 if ($status) then 288 set libflags = "$libflags-l$f " 289 endif 319 echo "found lib$f ($name[1])" 320 set gotlibdir = `dirname $name[1]` 321 echo "$libdirs" | grep -- "-L$gotlibdir " > /dev/null 322 if ($status) then 323 set libdirs = "$libdirs-L$gotlibdir " 324 endif 325 echo "$libflags" | grep -- "-l$f " > /dev/null 326 if ($status) then 327 set libflags = "$libflags-l$f " 328 endif 290 329 end 291 330 … … 293 332 # check for termcap, curses, etc 294 333 foreach f ( ncurses curses termcap ) 295 foreach g ( $syslibpath $lib $libpath )296 set name = $g/lib$f.a297 if (-e $name[1]) goto got_curses;298 set name = $g/lib$f.so* 299 if (-e $name[1]) goto got_curses;334 foreach g ( $syslibpath $libdir $libpath ) 335 set name = $g/lib$f.a 336 if (-e $name[1]) goto got_curses; 337 set name = $g/lib$f.$dlltype 338 if (-e $name[1]) goto got_curses; 300 339 end 301 340 end … … 324 363 endif 325 364 326 # check for headers 365 # add the CPATH 366 if ($?CPATH) then 367 set incpath = `echo $CPATH | tr ':' ' '` 368 else 369 set incpath = "" 370 endif 371 372 # check for headers (including in subdirectories) 327 373 echo "" 328 374 echo "searching for needed external header files..." … … 330 376 set incdirs = "" 331 377 foreach f ( $needincs ) 332 foreach g ( $ sysincpath $inc)378 foreach g ( $incdir $incpath $sysincpath ) 333 379 set name = "$g/$f" 334 380 if (-e $name) goto got_inc; … … 338 384 continue 339 385 got_inc: 340 echo "found $f ($name )"386 echo "found $f ($name[1])" 341 387 echo "$incdirs" | grep -- "-I$g " > /dev/null 342 388 if ($status) then … … 453 499 ./config.tools fixconf @CPPFLAGS@ "$CPPFLAGS" 454 500 ./config.tools fixconf @LDFLAGS@ "$LDFLAGS" 501 ./config.tools fixconf @DLLTYPE@ "$dlltype" 455 502 456 503 # other architecture dependent options -
trunk/Ohana/src/addstar/include/addstar.h
r12749 r12840 82 82 int ACCEPT_ASTROM; // accept even bad astrometry solutions (NASTRO == 0) 83 83 int ACCEPT_MOTION; // accept reference proper motion measurements 84 int ACCEPT_TIME; // accept time stamp (or 0) 85 int NO_STARS; // ignore the stars 84 86 int TEXTMODE; // force input file to be loaded as RAW 85 87 int SUBPIX; // apply a subpix correction -
trunk/Ohana/src/addstar/src/ReadImageHeader.c
r12732 r12840 24 24 image[0].NY = Ny; 25 25 26 if (!gfits_scan (header, "TZERO", "%d", 1, &image[0].tzero) ) {26 if (!gfits_scan (header, "TZERO", "%d", 1, &image[0].tzero) && !ACCEPT_TIME) { 27 27 image[0].tzero = parse_time (header); 28 28 } … … 155 155 156 156 /* find expected number of stars */ 157 if (!gfits_scan (header, "NSTARS", "%d", 1, &image[0].nstar) ) {157 if (!gfits_scan (header, "NSTARS", "%d", 1, &image[0].nstar) && !NO_STARS) { 158 158 fprintf (stderr, "can't get NSTARS from header\n"); 159 159 return (FALSE); -
trunk/Ohana/src/addstar/src/SetSignals.c
r3376 r12840 30 30 for (i = 0; i < 36; i++) { 31 31 switch (i) { 32 /* can't redirect th issignals */33 case SIGKILL: /* kill -9: cannot be caught or ignored */34 case SIGSTOP: /* SIGSTOP: cannot be caught or ignored */32 /* can't redirect these signals */ 33 case SIGKILL: /* kill -9: cannot be caught or ignored (POSIX.1-1990) */ 34 case SIGSTOP: /* SIGSTOP: cannot be caught or ignored (POSIX.1-1990) */ 35 35 /* ignore these signals */ 36 case SIGCHLD: /* child halted: ignore */ 37 case SIGPWR: /* power failure - why ignore this? */ 38 case SIGWINCH: /* window resized */ 39 case SIGCONT: /* continue - maintain this action */ 40 case SIGTSTP: /* stop signal sent from tty - why ignore? */ 41 case SIGURG: /* socket signal, ignore this */ 36 case SIGCHLD: /* child halted: ignore (POSIX.1-1990) */ 37 case SIGCONT: /* continue - maintain this action (POSIX.1-1990) */ 38 case SIGTSTP: /* stop signal sent from tty - why ignore? (POSIX.1-1990) */ 39 case SIGURG: /* socket signal, ignore this (POSIX.1-2001) */ 40 # ifdef (SIGPWR) 41 case SIGPWR: /* power failure - why ignore this? (Sys V) */ 42 # endif 43 # ifdef (SIGWINCH) 44 case SIGWINCH: /* window resized (4.3BSD) */ 45 # endif 42 46 break; 43 47 -
trunk/Ohana/src/addstar/src/args.c
r10937 r12840 242 242 if ((N = get_argument (argc, argv, "-accept-motion"))) { 243 243 ACCEPT_MOTION = TRUE; 244 remove_argument (N, &argc, argv); 245 } 246 /* accept bad header astrometry */ 247 ACCEPT_TIME = FALSE; 248 if ((N = get_argument (argc, argv, "-accept-time"))) { 249 ACCEPT_TIME = TRUE; 250 remove_argument (N, &argc, argv); 251 } 252 /* skip the stars */ 253 NO_STARS = FALSE; 254 if ((N = get_argument (argc, argv, "-no-stars"))) { 255 NO_STARS = TRUE; 244 256 remove_argument (N, &argc, argv); 245 257 } -
trunk/Ohana/src/delstar/src/SetSignals.c
r4607 r12840 30 30 for (i = 0; i < 36; i++) { 31 31 switch (i) { 32 /* can't redirect th issignals */33 case SIGKILL: /* kill -9: cannot be caught or ignored */34 case SIGSTOP: /* SIGSTOP: cannot be caught or ignored */32 /* can't redirect these signals */ 33 case SIGKILL: /* kill -9: cannot be caught or ignored (POSIX.1-1990) */ 34 case SIGSTOP: /* SIGSTOP: cannot be caught or ignored (POSIX.1-1990) */ 35 35 /* ignore these signals */ 36 case SIGCHLD: /* child halted: ignore */ 37 case SIGPWR: /* power failure - why ignore this? */ 38 case SIGWINCH: /* window resized */ 39 case SIGCONT: /* continue - maintain this action */ 40 case SIGTSTP: /* stop signal sent from tty - why ignore? */ 41 case SIGURG: /* socket signal, ignore this */ 36 case SIGCHLD: /* child halted: ignore (POSIX.1-1990) */ 37 case SIGCONT: /* continue - maintain this action (POSIX.1-1990) */ 38 case SIGTSTP: /* stop signal sent from tty - why ignore? (POSIX.1-1990) */ 39 case SIGURG: /* socket signal, ignore this (POSIX.1-2001) */ 40 # ifdef (SIGPWR) 41 case SIGPWR: /* power failure - why ignore this? (Sys V) */ 42 # endif 43 # ifdef (SIGWINCH) 44 case SIGWINCH: /* window resized (4.3BSD) */ 45 # endif 42 46 break; 43 47 -
trunk/Ohana/src/getstar/Makefile
r12774 r12840 22 22 dvoImageOverlaps: $(BIN)/dvoImageOverlaps.$(ARCH) 23 23 dvoImageOverlaps.install: $(DESTBIN)/dvoImageOverlaps 24 25 dvoImageExtract: $(BIN)/dvoImageExtract.$(ARCH) 26 dvoImageExtract.install: $(DESTBIN)/dvoImageExtract 24 27 25 28 install: getstar.install dvoImageOverlaps.install … … 52 55 $(OVERLAPS): $(INC)/dvoImageOverlaps.h 53 56 $(BIN)/dvoImageOverlaps.$(ARCH): $(OVERLAPS) 57 58 EXTRACT = \ 59 $(SRC)/dvoImageExtract.$(ARCH).o \ 60 $(SRC)/ConfigInit_extract.$(ARCH).o \ 61 $(SRC)/args_extract.$(ARCH).o \ 62 $(SRC)/Shutdown.$(ARCH).o \ 63 $(SRC)/SetSignals.$(ARCH).o \ 64 $(SRC)/WriteImages.$(ARCH).o \ 65 $(SRC)/WriteImageFITS.$(ARCH).o \ 66 $(SRC)/SelectImages.$(ARCH).o 67 68 $(EXTRACT): $(INC)/dvoImageExtract.h 69 $(BIN)/dvoImageExtract.$(ARCH): $(EXTRACT) -
trunk/Ohana/src/getstar/src/SetSignals.c
r6968 r12840 30 30 for (i = 0; i < 36; i++) { 31 31 switch (i) { 32 /* can't redirect th issignals */33 case SIGKILL: /* kill -9: cannot be caught or ignored */34 case SIGSTOP: /* SIGSTOP: cannot be caught or ignored */32 /* can't redirect these signals */ 33 case SIGKILL: /* kill -9: cannot be caught or ignored (POSIX.1-1990) */ 34 case SIGSTOP: /* SIGSTOP: cannot be caught or ignored (POSIX.1-1990) */ 35 35 /* ignore these signals */ 36 case SIGCHLD: /* child halted: ignore */ 37 case SIGPWR: /* power failure - why ignore this? */ 38 case SIGWINCH: /* window resized */ 39 case SIGCONT: /* continue - maintain this action */ 40 case SIGTSTP: /* stop signal sent from tty - why ignore? */ 41 case SIGURG: /* socket signal, ignore this */ 36 case SIGCHLD: /* child halted: ignore (POSIX.1-1990) */ 37 case SIGCONT: /* continue - maintain this action (POSIX.1-1990) */ 38 case SIGTSTP: /* stop signal sent from tty - why ignore? (POSIX.1-1990) */ 39 case SIGURG: /* socket signal, ignore this (POSIX.1-2001) */ 40 # ifdef (SIGPWR) 41 case SIGPWR: /* power failure - why ignore this? (Sys V) */ 42 # endif 43 # ifdef (SIGWINCH) 44 case SIGWINCH: /* window resized (4.3BSD) */ 45 # endif 42 46 break; 43 47 -
trunk/Ohana/src/libdvo/include/dvo.h
r12332 r12840 241 241 char *libdvo_version (); 242 242 243 int GetRegisteredMosaic (); 243 244 int FindMosaicForImage (Image *images, int Nimages, int entry); 244 245 int FindMosaicForImage_TableSearch (Image *images, int Nimages, int entry); -
trunk/Ohana/src/libdvo/src/mosaic_astrom.c
r5241 r12840 3 3 /* chip-match table: j = ChipMatch[i], images[j] is DIS for images[i] WRP */ 4 4 5 static int iDIS = -1; // DIS entry in ChipMatch[] 5 6 static int Ndis = 0; 6 7 static int *DISentry = NULL; 7 8 static e_time *DIStzero = NULL; 8 9 static int *ChipMatch = NULL; 10 11 /* what is the currently registered mosaic image? */ 12 int GetRegisteredMosaic () { 13 return (iDIS); 14 } 9 15 10 16 /* given an image array and a current entry of type WRP, find matching DIS & Register it */ … … 42 48 /* found a valid match */ 43 49 RegisterMosaic (&images[i].coords); 50 iDIS = i; 51 return (TRUE); 44 52 } 45 53 … … 50 58 /* found a valid match */ 51 59 RegisterMosaic (&images[i].coords); 60 iDIS = i; 52 61 return (TRUE); 53 62 } … … 72 81 73 82 RegisterMosaic (&images[N].coords); 83 iDIS = N; 74 84 return (TRUE); 75 85 } -
trunk/Ohana/src/libohana/Makefile
r11880 r12840 19 19 TFLAGS = $(FULL_CFLAGS) $(FULL_LDFLAGS) -ltap_ohana 20 20 21 install: $(DESTLIB)/libohana.a $(DESTLIB)/libohana. so22 libohana: $(LIB)/libohana.$(ARCH).a $(LIB)/libohana.$(ARCH). so21 install: $(DESTLIB)/libohana.a $(DESTLIB)/libohana.$(DLLTYPE) 22 libohana: $(LIB)/libohana.$(ARCH).a $(LIB)/libohana.$(ARCH).$(DLLTYPE) 23 23 testcode: install $(TEST) 24 24 test: … … 50 50 51 51 $(LIB)/libohana.$(ARCH).a: $(OBJS) 52 $(LIB)/libohana.$(ARCH). so: $(OBJS)52 $(LIB)/libohana.$(ARCH).$(DLLTYPE): $(OBJS) 53 53 54 54 $(DESTLIB)/libohana.a: $(LIB)/libohana.$(ARCH).a 55 $(DESTLIB)/libohana. so: $(LIB)/libohana.$(ARCH).so55 $(DESTLIB)/libohana.$(DLLTYPE): $(LIB)/libohana.$(ARCH).$(DLLTYPE) 56 56 57 57 $(TESTDIR)/%.$(ARCH) : $(TESTDIR)/%.c -
trunk/Ohana/src/opihi/cmd.astro/Makefile
r11891 r12840 50 50 $(SRC)/imfit-fgauss.$(ARCH).o \ 51 51 $(SRC)/imfit-pgauss.$(ARCH).o \ 52 $(SRC)/imfit- Pgauss.$(ARCH).o \52 $(SRC)/imfit-pgauss-psf.$(ARCH).o \ 53 53 $(SRC)/imfit-qgauss.$(ARCH).o \ 54 $(SRC)/imfit- Qgauss.$(ARCH).o \54 $(SRC)/imfit-qgauss-psf.$(ARCH).o \ 55 55 $(SRC)/imfit-sgauss.$(ARCH).o \ 56 $(SRC)/imfit- Sgauss.$(ARCH).o \56 $(SRC)/imfit-sgauss-psf.$(ARCH).o \ 57 57 $(SRC)/imfit-qfgauss.$(ARCH).o \ 58 58 $(SRC)/imfit-qrgauss.$(ARCH).o -
trunk/Ohana/src/opihi/cmd.astro/imfit-test.c
r3144 r12840 31 31 par[3] = tp1; 32 32 } 33 if (fitfunc == SgaussTD) {33 if (fitfunc == sgauss_psfTD) { 34 34 tp1 = par[0]; 35 35 tp2 = par[3]; … … 48 48 par[4] = tp2; 49 49 } 50 if (fitfunc == PgaussTD) {50 if (fitfunc == pgauss_psfTD) { 51 51 tp1 = par[0]; 52 52 par[0] = par[0]*1.05; -
trunk/Ohana/src/opihi/cmd.astro/imfit.c
r9275 r12840 57 57 fgauss_setup (argv[N]); 58 58 pgauss_setup (argv[N]); 59 Pgauss_setup (argv[N]);59 pgauss_psf_setup (argv[N]); 60 60 sgauss_setup (argv[N]); 61 Sgauss_setup (argv[N]);61 sgauss_psf_setup (argv[N]); 62 62 qgauss_setup (argv[N]); 63 Qgauss_setup (argv[N]);63 qgauss_psf_setup (argv[N]); 64 64 qfgauss_setup (argv[N]); 65 65 qrgauss_setup (argv[N]); -
trunk/Ohana/src/opihi/cmd.astro/imsub.c
r7917 r12840 22 22 fgauss_setup (argv[N]); 23 23 pgauss_setup (argv[N]); 24 Pgauss_setup (argv[N]);24 pgauss_psf_setup (argv[N]); 25 25 sgauss_setup (argv[N]); 26 Sgauss_setup (argv[N]);26 sgauss_psf_setup (argv[N]); 27 27 qgauss_setup (argv[N]); 28 Qgauss_setup (argv[N]);28 qgauss_psf_setup (argv[N]); 29 29 qfgauss_setup (argv[N]); 30 30 qrgauss_setup (argv[N]); -
trunk/Ohana/src/opihi/dvo/Makefile
r11891 r12840 23 23 $(SRC)/ImageSelection.$(ARCH).o \ 24 24 $(SRC)/LoadImages.$(ARCH).o \ 25 $(SRC)/cmpRead .$(ARCH).o \25 $(SRC)/cmpReadFile.$(ARCH).o \ 26 26 $(SRC)/compare.$(ARCH).o \ 27 27 $(SRC)/match_image.$(ARCH).o \ -
trunk/Ohana/src/opihi/include/pantasks.h
r12404 r12840 138 138 Task *task; 139 139 140 IOBuffer stdout; /* stdout storage buffer */ 141 IOBuffer stderr; /* stderr storage buffer */ 140 /* this cries out for another structure... */ 141 IOBuffer stdout_buff; /* stdout storage buffer */ 142 char *stdout_dump; // output target file for stdout 143 int stdout_size; /* size of pending stdout buffer (controller) */ 144 int stdout_fd; /* stdout pipe (local only) */ 145 146 IOBuffer stderr_buff; /* stderr storage buffer */ 147 char *stderr_dump; // output target file for stderr 148 int stderr_size; /* size of pending stderr buffer (controller) */ 149 int stderr_fd; /* stderr pipe (local only) */ 150 142 151 JobMode mode; /* local or controller? */ 143 144 char *stdout_dump;145 char *stderr_dump;146 152 char *realhost; 147 148 int stdout_size; /* size of pending stdout buffer (controller) */149 int stderr_size; /* size of pending stderr buffer (controller) */150 int stdout_fd; /* stdout pipe (local only) */151 int stderr_fd; /* stderr pipe (local only) */152 153 153 154 double dtime; -
trunk/Ohana/src/opihi/include/pcontrol.h
r12332 r12840 75 75 JobStat state; 76 76 JobStat stack; 77 IOBuffer stdout ;78 IOBuffer stderr ;77 IOBuffer stdout_buff; 78 IOBuffer stderr_buff; 79 79 Ptime start; 80 80 Ptime stop; … … 88 88 typedef struct { 89 89 char *hostname; 90 int stdin ;91 int stdout ;92 int stderr ;90 int stdin_fd; 91 int stdout_fd; 92 int stderr_fd; 93 93 int markoff; 94 94 int pid; -
trunk/Ohana/src/opihi/pantasks/CheckJobs.c
r12404 r12840 48 48 /* push output buffer data to the stdout and stderr queues */ 49 49 /* XXX this will break on 0 values in output streams */ 50 PushNamedQueue ("stdout", job[0].stdout .buffer);51 PushNamedQueue ("stderr", job[0].stderr .buffer);50 PushNamedQueue ("stdout", job[0].stdout_buff.buffer); 51 PushNamedQueue ("stderr", job[0].stderr_buff.buffer); 52 52 53 53 /* save the stdout and stderr if desired */ … … 57 57 gprint (GP_ERR, "unable to open stdout dump file %s\n", job[0].stdout_dump); 58 58 } else { 59 fwrite (job[0].stdout .buffer, 1, job[0].stdout.Nbuffer, f);59 fwrite (job[0].stdout_buff.buffer, 1, job[0].stdout_buff.Nbuffer, f); 60 60 fclose (f); 61 61 } … … 66 66 gprint (GP_ERR, "unable to open stderr dump file %s\n", job[0].stderr_dump); 67 67 } else { 68 fwrite (job[0].stderr .buffer, 1, job[0].stderr.Nbuffer, f);68 fwrite (job[0].stderr_buff.buffer, 1, job[0].stderr_buff.Nbuffer, f); 69 69 fclose (f); 70 70 } -
trunk/Ohana/src/opihi/pantasks/ControllerOps.c
r11898 r12840 29 29 if ((job[0].state == JOB_EXIT) || (job[0].state == JOB_CRASH)) { 30 30 gettimeofday (&start, (void *) NULL); 31 GetJobOutput ("stdout", job[0].pid, &job[0].stdout , job[0].stdout_size);31 GetJobOutput ("stdout", job[0].pid, &job[0].stdout_buff, job[0].stdout_size); 32 32 gettimeofday (&stop, (void *) NULL); 33 33 dtime = DTIME (stop, start); … … 35 35 36 36 gettimeofday (&start, (void *) NULL); 37 GetJobOutput ("stderr", job[0].pid, &job[0].stderr , job[0].stderr_size);37 GetJobOutput ("stderr", job[0].pid, &job[0].stderr_buff, job[0].stderr_size); 38 38 gettimeofday (&stop, (void *) NULL); 39 39 dtime = DTIME (stop, start); -
trunk/Ohana/src/opihi/pantasks/JobOps.c
r12466 r12840 143 143 need to have matched entries to these quantites in the job structure */ 144 144 145 InitIOBuffer (&job[0].stdout , 0x100);146 InitIOBuffer (&job[0].stderr , 0x100);145 InitIOBuffer (&job[0].stdout_buff, 0x100); 146 InitIOBuffer (&job[0].stderr_buff, 0x100); 147 147 148 148 job[0].stdout_dump = NULL; … … 181 181 if (job[0].stderr_dump != NULL) free (job[0].stderr_dump); 182 182 183 FreeIOBuffer (&job[0].stdout );184 FreeIOBuffer (&job[0].stderr );183 FreeIOBuffer (&job[0].stdout_buff); 184 FreeIOBuffer (&job[0].stderr_buff); 185 185 free (job); 186 186 return; -
trunk/Ohana/src/opihi/pantasks/LocalJob.c
r11898 r12840 15 15 16 16 if ((job[0].state == JOB_EXIT) || (job[0].state == JOB_CRASH)) { 17 EmptyIOBuffer (&job[0].stdout , 10, job[0].stdout_fd);18 EmptyIOBuffer (&job[0].stderr , 10, job[0].stderr_fd);17 EmptyIOBuffer (&job[0].stdout_buff, 10, job[0].stdout_fd); 18 EmptyIOBuffer (&job[0].stderr_buff, 10, job[0].stderr_fd); 19 19 close (job[0].stdout_fd); 20 20 close (job[0].stderr_fd); 21 21 } else { 22 22 /* read stdout buffer */ 23 Nread = ReadtoIOBuffer (&job[0].stdout , job[0].stdout_fd);23 Nread = ReadtoIOBuffer (&job[0].stdout_buff, job[0].stdout_fd); 24 24 switch (Nread) { 25 25 case -2: /* error in read (programming error? system level error?) */ … … 34 34 35 35 /* read stderr buffer */ 36 Nread = ReadtoIOBuffer (&job[0].stderr , job[0].stderr_fd);36 Nread = ReadtoIOBuffer (&job[0].stderr_buff, job[0].stderr_fd); 37 37 switch (Nread) { 38 38 case -2: /* error in read (programming error? system level error?) */ -
trunk/Ohana/src/opihi/pclient/ChildOps.c
r10639 r12840 3 3 #include <sys/types.h> 4 4 #include <unistd.h> 5 #include <stropts.h>5 // #include <stropts.h> 6 6 7 7 static int Nbad = 0; -
trunk/Ohana/src/opihi/pcontrol/CheckDoneJob.c
r10652 r12840 12 12 13 13 success = TRUE; 14 success &= GetJobOutput ("stdout", host, &job[0].stdout , job[0].stdout_size);15 success &= GetJobOutput ("stderr", host, &job[0].stderr , job[0].stderr_size);14 success &= GetJobOutput ("stdout", host, &job[0].stdout_buff, job[0].stdout_size); 15 success &= GetJobOutput ("stderr", host, &job[0].stderr_buff, job[0].stderr_size); 16 16 17 17 if (!success) { -
trunk/Ohana/src/opihi/pcontrol/GetJobOutput.c
r10652 r12840 14 14 15 15 /* flush any earlier messages */ 16 ReadtoIOBuffer (buffer, host[0].stdout );16 ReadtoIOBuffer (buffer, host[0].stdout_fd); 17 17 FlushIOBuffer (buffer); 18 18 Nstart = buffer[0].Nbuffer; … … 23 23 24 24 /* send cmd (stdout / stderr) */ 25 status = write_fmt (host[0].stdin , "%s\n", cmd);25 status = write_fmt (host[0].stdin_fd, "%s\n", cmd); 26 26 27 27 /* is pipe still open? */ … … 32 32 status = -1; 33 33 for (i = 0; (i < PCLIENT_TIMEOUT) && (status != 0) && (line == NULL); i++) { 34 status = ReadtoIOBuffer (buffer, host[0].stdout );34 status = ReadtoIOBuffer (buffer, host[0].stdout_fd); 35 35 if ((buffer[0].Nbuffer - Nstart) >= Nbytes) { 36 36 line = memstr (buffer[0].buffer, PCLIENT_PROMPT, buffer[0].Nbuffer); -
trunk/Ohana/src/opihi/pcontrol/HostOps.c
r10652 r12840 151 151 ALLOCATE (host, Host, 1); 152 152 153 host[0].hostname = strcreate (hostname);154 host[0].stdin = 0;155 host[0].stdout = 0;156 host[0].stderr = 0;157 host[0].HostID = NextHostID();153 host[0].hostname = strcreate (hostname); 154 host[0].stdin_fd = 0; 155 host[0].stdout_fd = 0; 156 host[0].stderr_fd = 0; 157 host[0].HostID = NextHostID(); 158 158 159 159 host[0].lasttry.tv_sec = 0; -
trunk/Ohana/src/opihi/pcontrol/JobOps.c
r11388 r12840 148 148 149 149 /* do this step on start? */ 150 InitIOBuffer (&job[0].stdout , 0x1000);151 InitIOBuffer (&job[0].stderr , 0x1000);150 InitIOBuffer (&job[0].stdout_buff, 0x1000); 151 InitIOBuffer (&job[0].stderr_buff, 0x1000); 152 152 153 153 JobID = job[0].JobID; … … 167 167 FREE (job[0].argv); 168 168 169 FreeIOBuffer (&job[0].stdout );170 FreeIOBuffer (&job[0].stderr );169 FreeIOBuffer (&job[0].stdout_buff); 170 FreeIOBuffer (&job[0].stderr_buff); 171 171 172 172 FREE (job); -
trunk/Ohana/src/opihi/pcontrol/PclientCommand.c
r10668 r12840 19 19 20 20 // flush the stdout and stderr buffers here 21 ReadtoIOBuffer (buffer, host[0].stdout );21 ReadtoIOBuffer (buffer, host[0].stdout_fd); 22 22 FlushIOBuffer (buffer); 23 ReadtoIOBuffer (buffer, host[0].stderr );23 ReadtoIOBuffer (buffer, host[0].stderr_fd); 24 24 FlushIOBuffer (buffer); 25 25 26 26 /* send command to client (adding on \n) */ 27 status = write_fmt (host[0].stdin , "%s\n", command);27 status = write_fmt (host[0].stdin_fd, "%s\n", command); 28 28 29 29 /* is pipe still open? */ … … 37 37 status = -1; 38 38 for (i = 0; (i < PCLIENT_TIMEOUT) && (status != 0) && (line == NULL); i++) { 39 status = ReadtoIOBuffer (buffer, host[0].stdout );39 status = ReadtoIOBuffer (buffer, host[0].stdout_fd); 40 40 line = memstr (buffer[0].buffer, response, buffer[0].Nbuffer); 41 41 if (status == -1) nanosleep (&request, &remain); -
trunk/Ohana/src/opihi/pcontrol/StartHost.c
r8546 r12840 39 39 host[0].lasttry.tv_usec = 0; 40 40 41 host[0].stdin = stdio[0];42 host[0].stdout = stdio[1];43 host[0].stderr = stdio[2];44 host[0].pid = pid;41 host[0].stdin_fd = stdio[0]; 42 host[0].stdout_fd = stdio[1]; 43 host[0].stderr_fd = stdio[2]; 44 host[0].pid = pid; 45 45 PutHost (host, PCONTROL_HOST_IDLE, STACK_BOTTOM); 46 46 return (TRUE); -
trunk/Ohana/src/opihi/pcontrol/StopHosts.c
r10666 r12840 2 2 3 3 void DownHost (Host *host) { 4 CLOSE (host[0].stdin );5 CLOSE (host[0].stdout );6 CLOSE (host[0].stderr );4 CLOSE (host[0].stdin_fd); 5 CLOSE (host[0].stdout_fd); 6 CLOSE (host[0].stderr_fd); 7 7 host[0].job = NULL; 8 8 PutHost (host, PCONTROL_HOST_DOWN, STACK_BOTTOM); … … 10 10 11 11 void OffHost (Host *host) { 12 CLOSE (host[0].stdin );13 CLOSE (host[0].stdout );14 CLOSE (host[0].stderr );12 CLOSE (host[0].stdin_fd); 13 CLOSE (host[0].stdout_fd); 14 CLOSE (host[0].stderr_fd); 15 15 host[0].job = NULL; 16 16 PutHost (host, PCONTROL_HOST_OFF, STACK_BOTTOM); -
trunk/Ohana/src/opihi/pcontrol/stdout.c
r8296 r12840 29 29 30 30 found_stdout: 31 buffer = &job[0].stdout ;31 buffer = &job[0].stdout_buff; 32 32 fwrite (buffer[0].buffer, 1, buffer[0].Nbuffer, stdout); 33 33 gprint (GP_LOG, "STATUS %d\n", 0); … … 64 64 65 65 found_stderr: 66 buffer = &job[0].stderr ;66 buffer = &job[0].stderr_buff; 67 67 fwrite (buffer[0].buffer, 1, buffer[0].Nbuffer, stdout); 68 68 gprint (GP_LOG, "STATUS %d\n", 0);
Note:
See TracChangeset
for help on using the changeset viewer.
