From c149735f56364c224ec6847d0f32ba06af86dc5b Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sat, 2 Sep 2000 16:40:36 +0000 Subject: [PATCH] r188: *** empty log message *** --- ChangeLog | 5 ++ config.h.in | 5 ++ configure | 189 ++++++++++++++++++++++++++--------------- configure.in | 6 +- src/ctsim.cpp | 16 +++- src/dlgprojections.cpp | 36 ++++---- src/dlgprojections.h | 6 +- src/dlgreconstruct.cpp | 21 ++--- src/views.cpp | 4 +- 9 files changed, 182 insertions(+), 106 deletions(-) diff --git a/ChangeLog b/ChangeLog index a14122f..d584f20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2.0.0-b12 - 9/7/00 + ctsim: used setpriority to set lower priority + ctsim: fixed pReconstruct not being deleted causing scaling problem + ctsim: fixed projection animation dialog buttons + 2.0.0-b11 - 9/1/00 ctsim: Added projection graph to animation of projection collection ctsim: Added single stepping to projection collection animation diff --git a/config.h.in b/config.h.in index 97f445e..188ee6d 100644 --- a/config.h.in +++ b/config.h.in @@ -159,6 +159,10 @@ /* Define if you have the header file. */ #undef HAVE_UNISTD_H +#undef HAVE_SYS_TIME_H + +#undef HAVE_SYS_RESOURCE_H + /* Define if you have the m library (-lm). */ #undef HAVE_LIBM @@ -168,3 +172,4 @@ /* Version number of package */ #undef VERSION +#undef HAVE_SETPRIORITY diff --git a/configure b/configure index 056984c..7ff20cb 100755 --- a/configure +++ b/configure @@ -715,7 +715,7 @@ fi PACKAGE=ctsim -VERSION=2.0.0b11 +VERSION=2.0.0b12 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -2295,7 +2295,7 @@ EOF fi -for ac_hdr in fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h sys/types.h sys/stat.h string.h ctype.h math.h stdio.h netinet/in.h inttypes.h sys/param.h stdint.h stdlib.h g2.h assert.h +for ac_hdr in fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h sys/types.h sys/stat.h string.h ctype.h math.h stdio.h netinet/in.h inttypes.h sys/param.h stdint.h stdlib.h g2.h assert.h sys/time.h sys/resource.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -2768,16 +2768,65 @@ else echo "$ac_t""no" 1>&6 fi +echo $ac_n "checking for setpriority""... $ac_c" 1>&6 +echo "configure:2773: checking for setpriority" >&5 +if eval "test \"`echo '$''{'ac_cv_func_setpriority'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char setpriority(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_setpriority) || defined (__stub___setpriority) +choke me +#else +setpriority(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_setpriority=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_setpriority=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'setpriority`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test "${OSTYPE}" = "cygwin" ; then getopt_long=false else echo $ac_n "checking for getopt_long""... $ac_c" 1>&6 -echo "configure:2776: checking for getopt_long" >&5 +echo "configure:2825: checking for getopt_long" >&5 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getopt_long=yes" else @@ -2841,7 +2890,7 @@ fi fi echo $ac_n "checking debug""... $ac_c" 1>&6 -echo "configure:2845: checking debug" >&5 +echo "configure:2894: checking debug" >&5 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" @@ -2890,7 +2939,7 @@ fi fi echo $ac_n "checking whether to enable verbose warnings""... $ac_c" 1>&6 -echo "configure:2894: checking whether to enable verbose warnings" >&5 +echo "configure:2943: checking whether to enable verbose warnings" >&5 # Check whether --enable-verbose-warnings or --disable-verbose-warnings was given. if test "${enable_verbose_warnings+set}" = set; then enableval="$enable_verbose_warnings" @@ -2940,7 +2989,7 @@ fi echo $ac_n "checking static executables""... $ac_c" 1>&6 -echo "configure:2944: checking static executables" >&5 +echo "configure:2993: checking static executables" >&5 # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" @@ -2979,7 +3028,7 @@ if test "$withval" != "no" ; then fi echo $ac_n "checking for LAM MPI installation""... $ac_c" 1>&6 -echo "configure:2983: checking for LAM MPI installation" >&5 +echo "configure:3032: checking for LAM MPI installation" >&5 for testlamdir in "." $trylamdir /usr/local /usr/local/lam /usr /usr/lam /opt /opt/lam ; do if test -x "$testlamdir/bin/hcc" ; then LDFLAGS="$LDFLAGS -L$testlamdir/lib" @@ -2997,7 +3046,7 @@ else fi echo $ac_n "checking for web access""... $ac_c" 1>&6 -echo "configure:3001: checking for web access" >&5 +echo "configure:3050: checking for web access" >&5 # Check whether --with-cgibin-dir or --without-cgibin-dir was given. if test "${with_cgibin_dir+set}" = set; then withval="$with_cgibin_dir" @@ -3087,7 +3136,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:3091: checking for X" >&5 +echo "configure:3140: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -3149,12 +3198,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3223,14 +3272,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -3336,17 +3385,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:3340: checking whether -R must be followed by a space" >&5 +echo "configure:3389: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -3362,14 +3411,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -3401,7 +3450,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:3405: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:3454: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3409,7 +3458,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3442,7 +3491,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:3446: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:3495: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3450,7 +3499,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3490,12 +3539,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:3494: checking for gethostbyname" >&5 +echo "configure:3543: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -3539,7 +3588,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3543: checking for gethostbyname in -lnsl" >&5 +echo "configure:3592: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3547,7 +3596,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3588,12 +3637,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:3592: checking for connect" >&5 +echo "configure:3641: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -3637,7 +3686,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:3641: checking for connect in -lsocket" >&5 +echo "configure:3690: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3645,7 +3694,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3680,12 +3729,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:3684: checking for remove" >&5 +echo "configure:3733: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -3729,7 +3778,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:3733: checking for remove in -lposix" >&5 +echo "configure:3782: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3737,7 +3786,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3772,12 +3821,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:3776: checking for shmat" >&5 +echo "configure:3825: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -3821,7 +3870,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:3825: checking for shmat in -lipc" >&5 +echo "configure:3874: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3829,7 +3878,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3873,7 +3922,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:3877: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:3926: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3881,7 +3930,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3929,7 +3978,7 @@ X_BASIC_LIBS="-lXext -lX11" our_saved_LDFLAGS="$LDFLAGS" LDFLAGS="$X_LIBS $LDFLAGS" echo $ac_n "checking for XtToolkitThreadInitialize in -lXt""... $ac_c" 1>&6 -echo "configure:3933: checking for XtToolkitThreadInitialize in -lXt" >&5 +echo "configure:3982: checking for XtToolkitThreadInitialize in -lXt" >&5 ac_lib_var=`echo Xt'_'XtToolkitThreadInitialize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3937,7 +3986,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXt $X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3976,7 +4025,7 @@ LDFLAGS="$our_saved_LDFLAGS" our_saved_LDFLAGS="$LDFLAGS" LDFLAGS="$X_LIBS $LDFLAGS" echo $ac_n "checking for XdbeQueryExtension in -lXext""... $ac_c" 1>&6 -echo "configure:3980: checking for XdbeQueryExtension in -lXext" >&5 +echo "configure:4029: checking for XdbeQueryExtension in -lXext" >&5 ac_lib_var=`echo Xext'_'XdbeQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3984,7 +4033,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4019,7 +4068,7 @@ else fi echo $ac_n "checking for XmbufQueryExtension in -lXext""... $ac_c" 1>&6 -echo "configure:4023: checking for XmbufQueryExtension in -lXext" >&5 +echo "configure:4072: checking for XmbufQueryExtension in -lXext" >&5 ac_lib_var=`echo Xext'_'XmbufQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4027,7 +4076,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext -lX11 "$X_EXTRA_LIBS" $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4068,17 +4117,17 @@ for ac_hdr in X11/extensions/Xdbe.h X11/extensions/multibuf.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4072: checking for $ac_hdr" >&5 +echo "configure:4121: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4120,7 +4169,7 @@ my_includes="$my_includes -I../include -I.." echo $ac_n "checking interactive graphics""... $ac_c" 1>&6 -echo "configure:4124: checking interactive graphics" >&5 +echo "configure:4173: checking interactive graphics" >&5 if test "$no_x" != "yes" ; then cat >> confdefs.h <<\EOF #define HAVE_X11 1 @@ -4161,7 +4210,7 @@ if test "$fftw" = "true" ; then fi echo $ac_n "checking for main in -ldmallocxx""... $ac_c" 1>&6 -echo "configure:4165: checking for main in -ldmallocxx" >&5 +echo "configure:4214: checking for main in -ldmallocxx" >&5 ac_lib_var=`echo dmallocxx'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4169,14 +4218,14 @@ else ac_save_LIBS="$LIBS" LIBS="-ldmallocxx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4198,7 +4247,7 @@ dmallocxx=false fi echo $ac_n "checking for enable-dmalloc""... $ac_c" 1>&6 -echo "configure:4202: checking for enable-dmalloc" >&5 +echo "configure:4251: checking for enable-dmalloc" >&5 # Check whether --enable-dmalloc or --disable-dmalloc was given. if test "${enable_dmalloc+set}" = set; then enableval="$enable_dmalloc" diff --git a/configure.in b/configure.in index 262f928..f010b6f 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Must reset CDPATH so that bash's cd does not print to stdout dnl CDPATH= AC_INIT(src/ctsim.cpp) -AM_INIT_AUTOMAKE(ctsim,2.0.0b11) +AM_INIT_AUTOMAKE(ctsim,2.0.0b12) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -89,7 +89,7 @@ fi dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h sys/types.h sys/stat.h string.h ctype.h math.h stdio.h netinet/in.h inttypes.h sys/param.h stdint.h stdlib.h g2.h assert.h) +AC_CHECK_HEADERS(fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h sys/types.h sys/stat.h string.h ctype.h math.h stdio.h netinet/in.h inttypes.h sys/param.h stdint.h stdlib.h g2.h assert.h sys/time.h sys/resource.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -102,6 +102,8 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS(strtod strtol snprintf htonl usleep) AC_CHECK_FUNC(basename) AC_CHECK_FUNC(setjmp) +AC_CHECK_FUNC(setpriority) + if test "${OSTYPE}" = "cygwin" ; then getopt_long=false else diff --git a/src/ctsim.cpp b/src/ctsim.cpp index 385fbee..a3aefb5 100644 --- a/src/ctsim.cpp +++ b/src/ctsim.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ctsim.cpp,v 1.10 2000/08/31 08:38:58 kevin Exp $ +** $Id: ctsim.cpp,v 1.11 2000/09/02 16:40:36 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -53,7 +53,7 @@ #include #endif -static const char* rcsindent = "$Id: ctsim.cpp,v 1.10 2000/08/31 08:38:58 kevin Exp $"; +static const char* rcsindent = "$Id: ctsim.cpp,v 1.11 2000/09/02 16:40:36 kevin Exp $"; class CTSimApp* theApp = NULL; @@ -72,9 +72,21 @@ CTSimApp::CTSimApp(void) theApp = this; } +#ifdef HAVE_SYS_TIME_H +#include +#endif + +#ifdef HAVE_SYS_RESOURCE_H +#include +#endif + bool CTSimApp::OnInit(void) { +#ifdef HAVE_SETPRIORITY + setpriority (PRIO_PROCESS, 0, 15); // set to low scheduling priority +#endif + // process options while (1) { int c = getopt_long (argc, argv, "", ctsimOptions, NULL); diff --git a/src/dlgprojections.cpp b/src/dlgprojections.cpp index 53b15cf..690d003 100644 --- a/src/dlgprojections.cpp +++ b/src/dlgprojections.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: dlgprojections.cpp,v 1.3 2000/09/02 05:10:39 kevin Exp $ +** $Id: dlgprojections.cpp,v 1.4 2000/09/02 16:40:36 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -58,8 +58,8 @@ static const int LAYOUT_Y_MARGIN = 4; BEGIN_EVENT_TABLE(ProjectionsDialog, wxDialog) EVT_BUTTON(wxID_CANCEL, ProjectionsDialog::OnCancel) - EVT_BUTTON(ID_BTN_PAUSE, ProjectionsDialog::OnPause) - EVT_BUTTON(ID_BTN_STEP, ProjectionsDialog::OnStep) + EVT_BUTTON(ProjectionsDialog::ID_BTN_PAUSE, ProjectionsDialog::OnPause) + EVT_BUTTON(ProjectionsDialog::ID_BTN_STEP, ProjectionsDialog::OnStep) EVT_CLOSE(ProjectionsDialog::OnClose) EVT_PAINT(ProjectionsDialog::OnPaint) END_EVENT_TABLE() @@ -145,11 +145,13 @@ void ProjectionsDialog::showView (int iViewNumber) { if ( iViewNumber < m_rProjections.nView() ) { - wxYield(); // update the display + ::wxYield(); // update the display m_iLastView = iViewNumber; if (m_iTrace >= Trace::TRACE_PLOT) m_pSGP->setViewport (0, 0, 0.66, 1); + ::wxYield(); // update the display m_rScanner.collectProjections (m_rProjections, m_rPhantom, iViewNumber, 1, true, m_iTrace, m_pSGP); + ::wxYield(); // update the display if (m_iTrace >= Trace::TRACE_PLOT) { const DetectorArray& detArray = m_rProjections.getDetectorArray (iViewNumber); const DetectorValue* detValues = detArray.detValues(); @@ -172,26 +174,28 @@ ProjectionsDialog::showView (int iViewNumber) bool ProjectionsDialog::projectView (int iViewNumber) { - showView (iViewNumber); - wxYield(); // update the display - if (m_iTrace >= Trace::TRACE_PLOT) + if (iViewNumber < m_rProjections.nView()) { + showView (iViewNumber); + wxYield(); // update the display + if (m_iTrace >= Trace::TRACE_PLOT) { sleep(1); - else { - m_state = Finished; // so that we return TRUE below and - // that [Cancel] handler knew what to do + } + } else { + m_state = Finished; // so that we return TRUE below and + // that [Cancel] handler knew what to do #if 0 - if ( m_btnAbort ) - m_btnAbort->SetLabel(_("Close")); // tell the user what he should do... - wxYield(); - - (void)ShowModal(); + if ( m_btnAbort ) + m_btnAbort->SetLabel(_("Close")); // tell the user what he should do... + wxYield(); + + (void)ShowModal(); #endif } #ifdef __WXMAC__ MacUpdateImmediately(); #endif - + return m_state != Cancelled; } diff --git a/src/dlgprojections.h b/src/dlgprojections.h index b8798bb..d39260a 100644 --- a/src/dlgprojections.h +++ b/src/dlgprojections.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: dlgprojections.h,v 1.2 2000/08/31 08:38:58 kevin Exp $ +** $Id: dlgprojections.h,v 1.3 2000/09/02 16:40:36 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -111,8 +111,8 @@ private: Finished // finished, waiting to be removed from screen } m_state; - const static int ID_BTN_PAUSE = 19998; - const static int ID_BTN_STEP = 19999; + const static int ID_BTN_PAUSE = 19996; + const static int ID_BTN_STEP = 19997; void showView (int iViewNumber); diff --git a/src/dlgreconstruct.cpp b/src/dlgreconstruct.cpp index e8e01e2..277b6ea 100644 --- a/src/dlgreconstruct.cpp +++ b/src/dlgreconstruct.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: dlgreconstruct.cpp,v 1.1 2000/09/02 05:13:57 kevin Exp $ +** $Id: dlgreconstruct.cpp,v 1.2 2000/09/02 16:40:36 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -145,7 +145,6 @@ void ReconstructDialog::showView (int iViewNumber) { if ( iViewNumber < m_rProjections.nView() ) { - wxYield(); // update the display m_iLastView = iViewNumber; m_pSGP->eraseWindow(); if (m_iTrace >= Trace::TRACE_PLOT) @@ -162,23 +161,20 @@ ReconstructDialog::showView (int iViewNumber) if (m_iTrace >= Trace::TRACE_PLOT) m_pSGP->setViewport (0, .1, 0.66, 1); m_rReconstructor.reconstructView (iViewNumber, 1, m_pSGP); - - ::wxYield(); - m_pDC->SelectObject (wxNullBitmap); - Refresh(); - m_pDC->SelectObject (m_bitmap); - ::wxYield(); } } bool ReconstructDialog::reconstructView (int iViewNumber) { + ::wxYield(); // update the display showView (iViewNumber); - wxYield(); // update the display - if (m_iTrace >= Trace::TRACE_PLOT) - sleep(1); - else { + ::wxYield(); // update the display + if (iViewNumber < m_rProjections.nView()) { + if (m_iTrace >= Trace::TRACE_PLOT) { + sleep(1); + } + } else { m_state = Finished; // so that we return TRUE below and } // that [Cancel] handler knew what to do @@ -186,6 +182,7 @@ ReconstructDialog::reconstructView (int iViewNumber) MacUpdateImmediately(); #endif + ::wxYield(); // update the display return m_state != Cancelled; } diff --git a/src/views.cpp b/src/views.cpp index d60515b..8a1face 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: views.cpp,v 1.19 2000/09/02 05:10:39 kevin Exp $ +** $Id: views.cpp,v 1.20 2000/09/02 16:40:36 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -725,6 +725,7 @@ ProjectionFileView::OnReconstruct (wxCommandEvent& event) ::wxUsleep(50); } } + delete pDlgReconstruct; } else { wxProgressDialog dlgProgress (wxString("Reconstruction"), wxString("Reconstruction Progress"), rProj.nView() + 1, m_frame, wxPD_CAN_ABORT); for (int i = 0; i < rProj.nView(); i++) { @@ -736,6 +737,7 @@ ProjectionFileView::OnReconstruct (wxCommandEvent& event) } } } + delete pReconstruct; pReconDoc->Modify(true); pReconDoc->UpdateAllViews(this); ostringstream os; -- 2.34.1