From: Kevin M. Rosenberg Date: Thu, 13 Jul 2000 07:03:21 +0000 (+0000) Subject: r145: *** empty log message *** X-Git-Tag: debian-4.5.3-3~872 X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=commitdiff_plain;h=3fba6928127cd65870bdcd96c8114ad5894247ae r145: *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 66a5fff..3ca8243 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2.0.0-b4 - 7/11/00 + Fixed compiler warnings at -Wall level + Began work on CTSim program to be graphical front-end of all functions + Moved current src/*.cpp to tools/*.cpp + Made CTSim graphical front-end's home to be src/ + 2.0.0-b3 - 7/10/00 Added highly optimized backprojection method idiff3 Moved comparative stats to if-2 program from ifinfo diff --git a/Makefile.am b/Makefile.am index e68341e..3d1fd90 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,13 @@ else EXTRA_DIRS2= endif -SUBDIRS=$(EXTRA_DIRS1) $(EXTRA_DIRS2) libctsupport libctsim src man html cgi-bin include +if HAVE_WXWINDOWS +EXTRA_DIRS3=src +else +EXTRA_DIRS3= +endif + +SUBDIRS=$(EXTRA_DIRS1) $(EXTRA_DIRS2) $(EXTRA_DIRS3) libctsupport libctsim man html cgi-bin include tools EXTRA_DIST=acsite.m4 make.bat diff --git a/configure b/configure index 145a261..00fe834 100755 --- a/configure +++ b/configure @@ -470,7 +470,7 @@ echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=src/pjrec.cpp +ac_unique_file=src/ctsim.cpp # Find the source files, if location was not specified. if test -z "$srcdir"; then @@ -710,7 +710,7 @@ fi PACKAGE=ctsim -VERSION=2.0.0-b3 +VERSION=2.0.0-b4 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; } @@ -1316,6 +1316,40 @@ else fi fi +# Extract the first word of "wx-config", so it can be a program name with args. +set dummy wx-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1323: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_wxconfig'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$wxconfig" in + /*) + ac_cv_path_wxconfig="$wxconfig" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_wxconfig="$wxconfig" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_wxconfig="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +wxconfig="$ac_cv_path_wxconfig" +if test -n "$wxconfig"; then + echo "$ac_t""$wxconfig" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi @@ -1326,7 +1360,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1330: checking host system type" >&5 +echo "configure:1364: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1347,21 +1381,21 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1351: checking for inline" >&5 +echo "configure:1385: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1387,7 +1421,7 @@ EOF esac echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:1391: checking size of short" >&5 +echo "configure:1425: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1395,7 +1429,7 @@ else ac_cv_sizeof_short=2 else cat > conftest.$ac_ext < main() @@ -1406,7 +1440,7 @@ main() exit(0); } EOF -if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -1426,7 +1460,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:1430: checking size of int" >&5 +echo "configure:1464: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1434,7 +1468,7 @@ else ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < main() @@ -1445,7 +1479,7 @@ main() exit(0); } EOF -if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -1465,7 +1499,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:1469: checking size of long" >&5 +echo "configure:1503: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1473,7 +1507,7 @@ else ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < main() @@ -1484,7 +1518,7 @@ main() exit(0); } EOF -if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -1504,7 +1538,7 @@ EOF echo $ac_n "checking size of float""... $ac_c" 1>&6 -echo "configure:1508: checking size of float" >&5 +echo "configure:1542: checking size of float" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1512,7 +1546,7 @@ else ac_cv_sizeof_float=4 else cat > conftest.$ac_ext < main() @@ -1523,7 +1557,7 @@ main() exit(0); } EOF -if { (eval echo configure:1527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_float=`cat conftestval` else @@ -1543,7 +1577,7 @@ EOF echo $ac_n "checking size of double""... $ac_c" 1>&6 -echo "configure:1547: checking size of double" >&5 +echo "configure:1581: checking size of double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1551,7 +1585,7 @@ else ac_cv_sizeof_double=8 else cat > conftest.$ac_ext < main() @@ -1562,7 +1596,7 @@ main() exit(0); } EOF -if { (eval echo configure:1566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_double=`cat conftestval` else @@ -1586,14 +1620,14 @@ EOF echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1590: checking whether byte ordering is bigendian" >&5 +echo "configure:1624: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -1604,11 +1638,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -1619,7 +1653,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1639,7 +1673,7 @@ if test "$cross_compiling" = yes; then ac_cv_c_bigendian=unknown else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1682,7 +1716,7 @@ fi echo $ac_n "checking for main in -lz""... $ac_c" 1>&6 -echo "configure:1686: checking for main in -lz" >&5 +echo "configure:1720: checking for main in -lz" >&5 ac_lib_var=`echo z'_'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 @@ -1690,14 +1724,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1735: \"$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 @@ -1719,7 +1753,7 @@ else fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:1723: checking for main in -lm" >&5 +echo "configure:1757: checking for main in -lm" >&5 ac_lib_var=`echo m'_'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 @@ -1727,14 +1761,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1772: \"$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 @@ -1762,7 +1796,7 @@ else fi echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6 -echo "configure:1766: checking for main in -lcurses" >&5 +echo "configure:1800: checking for main in -lcurses" >&5 ac_lib_var=`echo curses'_'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 @@ -1770,14 +1804,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1815: \"$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 @@ -1799,7 +1833,7 @@ curses=false fi echo $ac_n "checking for main in -lncurses""... $ac_c" 1>&6 -echo "configure:1803: checking for main in -lncurses" >&5 +echo "configure:1837: checking for main in -lncurses" >&5 ac_lib_var=`echo ncurses'_'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 @@ -1807,14 +1841,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1852: \"$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 @@ -1836,7 +1870,7 @@ ncurses=false fi echo $ac_n "checking for main in -lg2""... $ac_c" 1>&6 -echo "configure:1840: checking for main in -lg2" >&5 +echo "configure:1874: checking for main in -lg2" >&5 ac_lib_var=`echo g2'_'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 @@ -1844,14 +1878,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lg2 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1889: \"$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 @@ -1872,8 +1906,9 @@ else g2=false fi +wxwin=false echo $ac_n "checking for main in -lwx_gtk""... $ac_c" 1>&6 -echo "configure:1877: checking for main in -lwx_gtk" >&5 +echo "configure:1912: checking for main in -lwx_gtk" >&5 ac_lib_var=`echo wx_gtk'_'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 @@ -1881,14 +1916,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lwx_gtk $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1927: \"$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 @@ -1909,11 +1944,10 @@ EOF else echo "$ac_t""no" 1>&6 -wxwin=false fi echo $ac_n "checking for main in -lwx_msw""... $ac_c" 1>&6 -echo "configure:1917: checking for main in -lwx_msw" >&5 +echo "configure:1951: checking for main in -lwx_msw" >&5 ac_lib_var=`echo wx_msw'_'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 @@ -1921,14 +1955,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lwx_msw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1966: \"$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 @@ -1949,11 +1983,10 @@ EOF else echo "$ac_t""no" 1>&6 -wxwin=false fi echo $ac_n "checking for main in -ldmallocxx""... $ac_c" 1>&6 -echo "configure:1957: checking for main in -ldmallocxx" >&5 +echo "configure:1990: 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 @@ -1961,14 +1994,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:2005: \"$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 @@ -1990,7 +2023,7 @@ dmalloc=false fi echo $ac_n "checking for main in -lfftw""... $ac_c" 1>&6 -echo "configure:1994: checking for main in -lfftw" >&5 +echo "configure:2027: checking for main in -lfftw" >&5 ac_lib_var=`echo fftw'_'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 @@ -1998,14 +2031,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lfftw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2042: \"$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 @@ -2032,7 +2065,7 @@ fi if test "$zlib" = "true" ; then echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6 -echo "configure:2036: checking for main in -lpng" >&5 +echo "configure:2069: checking for main in -lpng" >&5 ac_lib_var=`echo png'_'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 @@ -2040,14 +2073,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lpng $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2084: \"$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 @@ -2074,7 +2107,7 @@ fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2078: checking how to run the C preprocessor" >&5 +echo "configure:2111: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2089,13 +2122,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2132: \"$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 : @@ -2106,13 +2139,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2149: \"$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 : @@ -2123,13 +2156,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2166: \"$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 : @@ -2154,12 +2187,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2158: checking for ANSI C header files" >&5 +echo "configure:2191: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2167,7 +2200,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2204: \"$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* @@ -2184,7 +2217,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2202,7 +2235,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2223,7 +2256,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2234,7 +2267,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2261,17 +2294,17 @@ for ac_hdr in fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h s do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2265: checking for $ac_hdr" >&5 +echo "configure:2298: 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:2275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2308: \"$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* @@ -2299,12 +2332,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2303: checking for working const" >&5 +echo "configure:2336: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2374,12 +2407,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2378: checking for off_t" >&5 +echo "configure:2411: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2407,12 +2440,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2411: checking for size_t" >&5 +echo "configure:2444: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2440,12 +2473,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:2444: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2477: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2453,7 +2486,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:2457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -2475,12 +2508,12 @@ fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:2479: checking for vprintf" >&5 +echo "configure:2512: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+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:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -2527,12 +2560,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:2531: checking for _doprnt" >&5 +echo "configure:2564: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+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:2592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -2582,12 +2615,12 @@ fi for ac_func in strtod strtol snprintf htonl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2586: checking for $ac_func" >&5 +echo "configure:2619: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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:2647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2635,12 +2668,12 @@ fi done echo $ac_n "checking for basename""... $ac_c" 1>&6 -echo "configure:2639: checking for basename" >&5 +echo "configure:2672: checking for basename" >&5 if eval "test \"`echo '$''{'ac_cv_func_basename'+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:2700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_basename=yes" else @@ -2683,12 +2716,12 @@ else fi echo $ac_n "checking for setjmp""... $ac_c" 1>&6 -echo "configure:2687: checking for setjmp" >&5 +echo "configure:2720: checking for setjmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_setjmp'+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:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_setjmp=yes" else @@ -2734,12 +2767,12 @@ if test "${OSTYPE}" = "cygwin" ; then getopt_long=false else echo $ac_n "checking for getopt_long""... $ac_c" 1>&6 -echo "configure:2738: checking for getopt_long" >&5 +echo "configure:2771: 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:2799: \"$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 @@ -2808,7 +2841,7 @@ fi fi echo $ac_n "checking whether to enable verbose warnings""... $ac_c" 1>&6 -echo "configure:2812: checking whether to enable verbose warnings" >&5 +echo "configure:2845: 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" @@ -2858,7 +2891,7 @@ fi echo $ac_n "checking debug""... $ac_c" 1>&6 -echo "configure:2862: checking debug" >&5 +echo "configure:2895: checking debug" >&5 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" @@ -2924,7 +2957,7 @@ if test "$withval" != "no" ; then fi echo $ac_n "checking for LAM MPI installation""... $ac_c" 1>&6 -echo "configure:2928: checking for LAM MPI installation" >&5 +echo "configure:2961: 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" @@ -2942,7 +2975,7 @@ else fi echo $ac_n "checking for web access""... $ac_c" 1>&6 -echo "configure:2946: checking for web access" >&5 +echo "configure:2979: 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" @@ -3032,7 +3065,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:3036: checking for X" >&5 +echo "configure:3069: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -3094,12 +3127,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:3103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3136: \"$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* @@ -3168,14 +3201,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:3212: \"$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. @@ -3281,17 +3314,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:3285: checking whether -R must be followed by a space" >&5 +echo "configure:3318: 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:3328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -3307,14 +3340,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:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -3346,7 +3379,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:3350: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:3383: 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 @@ -3354,7 +3387,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:3402: \"$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 @@ -3387,7 +3420,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:3391: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:3424: 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 @@ -3395,7 +3428,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:3443: \"$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 @@ -3435,12 +3468,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:3439: checking for gethostbyname" >&5 +echo "configure:3472: 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:3500: \"$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 @@ -3484,7 +3517,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3488: checking for gethostbyname in -lnsl" >&5 +echo "configure:3521: 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 @@ -3492,7 +3525,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:3540: \"$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 @@ -3533,12 +3566,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:3537: checking for connect" >&5 +echo "configure:3570: 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:3598: \"$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 @@ -3582,7 +3615,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:3586: checking for connect in -lsocket" >&5 +echo "configure:3619: 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 @@ -3590,7 +3623,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:3638: \"$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 @@ -3625,12 +3658,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:3629: checking for remove" >&5 +echo "configure:3662: 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:3690: \"$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 @@ -3674,7 +3707,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:3678: checking for remove in -lposix" >&5 +echo "configure:3711: 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 @@ -3682,7 +3715,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:3730: \"$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 @@ -3717,12 +3750,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:3721: checking for shmat" >&5 +echo "configure:3754: 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:3782: \"$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 @@ -3766,7 +3799,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:3770: checking for shmat in -lipc" >&5 +echo "configure:3803: 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 @@ -3774,7 +3807,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:3822: \"$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 @@ -3818,7 +3851,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:3822: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:3855: 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 @@ -3826,7 +3859,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:3874: \"$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 @@ -3874,7 +3907,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:3878: checking for XtToolkitThreadInitialize in -lXt" >&5 +echo "configure:3911: 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 @@ -3882,7 +3915,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:3930: \"$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 @@ -3921,7 +3954,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:3925: checking for XdbeQueryExtension in -lXext" >&5 +echo "configure:3958: 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 @@ -3929,7 +3962,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:3977: \"$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 @@ -3964,7 +3997,7 @@ else fi echo $ac_n "checking for XmbufQueryExtension in -lXext""... $ac_c" 1>&6 -echo "configure:3968: checking for XmbufQueryExtension in -lXext" >&5 +echo "configure:4001: 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 @@ -3972,7 +4005,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:4020: \"$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 @@ -4013,17 +4046,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:4017: checking for $ac_hdr" >&5 +echo "configure:4050: 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:4027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4060: \"$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* @@ -4065,7 +4098,7 @@ my_includes="$my_includes -I../include -I.." echo $ac_n "checking interactive graphics""... $ac_c" 1>&6 -echo "configure:4069: checking interactive graphics" >&5 +echo "configure:4102: checking interactive graphics" >&5 if test "$no_x" != "yes" ; then cat >> confdefs.h <<\EOF #define HAVE_X11 1 @@ -4100,9 +4133,6 @@ fi if test "$g2" = "true" ; then ctlibs_tools="$ctlibs_tools -lg2" fi -if test "$wx_gtk" = "true" ; then - ctlibs_tools="$ctlibs_tools -lwx_gtk" -fi if test "$fftw" = "true" ; then ctlibs_tools="$ctlibs_tools -lrfftw -lfftw" @@ -4112,11 +4142,31 @@ LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools" +if test "$wxwin" = "true" ; then + wxcflags=`$wxconfig --cflags` + CFLAGS="$CFLAGS -I../include $wxcflags" + wxlibs=`$wxconfig --libs` + wxlibs="$wxlibs $ctlibs" + + +if test 1==1 ; then + HAVE_WXWINDOWS_TRUE= + HAVE_WXWINDOWS_FALSE='#' +else + HAVE_WXWINDOWS_TRUE='#' + HAVE_WXWINDOWS_FALSE= +fi +fi + + + if test -n "$lamdir" ; then lamprograms="pjrec-lam phm2if-lam phm2pj-lam" fi +CXXFLAGS="$CFLAGS" + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -4218,7 +4268,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile src/Makefile libctgraphics/Makefile libctsupport/Makefile libctsim/Makefile Makefile man/Makefile cgi-bin/ctsim.cgi cgi-bin/Makefile html/simulate.html html/Makefile include/Makefile getopt/Makefile src/sample-ctsim.sh cgi-bin/ctsim.conf config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile src/Makefile libctgraphics/Makefile libctsupport/Makefile libctsim/Makefile Makefile man/Makefile cgi-bin/ctsim.cgi cgi-bin/Makefile html/simulate.html html/Makefile include/Makefile getopt/Makefile tools/sample-ctsim.sh cgi-bin/ctsim.conf tools/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/configure.in b/configure.in index e3ea013..7c27a3e 100644 --- a/configure.in +++ b/configure.in @@ -3,8 +3,8 @@ dnl Process this file with autoconf to produce a configure script. dnl Must reset CDPATH so that bash's cd does not print to stdout dnl CDPATH= -AC_INIT(src/pjrec.cpp) -AM_INIT_AUTOMAKE(ctsim,2.0.0-b3) +AC_INIT(src/ctsim.cpp) +AM_INIT_AUTOMAKE(ctsim,2.0.0-b4) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -14,7 +14,7 @@ AC_PROG_MAKE_SET AC_PROG_RANLIB AC_PROG_CC AC_PROG_CXX - +AC_PATH_PROG(wxconfig,wx-config) dnl AC_MSG_CHECKING([that the compiler works]) dnl AC_TRY_RUN([ main(int ac, char **av) { return 0; } ], AC_MSG_RESULT(yes), AC_MSG_RESULT(no) AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.), AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)) @@ -77,8 +77,9 @@ AC_CHECK_LIB(m, main) AC_CHECK_LIB(curses, main, [curses=true], [curses=false]) AC_CHECK_LIB(ncurses, main, [ncurses=true], [ncurses=false]) AC_CHECK_LIB(g2, main, [g2=true], [g2=false]) -AC_CHECK_LIB(wx_gtk, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS)], [wxwin=false]) -AC_CHECK_LIB(wx_msw, main, [wxwin=true; wx_msw=true; AC_DEFINE(HAVE_WXWINDOWS)], [wxwin=false]) +wxwin=false +AC_CHECK_LIB(wx_gtk, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS)]) +AC_CHECK_LIB(wx_msw, main, [wxwin=true; wx_msw=true; AC_DEFINE(HAVE_WXWINDOWS)]) AC_CHECK_LIB(dmallocxx, main, [dmalloc=true], [dmalloc=false]) AC_CHECK_LIB(fftw, main, [fftw=true; AC_DEFINE(HAVE_FFTW)], [fftw=false]) @@ -311,9 +312,6 @@ fi if test "$g2" = "true" ; then ctlibs_tools="$ctlibs_tools -lg2" fi -if test "$wx_gtk" = "true" ; then - ctlibs_tools="$ctlibs_tools -lwx_gtk" -fi if test "$fftw" = "true" ; then ctlibs_tools="$ctlibs_tools -lrfftw -lfftw" @@ -324,9 +322,21 @@ LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools" AC_SUBST(ctlibs) +if test "$wxwin" = "true" ; then + wxcflags=`$wxconfig --cflags` + CFLAGS="$CFLAGS -I../include $wxcflags" + wxlibs=`$wxconfig --libs` + wxlibs="$wxlibs $ctlibs" + AM_CONDITIONAL(HAVE_WXWINDOWS, test 1==1 ) +fi +AC_SUBST(wxcflags) +AC_SUBST(wxlibs) + if test -n "$lamdir" ; then lamprograms="pjrec-lam phm2if-lam phm2pj-lam" AC_SUBST(lamprograms) fi -AC_OUTPUT(Makefile src/Makefile libctgraphics/Makefile libctsupport/Makefile libctsim/Makefile Makefile man/Makefile cgi-bin/ctsim.cgi cgi-bin/Makefile html/simulate.html html/Makefile include/Makefile getopt/Makefile src/sample-ctsim.sh cgi-bin/ctsim.conf) +CXXFLAGS="$CFLAGS" + +AC_OUTPUT(Makefile src/Makefile libctgraphics/Makefile libctsupport/Makefile libctsim/Makefile Makefile man/Makefile cgi-bin/ctsim.cgi cgi-bin/Makefile html/simulate.html html/Makefile include/Makefile getopt/Makefile tools/sample-ctsim.sh cgi-bin/ctsim.conf tools/Makefile) diff --git a/include/array2d.h b/include/array2d.h index 9caca5c..73f3909 100644 --- a/include/array2d.h +++ b/include/array2d.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: array2d.h,v 1.6 2000/06/26 21:15:24 kevin Exp $ +** $Id: array2d.h,v 1.7 2000/07/13 07:03:21 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 @@ -41,7 +41,7 @@ class Array2d { } Array2d (void) - : array_data(0), nx(0), ny(0) + : nx(0), ny(0), array_data(0) {} ~Array2d () @@ -92,7 +92,7 @@ class Array2d { void deleteArray (void) { if (array_data) { - for (int i = 0; i < nx; i++) + for (unsigned int i = 0; i < nx; i++) delete array_data[i]; delete array_data; } diff --git a/include/backprojectors.h b/include/backprojectors.h index ab15930..297d8d1 100644 --- a/include/backprojectors.h +++ b/include/backprojectors.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: backprojectors.h,v 1.8 2000/07/11 10:32:44 kevin Exp $ +** $Id: backprojectors.h,v 1.9 2000/07/13 07:03:21 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 @@ -109,12 +109,12 @@ class Backproject void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double r, double phi, double L, int ni); void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double L, int ni); - Backprojector::InterpolationID interpType; const Projections& proj; ImageFile& im; + Backprojector::InterpolationID interpType; ImageFileArray v; - kuint32 nx; - kuint32 ny; + kint32 nx; + kint32 ny; double detInc; double rotInc; int iDetCenter; // index refering to L=0 projection diff --git a/include/imagefile.h b/include/imagefile.h index 5f8c324..a7600dc 100644 --- a/include/imagefile.h +++ b/include/imagefile.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: imagefile.h,v 1.17 2000/07/11 10:32:44 kevin Exp $ +** $Id: imagefile.h,v 1.18 2000/07/13 07:03:21 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 @@ -137,15 +137,17 @@ class ImageFile : public ImageFileBase void statistics (double& min, double& max, double& mean, double& mode, double& median, double& stddev) const; + void getMinMax (double& min, double& max) const; + void printStatistics (ostream& os) const; bool comparativeStatistics (const ImageFile& imComp, double& d, double& r, double& e) const; bool printComparativeStatistics (const ImageFile& imComp, ostream& os) const; - int display (void); + int display (void) const; - int displayScaling (const int scaleFactor, ImageFileValue pmin, ImageFileValue pmax); + int displayScaling (const int scaleFactor, ImageFileValue pmin, ImageFileValue pmax) const; #if HAVE_PNG void writeImagePNG (const char *outfile, int bitdepth, int nxcell, int nycell, double densmin, double densmax); diff --git a/include/phantom.h b/include/phantom.h index 4a2680b..09af2b3 100644 --- a/include/phantom.h +++ b/include/phantom.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: phantom.h,v 1.4 2000/06/25 17:32:24 kevin Exp $ +** $Id: phantom.h,v 1.5 2000/07/13 07:03:21 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 @@ -80,9 +80,9 @@ class PhantomElement private: PhmElemType m_type; // pelem type (box, ellipse, etc) - double m_atten; // X-ray attenuation coefficient double m_cx, m_cy; // center of pelem double m_u, m_v; // size of pelem + double m_atten; // X-ray attenuation coefficient double m_rot; // pelem rotation angle (in radians) double *m_x, *m_y; // ptr to array of points in obj world coord int m_nPoints; // number of points in outline arrays diff --git a/include/projections.h b/include/projections.h index f235e32..b1ee7fe 100644 --- a/include/projections.h +++ b/include/projections.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: projections.h,v 1.8 2000/07/06 08:30:30 kevin Exp $ +** $Id: projections.h,v 1.9 2000/07/13 07:03:21 kevin Exp $ ** ** ** This program is free software; you can redistribute it and/or modify @@ -79,6 +79,9 @@ class Projections DetectorArray& getDetectorArray (const int iview) { return (*m_projData[iview]); } + const DetectorArray& getDetectorArray (const int iview) const + { return (*m_projData[iview]); } + private: int m_headerSize; // Size of disk file header int m_geometry; // Geometry of scanner diff --git a/include/timer.h b/include/timer.h index 781ee94..705627f 100644 --- a/include/timer.h +++ b/include/timer.h @@ -28,8 +28,9 @@ class Timer virtual double timerEndAndReport (const char* const msg) { - timerEnd (); + double t = timerEnd (); timerReport (msg); + return (t); } double getTimeElapsed (void) const @@ -83,8 +84,9 @@ class TimerMPI : public Timer virtual double timerEndAndReport (const char* const msg) { - timerEnd (); + double t = timerEnd (); timerReport (msg); + return (t); } virtual void timerReportAllProcesses (const char* const msg) @@ -121,8 +123,9 @@ class TimerCollectiveMPI : public TimerMPI virtual double timerEndAndReport (const char* const msg) { - timerEnd (); + double t = timerEnd (); timerReport (msg); + return (t); } virtual void timerReport (const char* const msg) diff --git a/include/trace.h b/include/trace.h index bf06207..ed29746 100644 --- a/include/trace.h +++ b/include/trace.h @@ -23,7 +23,7 @@ class TraceLevel public: TraceLevel (const char* const traceString); - addTrace (const char* const traceString); + void addTrace (const char* const traceString); bool isTrace (const char* const traceQuery) const; diff --git a/libctgraphics/ezplot.cpp b/libctgraphics/ezplot.cpp index 666f759..05ca13f 100644 --- a/libctgraphics/ezplot.cpp +++ b/libctgraphics/ezplot.cpp @@ -6,7 +6,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ezplot.cpp,v 1.4 2000/07/04 18:33:35 kevin Exp $ +** $Id: ezplot.cpp,v 1.5 2000/07/13 07:03:21 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 @@ -131,14 +131,14 @@ ezplot (float x[], double y[], int num) for (int i = 0; i < num; i++) dx[i] = x[i]; - ezplot (dx, y, num); + return ezplot (dx, y, num); } SGP_ID ezplot (double x[], double y[], int num) { - unsigned int size, i; + unsigned int size; SGP_ID gid = NULL; if (ez.i_plotimmediate == TRUE) { @@ -160,7 +160,7 @@ ezplot (double x[], double y[], int num) size = num * sizeof(double); ez.curve[ez.i_numcurves].x = new double [size]; ez.curve[ez.i_numcurves].y = new double [size]; - for (i = 0; i < num; i++) { + for (int i = 0; i < num; i++) { ez.curve[ez.i_numcurves].x[i] = x[i]; ez.curve[ez.i_numcurves].y[i] = y[i]; } @@ -911,10 +911,7 @@ void ezinit(void) void ezfree(void) { - static char errmsg[] = "EZFREE in EZPLOT"; - int i; - - for (i = 0; i < ez.i_numcurves; i++) { + for (int i = 0; i < ez.i_numcurves; i++) { delete ez.curve[i].x; delete ez.curve[i].y; } diff --git a/libctgraphics/ezpol.cpp b/libctgraphics/ezpol.cpp index ff07991..d93e006 100644 --- a/libctgraphics/ezpol.cpp +++ b/libctgraphics/ezpol.cpp @@ -6,7 +6,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ezpol.cpp,v 1.2 2000/06/19 19:04:05 kevin Exp $ +** $Id: ezpol.cpp,v 1.3 2000/07/13 07:03:21 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 @@ -105,8 +105,6 @@ static struct key cmdlist[] = { #define NUMCMD (sizeof(cmdlist) / sizeof (struct key)) -static int ignorecase = TRUE; - static int skiptok(char term[]); static int pol_tok(struct token_st *token); static void dumptok(struct token_st *token); @@ -138,8 +136,6 @@ static void ungets(char *s); void pol_init (void) { - int i; - meta.eoc = SEMICOL; meta.str = DQUOTE; meta.com = SHARP; @@ -157,7 +153,7 @@ void pol_init (void) inittable (usertable); inittable (skiptable); - for (i = 0; i < NUMCMD; i++) + for (unsigned int i = 0; i < NUMCMD; i++) install (cmdtable, cmdlist[i].keyword, cmdlist[i].code); token.ready = FALSE; /* no token read yet */ @@ -1095,16 +1091,16 @@ int pol_lookchar(void) int pol_inchar(void) { - int c; + int c = 0; - if (currentf < 0) - return (EOF); + if (currentf < 0) + return (EOF); - while (currentf >= 0 && (c = pol_getch(filep[currentf])) == EOF && filep[currentf] != NULL) { - pol_closefile (); - } + while (currentf >= 0 && (c = pol_getch(filep[currentf])) == EOF && filep[currentf] != NULL) { + pol_closefile (); + } - return (c); + return (c); } /*--------------------------------------------------------------*/ diff --git a/libctgraphics/ezset.cpp b/libctgraphics/ezset.cpp index 09e85e1..7b95e30 100644 --- a/libctgraphics/ezset.cpp +++ b/libctgraphics/ezset.cpp @@ -6,7 +6,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ezset.cpp,v 1.3 2000/06/20 17:54:51 kevin Exp $ +** $Id: ezset.cpp,v 1.4 2000/07/13 07:03:21 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 @@ -39,7 +39,6 @@ static void initkw(void); static int modeinteract = FALSE; static int curveinteract = -1; static int ezset_firstcall = TRUE; -static int eztrace = TRUE; int ezset (char *command) @@ -565,105 +564,103 @@ static struct key { char *keyword; int code; } keytab[] = { - "solid", S_SOLID, - "dash", S_DASH, - "noline", S_NOLINE, - "black", S_BLACK, - "red", S_RED, - "blue", S_BLUE, - "green", S_GREEN, - "pen", S_PEN, - "symbol", S_SYMBOL, + {"solid", S_SOLID}, + {"dash", S_DASH}, + {"noline", S_NOLINE}, + {"black", S_BLACK}, + {"red", S_RED}, + {"blue", S_BLUE}, + {"green", S_GREEN}, + {"pen", S_PEN}, + {"symbol", S_SYMBOL}, /* "every", S_EVERY, */ /* "none", S_NONE, */ - "curves", S_CURVES, - "curve", S_CURVES, + {"curves", S_CURVES}, + {"curve", S_CURVES}, /* "unknown", S_UNKNOWN, */ /* "end", S_END, */ - "legend", S_LEGEND, - "xlegend", S_XLEGEND, - "ylegend", S_YLEGEND, - - "xlin", S_XLIN, - "ylin", S_YLIN, - "xlog", S_XLOG, - "ylog", S_YLOG, - "xlabel", S_XLABEL, - "ylabel", S_YLABEL, - "xlength", S_XLENGTH, - "ylength", S_YLENGTH, - - "xticks", S_XTICKS, - "yticks", S_YTICKS, - "above", S_ABOVE, - "label", S_LABEL, - "below", S_BELOW, - "nolabel", S_NOLABEL, - "right", S_RIGHT, - "left", S_LEFT, - - "xautoscale", S_XAUTOSCALE, - "yautoscale", S_YAUTOSCALE, - "xmin", S_XMIN, - "ymin", S_YMIN, - "xmax", S_XMAX, - "ymax", S_YMAX, - "lxfrac", S_LXFRAC, - "lyfrac", S_LYFRAC, - "xcross", S_XCROSS, - "ycross", S_YCROSS, - "noxaxis", S_NOXAXIS, - "noyaxis", S_NOYAXIS, - "xporigin", S_XPORIGIN, - "yporigin", S_YPORIGIN, - "title", S_TITLE, - "xtitle", S_XTITLE, - "ytitle", S_YTITLE, - - "replot", S_REPLOT, - "clear", S_CLEAR, - "store", S_STORE, - "restore", S_RESTORE, - "ustart", S_USTART, - "ufinish", S_UFINISH, - "amark", S_AMARK, - "interactive", S_INTERACTIVE, - "units", S_UNITS, - "inches", S_INCHES, - "user", S_USER, - - "data", S_DATA, - "help", S_HELP, - "exit", S_EXIT, - - "box", S_BOX, - "nobox", S_NOBOX, - "grid", S_GRID, - "nogrid", S_NOGRID, - "major", S_MAJOR, - "minor", S_MINOR, - "color", S_COLOR, - "legendbox", S_LEGENDBOX, - - "epson", S_EPSON, - "crt", S_CRT, - "no", S_NO, - - "textsize", S_TEXTSIZE, - "xbuf", S_XBUF, - "ybuf", S_YBUF, - "prtmode", S_PRTMODE, + {"legend", S_LEGEND}, + {"xlegend", S_XLEGEND}, + {"ylegend", S_YLEGEND}, + + {"xlin", S_XLIN}, + {"ylin", S_YLIN}, + {"xlog", S_XLOG}, + {"ylog", S_YLOG}, + {"xlabel", S_XLABEL}, + {"ylabel", S_YLABEL}, + {"xlength", S_XLENGTH}, + {"ylength", S_YLENGTH}, + + {"xticks", S_XTICKS}, + {"yticks", S_YTICKS}, + {"above", S_ABOVE}, + {"label", S_LABEL}, + {"below", S_BELOW}, + {"nolabel", S_NOLABEL}, + {"right", S_RIGHT}, + {"left", S_LEFT}, + + {"xautoscale", S_XAUTOSCALE}, + {"yautoscale", S_YAUTOSCALE}, + {"xmin", S_XMIN}, + {"ymin", S_YMIN}, + {"xmax", S_XMAX}, + {"ymax", S_YMAX}, + {"lxfrac", S_LXFRAC}, + {"lyfrac", S_LYFRAC}, + {"xcross", S_XCROSS}, + {"ycross", S_YCROSS}, + {"noxaxis", S_NOXAXIS}, + {"noyaxis", S_NOYAXIS}, + {"xporigin", S_XPORIGIN}, + {"yporigin", S_YPORIGIN}, + {"title", S_TITLE}, + {"xtitle", S_XTITLE}, + {"ytitle", S_YTITLE}, + + {"replot", S_REPLOT}, + {"clear", S_CLEAR}, + {"store", S_STORE}, + {"restore", S_RESTORE}, + {"ustart", S_USTART}, + {"ufinish", S_UFINISH}, + {"amark", S_AMARK}, + {"interactive", S_INTERACTIVE}, + {"units", S_UNITS}, + {"inches", S_INCHES}, + {"user", S_USER}, + + {"data", S_DATA}, + {"help", S_HELP}, + {"exit", S_EXIT}, + + {"box", S_BOX}, + {"nobox", S_NOBOX}, + {"grid", S_GRID}, + {"nogrid", S_NOGRID}, + {"major", S_MAJOR}, + {"minor", S_MINOR}, + {"color", S_COLOR}, + {"legendbox", S_LEGENDBOX}, + + {"epson", S_EPSON}, + {"crt", S_CRT}, + {"no", S_NO}, + + {"textsize", S_TEXTSIZE}, + {"xbuf", S_XBUF}, + {"ybuf", S_YBUF}, + // {"prtmode", S_PRTMOD}, }; -#define NKEYS (sizeof(keytab) / sizeof(struct key)) +static const unsigned int NKEYS=(sizeof(keytab) / sizeof(struct key)); static void initkw(void) { - int i; - - for (i = 0; i < NKEYS; i++) - if (pol_install(keytab[i].keyword, keytab[i].code) == FALSE) - sys_error(ERR_SEVERE, "error installing ezset keywords [initkw]"); + for (unsigned int i = 0; i < NKEYS; i++) + if (pol_install(keytab[i].keyword, keytab[i].code) == FALSE) + sys_error(ERR_SEVERE, "error installing ezset keywords [initkw]"); } diff --git a/libctgraphics/ezsupport.cpp b/libctgraphics/ezsupport.cpp index de495e9..f788b2e 100644 --- a/libctgraphics/ezsupport.cpp +++ b/libctgraphics/ezsupport.cpp @@ -2,7 +2,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ezsupport.cpp,v 1.3 2000/07/04 18:33:35 kevin Exp $ +** $Id: ezsupport.cpp,v 1.4 2000/07/13 07:03:21 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 @@ -119,7 +119,7 @@ trunc (double x) { double integer; - double frac = modf (x, &integer); + modf (x, &integer); return (integer); } diff --git a/libctsim/array2dfile.cpp b/libctsim/array2dfile.cpp index 0ed6354..ed04a7c 100644 --- a/libctsim/array2dfile.cpp +++ b/libctsim/array2dfile.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: array2dfile.cpp,v 1.5 2000/07/09 08:16:17 kevin Exp $ +** $Id: array2dfile.cpp,v 1.6 2000/07/13 07:03:21 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 @@ -107,7 +107,7 @@ const string& Array2dFileLabel::getDateString (void) const { ostringstream oss; - oss << m_month + 1 <<"/"<< m_day <<"/"<< m_year + 1900 << " " << m_hour <<":"<< m_minute <<":"<< m_second; + oss << static_cast(m_month + 1) <<"/"<< static_cast(m_day) <<"/"<< static_cast(m_year + 1900) << " " << static_cast(m_hour) <<":"<< static_cast(m_minute) <<":"<< static_cast(m_second); m_strDate = oss.str(); return m_strDate; } @@ -225,7 +225,7 @@ Array2dFile::allocArray (void) m_arrayData = new unsigned char* [m_nx]; int columnBytes = m_ny * m_pixelSize; - for (int i = 0; i < m_nx; i++) + for (unsigned int i = 0; i < m_nx; i++) m_arrayData[i] = new unsigned char [columnBytes]; } @@ -233,7 +233,7 @@ void Array2dFile::freeArray (void) { if (m_arrayData) { - for (int i = 0; i < m_nx; i++) + for (unsigned int i = 0; i < m_nx; i++) delete m_arrayData[i]; delete m_arrayData; m_arrayData = NULL; @@ -439,7 +439,7 @@ Array2dFile::arrayDataRead (frnetorderstream& fs) fs.seekg (m_headersize); int columnSize = m_ny * m_pixelSize; - for (int ix = 0; ix < m_nx; ix++) { + for (unsigned int ix = 0; ix < m_nx; ix++) { unsigned char* ptrColumn = m_arrayData[ix]; if (NativeBigEndian()) { for (unsigned int iy = 0; iy < m_ny; iy++) { @@ -551,7 +551,7 @@ void Array2dFile::labelsCopy (Array2dFile& copyFile, const char* const idStr) { string id = idStr; - for (int i = 0; i < copyFile.getNumLabels(); i++) { + for (unsigned int i = 0; i < copyFile.getNumLabels(); i++) { Array2dFileLabel l (copyFile.labelGet (i)); string lstr = l.getLabelString(); lstr = idStr + lstr; @@ -565,7 +565,7 @@ Array2dFile::arrayDataClear (void) { if (m_arrayData) { int columnSize = m_ny * m_pixelSize; - for (int ix = 0; ix < m_nx; ix++) + for (unsigned int ix = 0; ix < m_nx; ix++) memset (m_arrayData[ix], 0, columnSize); } } @@ -573,8 +573,6 @@ Array2dFile::arrayDataClear (void) void Array2dFile::printLabels (ostream& os) const { - int nlabels = getNumLabels(); - for (constLabelIterator l = m_labels.begin(); l != m_labels.end(); l++) { const Array2dFileLabel& label = **l; diff --git a/libctsim/backprojectors.cpp b/libctsim/backprojectors.cpp index ed388ad..9aa3145 100644 --- a/libctsim/backprojectors.cpp +++ b/libctsim/backprojectors.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: backprojectors.cpp,v 1.7 2000/07/11 10:32:44 kevin Exp $ +** $Id: backprojectors.cpp,v 1.8 2000/07/13 07:03:21 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 @@ -526,7 +526,6 @@ BackprojectIntDiff3::BackprojectView (const double* const filteredProj, const do static const int scaleShift = 16; static const kint32 scale = (1 << scaleShift); static const kint32 scaleBitmask = scale - 1; - static const double dScale = scale; static const kint32 halfScale = scale / 2; static const double dInvScale = 1. / scale; diff --git a/libctsim/filter.cpp b/libctsim/filter.cpp index 0f334b9..d22e99f 100644 --- a/libctsim/filter.cpp +++ b/libctsim/filter.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: filter.cpp,v 1.16 2000/07/11 10:32:44 kevin Exp $ +** $Id: filter.cpp,v 1.17 2000/07/13 07:03:21 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 @@ -654,6 +654,8 @@ SignalFilter::haveAnalyticSpatial (FilterID filterID) case FILTER_SINC: haveAnalytic = true; break; + default: + break; } return (haveAnalytic); diff --git a/libctsim/imagefile.cpp b/libctsim/imagefile.cpp index 9ae326f..3a1483d 100644 --- a/libctsim/imagefile.cpp +++ b/libctsim/imagefile.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: imagefile.cpp,v 1.7 2000/07/11 10:32:44 kevin Exp $ +** $Id: imagefile.cpp,v 1.8 2000/07/13 07:03:21 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 @@ -47,22 +47,24 @@ ImageFile::filterResponse (const char* const domainName, double bw, const char* } int -ImageFile::display (void) +ImageFile::display (void) const { double pmin, pmax; - // getPixelValueRange (pmin, pmax); + getMinMax (pmin, pmax); return (displayScaling (1, pmin, pmax)); } int -ImageFile::displayScaling (const int scale, const ImageFileValue pmin, const ImageFileValue pmax) +ImageFile::displayScaling (const int scale, const ImageFileValue pmin, const ImageFileValue pmax) const { int grayscale[256]; int nx = m_nx; int ny = m_ny; - ImageFileArray v = getArray(); + ImageFileArrayConst v = getArray(); + if (v == NULL || nx == 0 || ny == 0) + return 0; #if HAVE_G2_H int pens [nx * ny * scale * scale ]; @@ -113,11 +115,14 @@ ImageFile::comparativeStatistics (const ImageFile& imComp, double& d, double& r, return false; } ImageFileArrayConst v = getArray(); + if (v == NULL || m_nx == 0 || m_ny == 0) + return false; + ImageFileArrayConst vComp = imComp.getArray(); double myMean = 0.; - for (int ix = 0; ix < m_nx; ix++) { - for (int iy = 0; iy < m_ny; iy++) { + for (unsigned int ix = 0; ix < m_nx; ix++) { + for (unsigned int iy = 0; iy < m_ny; iy++) { myMean += v[ix][iy]; } } @@ -127,8 +132,8 @@ ImageFile::comparativeStatistics (const ImageFile& imComp, double& d, double& r, double absErrorSum = 0.; double sqDiffFromMeanSum = 0.; double absValueSum = 0.; - for (int ix = 0; ix < m_nx; ix++) { - for (int iy = 0; iy < m_ny; iy++) { + for (unsigned int ix = 0; ix < m_nx; ix++) { + for (unsigned int iy = 0; iy < m_ny; iy++) { double diff = v[ix][iy] - vComp[ix][iy]; sqErrorSum += diff * diff; absErrorSum += fabs(diff); @@ -169,7 +174,9 @@ ImageFile::printComparativeStatistics (const ImageFile& imComp, ostream& os) con os << " Normalized root mean squared distance (d): " << d << endl; os << " Normalized mean absolute distance (r): " << r << endl; os << "Worst case distance (2x2 pixel average) (e): " << e << endl; + return true; } + return false; } @@ -196,6 +203,9 @@ ImageFile::statistics (double& min, double& max, double& mean, double& mode, dou int ny = m_ny; ImageFileArrayConst v = getArray(); + if (v == NULL || nx == 0 || ny == 0) + return; + mean = 0; min = v[0][0]; max = v[0][0]; @@ -240,6 +250,28 @@ ImageFile::statistics (double& min, double& max, double& mean, double& mode, dou } +void +ImageFile::getMinMax (double& min, double& max) const +{ + int nx = m_nx; + int ny = m_ny; + ImageFileArrayConst v = getArray(); + + if (v == NULL || nx == 0 || ny == 0) + return; + + min = v[0][0]; + max = v[0][0]; + for (int ix = 0; ix < nx; ix++) { + for (int iy = 0; iy < ny; iy++) { + if (v[ix][iy] > max) + max = v[ix][iy]; + if (v[ix][iy] < min) + min = v[ix][iy]; + } + } +} + void ImageFile::writeImagePGM (const char *outfile, int nxcell, int nycell, double densmin, double densmax) { diff --git a/libctsim/phantom.cpp b/libctsim/phantom.cpp index aff7b5d..dba6576 100644 --- a/libctsim/phantom.cpp +++ b/libctsim/phantom.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: phantom.cpp,v 1.5 2000/06/25 17:32:24 kevin Exp $ +** $Id: phantom.cpp,v 1.6 2000/07/13 07:03:21 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 @@ -118,6 +118,7 @@ Phantom::createFromPhantom (const char* const phmName) m_name = phmName; createFromPhantom (phmid); + return true; } bool diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index 8f1edf7..69c4d08 100644 --- a/libctsim/projections.cpp +++ b/libctsim/projections.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: projections.cpp,v 1.13 2000/07/11 10:32:44 kevin Exp $ +** $Id: projections.cpp,v 1.14 2000/07/13 07:03:21 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 @@ -208,7 +208,6 @@ Projections::headerRead (fnetorderstream& fs) if (! fs) return false; - off_t testPos; fs.readInt16 (_hsize); fs.readInt16 (_signature); fs.readInt32 (_nView); @@ -366,7 +365,7 @@ Projections::detarrayRead (fnetorderstream& fs, DetectorArray& darray, const int darray.setViewAngle (view_angle); // darray.setNDet ( nDet); - for (int i = 0; i < nDet; i++) { + for (unsigned int i = 0; i < nDet; i++) { kfloat32 detval; fs.readFloat32 (detval); detval_ptr[i] = detval; @@ -412,7 +411,7 @@ Projections::detarrayWrite (fnetorderstream& fs, const DetectorArray& darray, co fs.writeFloat64 (view_angle); fs.writeInt32 (nDet); - for (int i = 0; i < nDet; i++) { + for (unsigned int i = 0; i < nDet; i++) { kfloat32 detval = detval_ptr[i]; fs.writeFloat32 (detval); } @@ -489,7 +488,6 @@ Projections::printScanInfo (void) const bool Projections::reconstruct (ImageFile& im, const char* const filterName, double filt_param, const char* const filterMethodName, const int zeropad, const char* const interpName, int interpFactor, const char* const backprojectName, const int trace) { - int nview = m_nView; double detInc = m_detInc; int n_filteredProj = m_nDet * interpFactor; double filteredProj [n_filteredProj]; // filtered projections diff --git a/libctsim/scanner.cpp b/libctsim/scanner.cpp index 6ebb04e..53588db 100644 --- a/libctsim/scanner.cpp +++ b/libctsim/scanner.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: scanner.cpp,v 1.2 2000/06/25 17:32:24 kevin Exp $ +** $Id: scanner.cpp,v 1.3 2000/07/13 07:03:21 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 @@ -305,7 +305,7 @@ Scanner::projectSingleView (const Phantom& phm, DetectorArray& detArray, const d double xs = xs_maj; double ys = ys_maj; double sum = 0.0; - for (int i = 0; i < m_nSample; i++) { + for (unsigned int i = 0; i < m_nSample; i++) { #ifdef HAVE_SGP if (m_trace >= TRACE_RAYS) { sgp2_move_abs (xs, ys);