From: Kevin M. Rosenberg Date: Sat, 29 Jul 2000 19:50:08 +0000 (+0000) Subject: r164: *** empty log message *** X-Git-Tag: debian-4.5.3-3~853 X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=commitdiff_plain;h=08a5cd04c3994d5ea24713b9b000791bd2e406fe r164: *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 8f16a4d..73c2e1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2.0.0-b8 - 8/1/00 + Added line color support to SGP + 2.0.0-b7 - 7/25/00 Finished support for dmallocxx library Fixed bug in SignalFilter::convertFilterMethodNameToID() diff --git a/TODO b/TODO index ceeae85..438846d 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,3 @@ -MISCELLANEOUS -============= - -Convert SGP graphics to wxWindows. - +Fix BUGS -- see BUGS file diff --git a/configure b/configure index c011a92..7954212 100755 --- a/configure +++ b/configure @@ -11,11 +11,11 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: +ac_help="$ac_help + --enable-debug Turn on debugging" ac_help="$ac_help --enable-verbose-warnings Enable verbose compiler warnings." -ac_help="$ac_help - --enable-debug Turn on debugging" ac_help="$ac_help --with-lam[=PATH] Set path of LAM MPI " ac_help="$ac_help @@ -712,7 +712,7 @@ fi PACKAGE=ctsim -VERSION=2.0.0-b7 +VERSION=2.0.0-b8 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; } @@ -2837,13 +2837,57 @@ else fi fi +echo $ac_n "checking debug""... $ac_c" 1>&6 +echo "configure:2842: checking debug" >&5 +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + case "${enableval}" in + yes) debug=true + echo "$ac_t""yes" 1>&6 + ;; + no) debug=false + echo "$ac_t""no" 1>&6 + ;; + *) echo "$ac_t""bad value ${enableval} for --enable-debug" 1>&6 + ;; +esac +else + debug=false; echo "$ac_t""no" 1>&6 +fi + + + +if test "$debug" = "true"; then + DEBUG_TRUE= + DEBUG_FALSE='#' +else + DEBUG_TRUE='#' + DEBUG_FALSE= +fi + +if test "$debug" = "true" ; then + CFLAGS="-g -DDEBUG" + cat >> confdefs.h <<\EOF +#define DEBUG 1 +EOF + +else + CFLAGS="-g -O3 -DNDEBUG" + cat >> confdefs.h <<\EOF +#define NDEBUG 1 +EOF + +fi + + if test -n "$GCC"; then CFLAGS="$CFLAGS -Wall" fi echo $ac_n "checking whether to enable verbose warnings""... $ac_c" 1>&6 -echo "configure:2847: checking whether to enable verbose warnings" >&5 +echo "configure:2891: 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" @@ -2892,57 +2936,6 @@ else fi -echo $ac_n "checking debug""... $ac_c" 1>&6 -echo "configure:2897: checking debug" >&5 -# Check whether --enable-debug or --disable-debug was given. -if test "${enable_debug+set}" = set; then - enableval="$enable_debug" - case "${enableval}" in - yes) debug=true - echo "$ac_t""yes" 1>&6 - ;; - no) debug=false - echo "$ac_t""no" 1>&6 - ;; - *) echo "$ac_t""bad value ${enableval} for --enable-debug" 1>&6 - ;; -esac -else - debug=false; echo "$ac_t""no" 1>&6 -fi - - - -if test "$debug" = "true"; then - DEBUG_TRUE= - DEBUG_FALSE='#' -else - DEBUG_TRUE='#' - DEBUG_FALSE= -fi - -if test "$debug" = "true" ; then - - if test -n "$GCC"; then - CFLAGS="$CFLAGS -g -DDEBUG" - fi - - cat >> confdefs.h <<\EOF -#define DEBUG 1 -EOF - -else - - if test -n "$GCC"; then - CFLAGS="$CFLAGS -g -O3 -DNDEBUG --fast-math" - fi - - cat >> confdefs.h <<\EOF -#define NDEBUG 1 -EOF - -fi - # Check whether --with-lam or --without-lam was given. if test "${with_lam+set}" = set; then withval="$with_lam" @@ -2959,7 +2952,7 @@ if test "$withval" != "no" ; then fi echo $ac_n "checking for LAM MPI installation""... $ac_c" 1>&6 -echo "configure:2963: checking for LAM MPI installation" >&5 +echo "configure:2956: 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" @@ -2977,7 +2970,7 @@ else fi echo $ac_n "checking for web access""... $ac_c" 1>&6 -echo "configure:2981: checking for web access" >&5 +echo "configure:2974: 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" @@ -3067,7 +3060,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:3071: checking for X" >&5 +echo "configure:3064: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -3129,12 +3122,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:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3131: \"$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* @@ -3203,14 +3196,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:3207: \"$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. @@ -3316,17 +3309,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:3320: checking whether -R must be followed by a space" >&5 +echo "configure:3313: 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:3323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -3342,14 +3335,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:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -3381,7 +3374,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:3385: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:3378: 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 @@ -3389,7 +3382,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:3397: \"$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 @@ -3422,7 +3415,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:3426: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:3419: 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 @@ -3430,7 +3423,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:3438: \"$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 @@ -3470,12 +3463,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:3474: checking for gethostbyname" >&5 +echo "configure:3467: 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:3495: \"$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 @@ -3519,7 +3512,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3523: checking for gethostbyname in -lnsl" >&5 +echo "configure:3516: 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 @@ -3527,7 +3520,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:3535: \"$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 @@ -3568,12 +3561,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:3572: checking for connect" >&5 +echo "configure:3565: 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:3593: \"$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 @@ -3617,7 +3610,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:3621: checking for connect in -lsocket" >&5 +echo "configure:3614: 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 @@ -3625,7 +3618,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:3633: \"$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 @@ -3660,12 +3653,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:3664: checking for remove" >&5 +echo "configure:3657: 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:3685: \"$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 @@ -3709,7 +3702,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:3713: checking for remove in -lposix" >&5 +echo "configure:3706: 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 @@ -3717,7 +3710,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:3725: \"$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 @@ -3752,12 +3745,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:3756: checking for shmat" >&5 +echo "configure:3749: 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:3777: \"$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 @@ -3801,7 +3794,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:3805: checking for shmat in -lipc" >&5 +echo "configure:3798: 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 @@ -3809,7 +3802,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:3817: \"$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 @@ -3853,7 +3846,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:3857: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:3850: 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 @@ -3861,7 +3854,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:3869: \"$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 @@ -3909,7 +3902,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:3913: checking for XtToolkitThreadInitialize in -lXt" >&5 +echo "configure:3906: 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 @@ -3917,7 +3910,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:3925: \"$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 @@ -3956,7 +3949,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:3960: checking for XdbeQueryExtension in -lXext" >&5 +echo "configure:3953: 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 @@ -3964,7 +3957,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:3972: \"$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 @@ -3999,7 +3992,7 @@ else fi echo $ac_n "checking for XmbufQueryExtension in -lXext""... $ac_c" 1>&6 -echo "configure:4003: checking for XmbufQueryExtension in -lXext" >&5 +echo "configure:3996: 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 @@ -4007,7 +4000,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:4015: \"$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 @@ -4048,17 +4041,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:4052: checking for $ac_hdr" >&5 +echo "configure:4045: 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:4062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4055: \"$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* @@ -4100,7 +4093,7 @@ my_includes="$my_includes -I../include -I.." echo $ac_n "checking interactive graphics""... $ac_c" 1>&6 -echo "configure:4104: checking interactive graphics" >&5 +echo "configure:4097: checking interactive graphics" >&5 if test "$no_x" != "yes" ; then cat >> confdefs.h <<\EOF #define HAVE_X11 1 @@ -4141,7 +4134,7 @@ if test "$fftw" = "true" ; then fi echo $ac_n "checking for main in -ldmallocxx""... $ac_c" 1>&6 -echo "configure:4145: checking for main in -ldmallocxx" >&5 +echo "configure:4138: 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 @@ -4149,14 +4142,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:4153: \"$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 @@ -4178,7 +4171,7 @@ dmallocxx=false fi echo $ac_n "checking for enable-dmalloc""... $ac_c" 1>&6 -echo "configure:4182: checking for enable-dmalloc" >&5 +echo "configure:4175: checking for enable-dmalloc" >&5 # Check whether --enable-dmalloc or --disable-dmalloc was given. if test "${enable_dmalloc+set}" = set; then enableval="$enable_dmalloc" @@ -4206,15 +4199,11 @@ EOF echo "$ac_t""Using dmalloc" 1>&6 fi -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" + ctlibs_graphics="$ctlibs_graphics $wxlibs" if test 1==1 ; then @@ -4228,6 +4217,10 @@ fi +LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" +ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools" + + if test -n "$lamdir" ; then lamprograms="pjrec-lam phm2if-lam phm2pj-lam" @@ -4419,11 +4412,11 @@ s%@NO_X_FALSE@%$NO_X_FALSE%g s%@my_includes@%$my_includes%g s%@HAVE_SGP_TRUE@%$HAVE_SGP_TRUE%g s%@HAVE_SGP_FALSE@%$HAVE_SGP_FALSE%g -s%@ctlibs@%$ctlibs%g s%@HAVE_WXWINDOWS_TRUE@%$HAVE_WXWINDOWS_TRUE%g s%@HAVE_WXWINDOWS_FALSE@%$HAVE_WXWINDOWS_FALSE%g s%@wxcflags@%$wxcflags%g s%@wxlibs@%$wxlibs%g +s%@ctlibs@%$ctlibs%g s%@lamprograms@%$lamprograms%g CEOF diff --git a/configure.in b/configure.in index e2c9244..153bd94 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.0-b7) +AM_INIT_AUTOMAKE(ctsim,2.0.0-b8) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -115,28 +115,6 @@ if test "${getopt_long}" = "false" ; then AM_CONDITIONAL(INCLUDED_GETOPT_LONG, test 1==1) fi -AC_ADD_GCC_CFLAGS([-Wall]) -AC_MSG_CHECKING(whether to enable verbose warnings) -AC_ARG_ENABLE(verbose-warnings, -[ --enable-verbose-warnings - Enable verbose compiler warnings.], -[ case "$enableval" in - yes) - AC_MSG_RESULT(yes) - AC_ADD_GCC_CFLAGS([-W]) - AC_ADD_GCC_CFLAGS([-Wshadow -Wpointer-arith -Wbad-function-cast]) - AC_ADD_GCC_CFLAGS([-Wcast-align -Wwrite-strings -Waggregate-return]) - AC_ADD_GCC_CFLAGS([-Wmissing-prototypes -Wstrict-prototypes]) - AC_ADD_GCC_CFLAGS([-pedantic]) - AC_ADD_GCC_CFLAGS([-Wredundant-decls]) - - ;; - *) - AC_MSG_RESULT(no) - ;; - esac ], AC_MSG_RESULT(no) -) - dnl Check for debug mode AC_MSG_CHECKING([debug]) AC_ARG_ENABLE(debug, @@ -155,13 +133,38 @@ esac], AM_CONDITIONAL(DEBUG, test "$debug" = "true") if test "$debug" = "true" ; then - AC_ADD_GCC_CFLAGS([-g -DDEBUG]) +dnl AC_ADD_GCC_CFLAGS([-g -DDEBUG]) + CFLAGS="-g -DDEBUG" AC_DEFINE(DEBUG) else - AC_ADD_GCC_CFLAGS([-g -O3 -DNDEBUG --fast-math]) +dnl AC_ADD_GCC_CFLAGS([-g -O2 -DNDEBUG]) + CFLAGS="-g -O3 -DNDEBUG" AC_DEFINE(NDEBUG) fi + +AC_ADD_GCC_CFLAGS([-Wall]) +AC_MSG_CHECKING(whether to enable verbose warnings) +AC_ARG_ENABLE(verbose-warnings, +[ --enable-verbose-warnings + Enable verbose compiler warnings.], +[ case "$enableval" in + yes) + AC_MSG_RESULT(yes) + AC_ADD_GCC_CFLAGS([-W]) + AC_ADD_GCC_CFLAGS([-Wshadow -Wpointer-arith -Wbad-function-cast]) + AC_ADD_GCC_CFLAGS([-Wcast-align -Wwrite-strings -Waggregate-return]) + AC_ADD_GCC_CFLAGS([-Wmissing-prototypes -Wstrict-prototypes]) + AC_ADD_GCC_CFLAGS([-pedantic]) + AC_ADD_GCC_CFLAGS([-Wredundant-decls]) + + ;; + *) + AC_MSG_RESULT(no) + ;; + esac ], AC_MSG_RESULT(no) +) + dnl Set LAM path AC_ARG_WITH(lam, [ --with-lam[=PATH] Set path of LAM MPI ], @@ -340,21 +343,21 @@ if test "$dmallocxx" = "true" -a "$usedmalloc" = "true" ; then AC_MSG_RESULT(Using dmalloc) fi -dnl Setting projet libraries and includes -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" + ctlibs_graphics="$ctlibs_graphics $wxlibs" AM_CONDITIONAL(HAVE_WXWINDOWS, test 1==1 ) fi AC_SUBST(wxcflags) AC_SUBST(wxlibs) +dnl Setting projet libraries and includes +LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" +ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools" +AC_SUBST(ctlibs) + if test -n "$lamdir" ; then lamprograms="pjrec-lam phm2if-lam phm2pj-lam" AC_SUBST(lamprograms) diff --git a/include/ctsupport.h b/include/ctsupport.h index 58274ee..5558150 100644 --- a/include/ctsupport.h +++ b/include/ctsupport.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ctsupport.h,v 1.5 2000/06/28 15:25:34 kevin Exp $ +** $Id: ctsupport.h,v 1.6 2000/07/29 19:50:08 kevin Exp $ ** ** ** This program is free software; you can redistribute it and/or modify @@ -271,25 +271,6 @@ double normalizeAngle (double theta); double integrateSimpson (const double xmin, const double xmax, const double *y, const int np); -// Console I/O Section - -#define C_BLACK 0 /* color codes */ -#define C_BLUE 1 -#define C_GREEN 2 -#define C_CYAN 3 -#define C_RED 4 -#define C_MAGENTA 5 -#define C_BROWN 6 -#define C_WHITE 7 -#define C_GREY 8 -#define C_LTBLUE 9 -#define C_LTGREEN 10 -#define C_LTCYAN 11 -#define C_LTRED 12 -#define C_LTMAGENTA 13 -#define C_YELLOW 14 -#define C_LTWHITE 15 - /*----------------------------------------------------------------------*/ /* screen character codes */ diff --git a/include/ezplot.h b/include/ezplot.h index 13e35e9..22c2360 100644 --- a/include/ezplot.h +++ b/include/ezplot.h @@ -7,7 +7,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ezplot.h,v 1.11 2000/07/28 10:51:31 kevin Exp $ +** $Id: ezplot.h,v 1.12 2000/07/29 19:50:08 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 @@ -209,7 +209,6 @@ class EZPlot { static void initkw(void); - int curveinteract; static bool ezset_initialized; public: @@ -245,9 +244,6 @@ class EZPlot { #define S_SYMBOL -18 #define S_EVERY -19 #define S_NONE -20 -#define S_CURVES -21 -#define S_UNKNOWN -22 -#define S_END -23 #define S_LEGEND -24 #define S_XLEGEND -25 #define S_YLEGEND -26 diff --git a/include/sgp.h b/include/sgp.h index b2d31ee..32abbc4 100644 --- a/include/sgp.h +++ b/include/sgp.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: sgp.h,v 1.11 2000/07/28 08:28:08 kevin Exp $ +** $Id: sgp.h,v 1.12 2000/07/29 19:50:08 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 @@ -100,6 +100,7 @@ public: }; +class RGBColor; class SGP { private: int m_iPhysicalXSize; // Physical Window size @@ -133,6 +134,9 @@ private: void calc_transform (); + static RGBColor s_aRGBColor[]; + static int s_iRGBColorCount; + public: enum { // linestyles LS_NOLINE = 0, @@ -209,4 +213,45 @@ public: }; +enum { + C_BLACK = 0, // color codes + C_BLUE = 1, + C_GREEN = 2, + C_CYAN = 3, + C_RED = 4, + C_MAGENTA = 5, + C_BROWN = 6, + C_GRAY = 7, + C_LTGRAY = 8, + C_LTBLUE = 9, + C_LTGREEN = 10, + C_LTCYAN = 11, + C_LTRED = 12, + C_LTMAGENTA = 13, + C_YELLOW = 14, + C_WHITE = 15, +}; + +class RGBColor { + private: + short int r; + short int g; + short int b; + + public: + RGBColor (int r, int g, int b) + : r(r), g(g), b(b) + {} + + int getRed () const + { return r; } + + int getGreen () const + { return g; } + + int getBlue () const + { return b; } + +}; + #endif diff --git a/libctgraphics/ezplot.cpp b/libctgraphics/ezplot.cpp index 519b7f9..4579668 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.8 2000/07/28 10:51:31 kevin Exp $ +** $Id: ezplot.cpp,v 1.9 2000/07/29 19:50:08 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 @@ -31,7 +31,7 @@ static const double TICKRATIO = 0.4; // ratio of minor to major tick lengths static const int MAXNUMFMT = 15; // maximum length of a numeric format static const double DEF_CHARHEIGHT = (1./43.); //size of characters in NDC static const double DEF_CHARWIDTH = (1./80.); // size of characters in NDC -static const int DEF_CURVE_CLR = C_YELLOW; +static const int DEF_CURVE_CLR = C_RED; @@ -130,13 +130,11 @@ EZPlot::EZPlot (SGP& sgp) void EZPlot::initPlotSettings () { - curveinteract = -1; - charwidth = DEF_CHARWIDTH; charheight = DEF_CHARHEIGHT; - c_xlabel = "X axis"; - c_ylabel = "Y axis"; + c_xlabel = ""; + c_ylabel = ""; c_title = ""; c_legend = ""; @@ -179,12 +177,12 @@ EZPlot::initPlotSettings () s_ylegend = FALSE; s_textsize = FALSE; - clr_axis = C_WHITE; /* set fixed colors */ - clr_title = (C_CYAN+8); - clr_label = (C_CYAN+8); - clr_legend = (C_RED+8); - clr_number = (C_GREEN+8); - clr_grid = (C_BLACK+8); + clr_axis = C_BLACK; /* set fixed colors */ + clr_title = C_CYAN; + clr_label = C_CYAN; + clr_legend = C_RED; + clr_number = C_GREEN; + clr_grid = C_LTGRAY; } diff --git a/libctgraphics/ezset.cpp b/libctgraphics/ezset.cpp index c28c761..074b287 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.6 2000/07/28 10:51:31 kevin Exp $ + ** $Id: ezset.cpp,v 1.7 2000/07/29 19:50:08 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 @@ -284,38 +284,12 @@ EZPlot::do_cmd (int lx) s_ylegend = FALSE; } break; - case S_CURVES: - if (pol_integer (&n, TT_REAL, FALSE, 0, 0) == TRUE) { - if (n < 1) - n = 1; - // if (modeinteract == TRUE) { - // curveinteract = n - 1; - // if (o_unknowncurves == FALSE && o_reqcurves < n) - // o_reqcurves = n; - // } else { - // clearCurve (); - // o_reqcurves = n; - // } - } else { - // if (pol_word ("unknown", 7) == TRUE) - // o_unknowncurves = TRUE; - // else if (pol_word ("end", 3) == TRUE) { - // o_unknowncurves = FALSE; - // o_reqcurves = i_numcurves; - // i_plotimmediate = TRUE; - // ezplot (static_cast(NULL), static_cast(NULL), 0); - // i_plotimmediate = FALSE; - // } - } - break; case S_SYMBOL: if (pol_integer (&n, TT_REAL, FALSE, 0, 0) == TRUE) { if (n > 0 && n <= MAXSYMBOL) o_symbol = n; else o_symbol = 1; - // if (modeinteract == TRUE && curveinteract >= 0) - // curve[curveinteract].symbol = o_symbol; } else { if (pol_word("every",5) == TRUE) { if (pol_integer (&n, TT_REAL, FALSE, 0, 0) == TRUE) { @@ -323,13 +297,9 @@ EZPlot::do_cmd (int lx) o_symfreq = n; else o_symfreq = 1; - // if (modeinteract == TRUE && curveinteract >= 0) - // curve[curveinteract].symfreq = o_symfreq; } } else if (pol_word ("none",4) == TRUE) { o_symbol = -1; - // if (modeinteract == TRUE && curveinteract >= 0) - // curve[curveinteract].symbol = o_symbol; } } break; @@ -417,23 +387,17 @@ 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}, - /* "every", S_EVERY, */ - /* "none", S_NONE, */ - - {"curves", S_CURVES}, - {"curve", S_CURVES}, - /* "unknown", S_UNKNOWN, */ - /* "end", S_END, */ - + {"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}, {"legend", S_LEGEND}, {"xlegend", S_XLEGEND}, {"ylegend", S_YLEGEND}, @@ -479,7 +443,6 @@ static struct key { {"store", S_STORE}, {"restore", S_RESTORE}, {"amark", S_AMARK}, - {"interactive", S_INTERACTIVE}, {"units", S_UNITS}, {"inches", S_INCHES}, {"user", S_USER}, @@ -508,6 +471,6 @@ void EZPlot::initkw(void) { for (unsigned int i = 0; i < NKEYS; i++) - if (pol_install(keytab[i].keyword, keytab[i].code) == FALSE) + if (! pol_install(keytab[i].keyword, keytab[i].code)) sys_error(ERR_SEVERE, "error installing ezset keywords [initkw]"); } diff --git a/libctgraphics/sgp.cpp b/libctgraphics/sgp.cpp index 4d70f8c..bc789cf 100644 --- a/libctgraphics/sgp.cpp +++ b/libctgraphics/sgp.cpp @@ -7,7 +7,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: sgp.cpp,v 1.6 2000/07/28 10:51:31 kevin Exp $ +** $Id: sgp.cpp,v 1.7 2000/07/29 19:50:08 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 @@ -29,6 +29,27 @@ #include "sgp.h" +RGBColor SGP::s_aRGBColor[] = +{ + RGBColor (0, 0, 0), + RGBColor (0, 0, 128), + RGBColor (0, 128, 0), + RGBColor (0, 128, 128), + RGBColor (128, 0, 0), + RGBColor (128, 0, 128), + RGBColor (128, 128, 0), + RGBColor (80, 80, 80), + RGBColor (160, 160, 160), + RGBColor (0, 0, 255), + RGBColor (0, 255, 0), + RGBColor (0, 255, 255), + RGBColor (255, 0, 0), + RGBColor (255, 0, 255), + RGBColor (255, 255, 0), + RGBColor (255, 255, 255), +}; + +int SGP::s_iRGBColorCount = sizeof(s_aRGBColor) / sizeof(class RGBColor); #ifdef HAVE_WXWINDOWS SGPDriver::SGPDriver (wxDC* pDC, const char* szWinTitle = "", int xsize = 640, int ysize = 480) @@ -72,11 +93,11 @@ SGP::SGP (const SGPDriver& driver) setWindow (0., 0., 1., 1.); setViewport (0., 0., 1., 1.); moveAbs (0., 0.); - m_iCurrentPhysicalX = 0; - m_iCurrentPhysicalY = 0; + stylusNDC (0., 0., false); setTextAngle (0.); setTextSize (1. / 25.); + setColor (C_BLACK); } @@ -89,10 +110,14 @@ SGP::stylusNDC (double x, double y, bool beam) yp = m_iPhysicalYSize - yp; if (beam) { +#if HAVE_WXWINDOWS if (m_driver.isWX()) m_driver.idWX()->DrawLine (m_iCurrentPhysicalX, m_iCurrentPhysicalY, xp, yp); +#endif +#if HAVE_G2_H if (m_driver.isG2()) g2_line (m_driver.idG2(), m_iCurrentPhysicalX, m_iCurrentPhysicalY, xp, yp); +#endif } m_iCurrentPhysicalX = xp; m_iCurrentPhysicalY = yp; @@ -115,10 +140,14 @@ SGP::pointNDC (double x, double y) void SGP::eraseWindow () { +#if HAVE_G2_H if (m_driver.isG2()) g2_clear (m_driver.idG2()); +#endif +#if HAVE_WXWINDOWS if (m_driver.isWX()) m_driver.idWX()->Clear(); +#endif } // NAME @@ -186,6 +215,21 @@ SGP::setTextColor (int iFGcolor, int iBGcolor) void SGP::setColor (int icol) { + if (icol >= 0 && icol < s_iRGBColorCount) { +#if HAVE_G2_H + if (m_driver.isG2()) { + int iInk = g2_ink (m_driver.idG2(), s_aRGBColor[icol].getRed() / 255., s_aRGBColor[icol].getGreen() / 255., s_aRGBColor[icol].getBlue() / 255.); + g2_pen (m_driver.idG2(), iInk); + } +#endif +#if HAVE_WXWINDOWS + if (m_driver.isWX()) { + wxColor colour (s_aRGBColor[icol].getRed(), s_aRGBColor[icol].getGreen(), s_aRGBColor[icol].getBlue()); + wxPen pen (colour, 1, wxSOLID); + m_driver.idWX()->SetPen (pen); + } +#endif + } } void @@ -355,12 +399,17 @@ SGP::drawText (const char *pszMessage) stylusNDC (xndc, yndc, false); // move to location +#if HAVE_G2_H if (m_driver.isG2()) { - if (m_dTextAngle == 0.) - g2_string (m_driver.idG2(), m_iCurrentPhysicalX, m_iCurrentPhysicalY, const_cast(pszMessage)); + g2_string (m_driver.idG2(), m_iCurrentPhysicalX, m_iCurrentPhysicalY, const_cast(pszMessage)); } +#endif +#if HAVE_WXWINDOWS if (m_driver.isWX()) { + wxString str (pszMessage); + m_driver.idWX()->DrawRotatedText (str, m_iCurrentPhysicalX, m_iCurrentPhysicalY, m_dTextAngle); } +#endif } diff --git a/libctsim/array2dfile.cpp b/libctsim/array2dfile.cpp index f0f19ab..424ec23 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.7 2000/07/23 01:49:03 kevin Exp $ +** $Id: array2dfile.cpp,v 1.8 2000/07/29 19:50:08 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 @@ -199,12 +199,9 @@ Array2dFile::init (void) void Array2dFile::setArraySize (int x, int y, int pixelSize, int pixelFormat) { - m_nx = x; - m_ny = y; m_pixelSize = pixelSize; - m_arraySize = m_nx * m_ny * m_pixelSize; m_pixelFormat = pixelFormat; - allocArray (); + setArraySize (x, y); } void diff --git a/libctsim/phantom.cpp b/libctsim/phantom.cpp index d16bf5b..ac0fa4a 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.12 2000/07/28 10:51:31 kevin Exp $ +** $Id: phantom.cpp,v 1.13 2000/07/29 19:50:08 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 @@ -328,17 +328,16 @@ void Phantom::draw (SGP& sgp) const { double wsize = m_xmax - m_xmin; - double xmin = m_xmin; - double ymin = m_ymin; - if ((m_ymax - m_ymin) > wsize) wsize = m_ymax - m_ymin; wsize *= 1.01; + double halfWindow = wsize / 2; + + double xcent = m_xmin + (m_xmax - m_xmin) / 2; + double ycent = m_ymin + (m_ymax - m_ymin) / 2; - double xmax = xmin + wsize; - double ymax = ymin + wsize; + sgp.setWindow (xcent - halfWindow, ycent - halfWindow, xcent + halfWindow, ycent + halfWindow); - sgp.setWindow (xmin, ymin, xmax, ymax); for (PElemIterator i = m_listPElem.begin(); i != m_listPElem.end(); i++) sgp.polylineAbs ((*i)->xOutline(), (*i)->yOutline(), (*i)->nOutlinePoints()); } diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index e5d19a3..7d3e814 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.17 2000/07/28 10:51:31 kevin Exp $ +** $Id: projections.cpp,v 1.18 2000/07/29 19:50:08 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 @@ -530,6 +530,7 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi SGP sgp (sgpDriver); EZPlot ezplot (sgp); + ezplot.ezset ("title Filter Response"); ezplot.addCurve (plot_xaxis, filter.getFilter(), nVecFilter); ezplot.plot(); cio_put_str ("Press any key to continue"); @@ -556,54 +557,51 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi filter.filterSignal (detval, filteredProj); + + +#ifdef HAVE_BSPLINE_INTERP + if (interp_type == I_BSPLINE) + bspline (m_nDet, zoom_factor, spline_order, filteredProj, filteredProj); + +#ifdef HAVE_SGP + if (trace >= TRACE_PLOT && interp_type == I_BSPLINE) { + bspline (m_nDet, zoom_factor, spline_order, filteredProj, filteredProj); + ezplot_1d (filteredProj, n_filteredProj); + } +#endif +#endif + + bj.BackprojectView (filteredProj, darray.viewAngle()); + #ifdef HAVE_SGP - if (trace >= TRACE_PLOT) { + if (trace >= TRACE_PLOT) { SGPDriver sgpDriverProj ("Projection"); SGP sgpProj (sgpDriverProj); EZPlot ezplotProj (sgpProj); ezplotProj.ezset ("clear"); + ezplotProj.ezset ("title Filtered Projection"); ezplotProj.ezset ("xticks major 5."); ezplotProj.ezset ("xlabel "); ezplotProj.ezset ("ylabel "); - ezplotProj.ezset ("xlength .5."); + ezplotProj.ezset ("yporigin .5."); + ezplotProj.ezset ("ylength .5."); ezplotProj.ezset ("box."); ezplotProj.ezset ("grid."); - ezplotProj.addCurve (detval, plot_xaxis, m_nDet); + ezplotProj.addCurve (plot_xaxis, detval, m_nDet); ezplotProj.plot(); ezplotProj.ezset ("clear"); ezplotProj.ezset ("xticks major 5."); ezplotProj.ezset ("xlabel "); ezplotProj.ezset ("ylabel "); - ezplotProj.ezset ("xporigin .5."); - ezplotProj.ezset ("xlength .5."); + ezplotProj.ezset ("ylength .5."); ezplotProj.ezset ("box"); ezplotProj.ezset ("grid"); - ezplotProj.addCurve (filteredProj, plot_xaxis, n_filteredProj); + ezplotProj.addCurve (plot_xaxis, filteredProj, n_filteredProj); ezplotProj.plot(); - cout << "Press enter to continue\n"; - cio_kb_getc(); - } -#endif //HAVE_SGP -#ifdef HAVE_BSPLINE_INTERP - if (interp_type == I_BSPLINE) - bspline (m_nDet, zoom_factor, spline_order, filteredProj, filteredProj); - -#ifdef HAVE_SGP - if (trace >= TRACE_PLOT && interp_type == I_BSPLINE) { - bspline (m_nDet, zoom_factor, spline_order, filteredProj, filteredProj); - ezplot_1d (filteredProj, n_filteredProj); - } -#endif -#endif - - bj.BackprojectView (filteredProj, darray.viewAngle()); - -#ifdef HAVE_SGP - if (trace >= TRACE_PLOT) { + cout << "Do you want to exit with current pic (y/n)? " << flush; char str[256]; - printf ("Do you want to exit with current pic (y/n) -- "); fgets(str, sizeof(str), stdin); if (tolower(str[0]) == 'y') { break; diff --git a/libctsim/scanner.cpp b/libctsim/scanner.cpp index d4a398e..e39fca5 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.6 2000/07/28 08:28:08 kevin Exp $ +** $Id: scanner.cpp,v 1.7 2000/07/29 19:50:08 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 @@ -217,8 +217,8 @@ Scanner::collectProjections (Projections& proj, const Phantom& phm, const int st pSGP->moveAbs (0., 0.); pSGP->drawCircle (wsize); // raysum_trace_menu_column = (crt->xsize * crt->asp) / 8 + 3; - traceShowParam ("X-Ray Simulator", "%s", RAYSUM_TRACE_ROW_TITLE, 8+C_LTWHITE, " "); - traceShowParam ("---------------", "%s", RAYSUM_TRACE_ROW_TITLE2, 8+C_LTWHITE, " "); + traceShowParam ("X-Ray Simulator", "%s", RAYSUM_TRACE_ROW_TITLE, C_BLACK, " "); + traceShowParam ("---------------", "%s", RAYSUM_TRACE_ROW_TITLE2, C_BLACK, " "); traceShowParam ("Phantom:", "%s", RAYSUM_TRACE_ROW_PHANT_ID, C_YELLOW, " Herman"); traceShowParam ("Chomaticity :", "%s", RAYSUM_TRACE_ROW_CHROMATIC, C_LTGREEN, "Mono"); traceShowParam ("Scatter :", "%5.1f", RAYSUM_TRACE_ROW_SCATTER, C_LTGREEN, 0.); diff --git a/src/Makefile.am b/src/Makefile.am index 7130377..f3fab1e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,7 @@ bin_PROGRAMS=ctsim ctsim_SOURCES=ctsim.cpp docs.cpp views.cpp dialogs.cpp ctsim.h docs.h views.h dialogs.h ctsim_DEPENDENCIES=../libctgraphics/libctgraphics.a ../libctsupport/libctsupport.a ../libctsim/libctsim.a ../include/ct.h -ctsim_LDADD=-L../libctgraphics -L../libctsupport -L../libctsim @wxlibs@ +ctsim_LDADD=-L../libctgraphics -L../libctsupport -L../libctsim @ctlibs@ diff --git a/src/views.cpp b/src/views.cpp index 8ec1df2..87e9e93 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.9 2000/07/28 08:28:08 kevin Exp $ +** $Id: views.cpp,v 1.10 2000/07/29 19:50:08 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 @@ -297,7 +297,7 @@ ImageFileView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) ) imageData[baseAddr] = imageData[baseAddr+1] = imageData[baseAddr+2] = intensity; } } - wxImage image (ny, nx, imageData, true); + wxImage image (nx, ny, imageData, true); m_bitmap = image.ConvertToBitmap(); delete imageData; int xSize = nx; @@ -562,6 +562,7 @@ PhantomView::OnDraw (wxDC* dc) SGPDriver driver (dc, "", xsize, ysize); SGP sgp (driver); const Phantom& rPhantom = GetDocument()->getPhantom(); + sgp.setColor (C_RED); rPhantom.draw (sgp); }