Changeset 2742
- Timestamp:
- Dec 27, 2011, 12:41:24 PM (13 years ago)
- Location:
- branches/blt4
- Files:
-
- 16 added
- 47 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blt4/aclocal.m4
r2279 r2742 8 8 builtin(include,./cf/rpLangJava.m4) 9 9 builtin(include,./cf/rpLangMatlab.m4) 10 builtin(include,./cf/rpLangR.m4) -
branches/blt4/configure
r2714 r2742 609 609 TK_VERSION 610 610 TK_XLIBSW 611 TCL_SHLIB_LDFLAGS612 TCL_SHLIB_LD613 TCL_SHLIB_SUFFIX614 TCL_SHLIB_CFLAGS615 TCL_CFLAGS_DEBUG616 611 TK_LIB_SPEC 617 612 TK_INC_SPEC 618 613 TCL_VERSION 614 TCL_SHLIB_SUFFIX 615 TCL_SHLIB_LDFLAGS 616 TCL_SHLIB_LD 617 TCL_SHLIB_CFLAGS 618 TCL_CFLAGS_OPTIMIZE 619 TCL_CFLAGS_DEBUG 619 620 TCL_LIB_SPEC 620 621 TCL_INC_SPEC … … 673 674 SED 674 675 RUBY 676 R 675 677 JAVAH 676 678 JAVAC … … 785 787 with_tclsh 786 788 with_vtk 787 with_ncurses788 789 with_matlab 789 790 with_octave … … 793 794 with_python 794 795 with_java 796 with_R 795 797 with_ruby 796 798 enable_shared … … 1439 1441 --with-tclsh=DIR location of tclsh [default=yes] 1440 1442 --with-vtk=DIR location of vtk library [default=yes] 1441 --with-ncurses=DIR location of ncurses [default=yes]1442 1443 --with-matlab=DIR location of matlab and mex compiler [default=yes] 1443 1444 --with-octave=DIR path of default octave compiler `mkoctfile' … … 1448 1449 --with-python=DIR location of python [default=yes] 1449 1450 --with-java=DIR location of java [default=yes] 1451 --with-R=DIR location of R interpreter [default=yes] 1450 1452 --with-ruby=DIR location of ruby [default=yes] 1451 1453 … … 7445 7447 $as_echo "$VTKDIR" >&6; } 7446 7448 7447 with_ncurses="yes"7448 7449 # Check whether --with-ncurses was given.7450 if test "${with_ncurses+set}" = set; then :7451 withval=$with_ncurses;7452 else7453 with_ncurses=yes7454 fi7455 7456 7457 if test "$with_vtk" != "no" ; then7458 if test "$with_vtk" = "yes" ; then7459 for path in \7460 $libdir \7461 $prefix/lib \7462 $exec_prefix/lib \7463 /usr/lib7464 do7465 for vtk in $path/vtk-* ; do7466 if test -d "${vtk}" ; then7467 VTKDIR=${vtk}7468 fi7469 done7470 if test "x${VTKDIR}" != "x" ; then7471 break7472 fi7473 done7474 fi7475 fi7476 7477 7449 7478 7450 … … 8643 8615 done 8644 8616 fi 8617 8618 8619 8620 # Check whether --with-R was given. 8621 if test "${with_R+set}" = set; then : 8622 withval=$with_R; 8623 else 8624 with_R=yes 8625 fi 8626 8627 8628 R="" 8629 if test "$with_R" != "no" ; then 8630 if test "$with_R" = "yes" ; then 8631 # Extract the first word of "R", so it can be a program name with args. 8632 set dummy R; ac_word=$2 8633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8634 $as_echo_n "checking for $ac_word... " >&6; } 8635 if ${ac_cv_path_R+:} false; then : 8636 $as_echo_n "(cached) " >&6 8637 else 8638 case $R in 8639 [\\/]* | ?:[\\/]*) 8640 ac_cv_path_R="$R" # Let the user override the test with a path. 8641 ;; 8642 *) 8643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8644 for as_dir in $PATH 8645 do 8646 IFS=$as_save_IFS 8647 test -z "$as_dir" && as_dir=. 8648 for ac_exec_ext in '' $ac_executable_extensions; do 8649 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 8650 ac_cv_path_R="$as_dir/$ac_word$ac_exec_ext" 8651 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8652 break 2 8653 fi 8654 done 8655 done 8656 IFS=$as_save_IFS 8657 8658 ;; 8659 esac 8660 fi 8661 R=$ac_cv_path_R 8662 if test -n "$R"; then 8663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $R" >&5 8664 $as_echo "$R" >&6; } 8665 else 8666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8667 $as_echo "no" >&6; } 8668 fi 8669 8670 8671 else 8672 # Extract the first word of "R", so it can be a program name with args. 8673 set dummy R; ac_word=$2 8674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8675 $as_echo_n "checking for $ac_word... " >&6; } 8676 if ${ac_cv_path_R+:} false; then : 8677 $as_echo_n "(cached) " >&6 8678 else 8679 case $R in 8680 [\\/]* | ?:[\\/]*) 8681 ac_cv_path_R="$R" # Let the user override the test with a path. 8682 ;; 8683 *) 8684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8685 as_dummy="${with_R}/bin:${with_R}" 8686 for as_dir in $as_dummy 8687 do 8688 IFS=$as_save_IFS 8689 test -z "$as_dir" && as_dir=. 8690 for ac_exec_ext in '' $ac_executable_extensions; do 8691 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 8692 ac_cv_path_R="$as_dir/$ac_word$ac_exec_ext" 8693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8694 break 2 8695 fi 8696 done 8697 done 8698 IFS=$as_save_IFS 8699 8700 ;; 8701 esac 8702 fi 8703 R=$ac_cv_path_R 8704 if test -n "$R"; then 8705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $R" >&5 8706 $as_echo "$R" >&6; } 8707 else 8708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8709 $as_echo "no" >&6; } 8710 fi 8711 8712 8713 fi 8714 fi 8715 8645 8716 8646 8717 … … 9539 9610 #-------------------------------------------------------------------- 9540 9611 9541 for ac_header in ffmpeg/avcodec.h 9612 for ac_header in ffmpeg/avcodec.h libavcodec/avcodec.h ffmpeg/avformat.h libavformat/avformat.h ffmpeg/avutil.h libavutil/avutil.h 9542 9613 do : 9543 ac_fn_cxx_check_header_compile "$LINENO" "ffmpeg/avcodec.h" "ac_cv_header_ffmpeg_avcodec_h" "#define __STDC_CONSTANT_MACROS 1 9544 #ifdef HAVE_FFMPEG_AVCODEC_H 9545 # include <ffmpeg/avcodec.h> 9546 #endif 9614 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 9615 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " 9616 #define __STDC_CONSTANT_MACROS 1 9547 9617 9548 9618 " 9549 if test "x$ac_cv_header_ffmpeg_avcodec_h" = xyes; then :9619 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 9550 9620 cat >>confdefs.h <<_ACEOF 9551 #define HAVE_FFMPEG_AVCODEC_H 1 9552 _ACEOF 9553 9554 fi 9555 9556 done 9557 9558 9559 for ac_header in libavcodec/avcodec.h 9560 do : 9561 ac_fn_cxx_check_header_compile "$LINENO" "libavcodec/avcodec.h" "ac_cv_header_libavcodec_avcodec_h" "#define __STDC_CONSTANT_MACROS 1 9562 #ifdef HAVE_LIBAVCODEC_AVCODEC_H 9563 # include <libavcodec/avcodec.h> 9564 #endif 9565 9566 " 9567 if test "x$ac_cv_header_libavcodec_avcodec_h" = xyes; then : 9568 cat >>confdefs.h <<_ACEOF 9569 #define HAVE_LIBAVCODEC_AVCODEC_H 1 9570 _ACEOF 9571 9572 fi 9573 9574 done 9575 9576 9577 for ac_header in ffmpeg/avformat.h 9578 do : 9579 ac_fn_cxx_check_header_compile "$LINENO" "ffmpeg/avformat.h" "ac_cv_header_ffmpeg_avformat_h" "#define __STDC_CONSTANT_MACROS 1 9580 #ifdef HAVE_FFMPEG_AVFORMAT_H 9581 # include <ffmpeg/avformat.h> 9582 #endif 9583 9584 " 9585 if test "x$ac_cv_header_ffmpeg_avformat_h" = xyes; then : 9586 cat >>confdefs.h <<_ACEOF 9587 #define HAVE_FFMPEG_AVFORMAT_H 1 9588 _ACEOF 9589 9590 fi 9591 9592 done 9593 9594 9595 for ac_header in libavformat/avformat.h 9596 do : 9597 ac_fn_cxx_check_header_compile "$LINENO" "libavformat/avformat.h" "ac_cv_header_libavformat_avformat_h" "#define __STDC_CONSTANT_MACROS 1 9598 #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H 9599 # include <libavformat/avformat.h> 9600 #endif 9601 9602 " 9603 if test "x$ac_cv_header_libavformat_avformat_h" = xyes; then : 9604 cat >>confdefs.h <<_ACEOF 9605 #define HAVE_LIBAVFORMAT_AVFORMAT_H 1 9606 _ACEOF 9607 9608 fi 9609 9610 done 9611 9612 9613 for ac_header in ffmpeg/avutil.h 9614 do : 9615 ac_fn_cxx_check_header_compile "$LINENO" "ffmpeg/avutil.h" "ac_cv_header_ffmpeg_avutil_h" "#define __STDC_CONSTANT_MACROS 1 9616 #ifdef HAVE_FFMPEG_AVUTIL_H 9617 # include <ffmpeg/avutil.h> 9618 #endif 9619 9620 " 9621 if test "x$ac_cv_header_ffmpeg_avutil_h" = xyes; then : 9622 cat >>confdefs.h <<_ACEOF 9623 #define HAVE_FFMPEG_AVUTIL_H 1 9624 _ACEOF 9625 9626 fi 9627 9628 done 9629 9630 9631 for ac_header in libavutil/avutil.h 9632 do : 9633 ac_fn_cxx_check_header_compile "$LINENO" "libavutil/avutil.h" "ac_cv_header_libavutil_avutil_h" "#define __STDC_CONSTANT_MACROS 1 9634 #ifdef HAVE_LIBAVUTIL_AVUTIL_H 9635 # include <libavutil/avutil.h> 9636 #endif 9637 9638 " 9639 if test "x$ac_cv_header_libavutil_avutil_h" = xyes; then : 9640 cat >>confdefs.h <<_ACEOF 9641 #define HAVE_LIBAVUTIL_AVUTIL_H 1 9642 _ACEOF 9643 9644 fi 9645 9646 done 9647 9648 9649 for ac_header in ffmpeg/swscale.h 9650 do : 9651 ac_fn_cxx_check_header_compile "$LINENO" "ffmpeg/swscale.h" "ac_cv_header_ffmpeg_swscale_h" "#define __STDC_CONSTANT_MACROS 1 9652 #ifdef HAVE_FFMPEG_SWSCALE_H 9653 # include <ffmpeg/swscale.h> 9654 #endif 9655 9656 " 9657 if test "x$ac_cv_header_ffmpeg_swscale_h" = xyes; then : 9658 cat >>confdefs.h <<_ACEOF 9659 #define HAVE_FFMPEG_SWSCALE_H 1 9660 _ACEOF 9661 9662 fi 9663 9664 done 9665 9666 9667 for ac_header in libswscale/swscale.h 9668 do : 9669 ac_fn_cxx_check_header_compile "$LINENO" "libswscale/swscale.h" "ac_cv_header_libswscale_swscale_h" "#define __STDC_CONSTANT_MACROS 1 9670 #ifdef HAVE_LIBSWSCALE_SWSCALE_H 9671 # include <libswscale/swscale.h> 9672 #endif 9673 9674 " 9675 if test "x$ac_cv_header_libswscale_swscale_h" = xyes; then : 9676 cat >>confdefs.h <<_ACEOF 9677 #define HAVE_LIBSWSCALE_SWSCALE_H 1 9621 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 9678 9622 _ACEOF 9679 9623 … … 9698 9642 9699 9643 fi 9700 fi 9701 9702 for ac_func in img_convert 9644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavcodec" >&5 9645 $as_echo_n "checking for main in -lavcodec... " >&6; } 9646 if ${ac_cv_lib_avcodec_main+:} false; then : 9647 $as_echo_n "(cached) " >&6 9648 else 9649 ac_check_lib_save_LIBS=$LIBS 9650 LIBS="-lavcodec $LIBS" 9651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9652 /* end confdefs.h. */ 9653 9654 9655 int 9656 main () 9657 { 9658 return main (); 9659 ; 9660 return 0; 9661 } 9662 _ACEOF 9663 if ac_fn_cxx_try_link "$LINENO"; then : 9664 ac_cv_lib_avcodec_main=yes 9665 else 9666 ac_cv_lib_avcodec_main=no 9667 fi 9668 rm -f core conftest.err conftest.$ac_objext \ 9669 conftest$ac_exeext conftest.$ac_ext 9670 LIBS=$ac_check_lib_save_LIBS 9671 fi 9672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avcodec_main" >&5 9673 $as_echo "$ac_cv_lib_avcodec_main" >&6; } 9674 if test "x$ac_cv_lib_avcodec_main" = xyes; then : 9675 cat >>confdefs.h <<_ACEOF 9676 #define HAVE_LIBAVCODEC 1 9677 _ACEOF 9678 9679 LIBS="-lavcodec $LIBS" 9680 9681 else 9682 as_fn_error $? "librappture requires libavcodec" "$LINENO" 5 9683 fi 9684 9685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavutil" >&5 9686 $as_echo_n "checking for main in -lavutil... " >&6; } 9687 if ${ac_cv_lib_avutil_main+:} false; then : 9688 $as_echo_n "(cached) " >&6 9689 else 9690 ac_check_lib_save_LIBS=$LIBS 9691 LIBS="-lavutil $LIBS" 9692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9693 /* end confdefs.h. */ 9694 9695 9696 int 9697 main () 9698 { 9699 return main (); 9700 ; 9701 return 0; 9702 } 9703 _ACEOF 9704 if ac_fn_cxx_try_link "$LINENO"; then : 9705 ac_cv_lib_avutil_main=yes 9706 else 9707 ac_cv_lib_avutil_main=no 9708 fi 9709 rm -f core conftest.err conftest.$ac_objext \ 9710 conftest$ac_exeext conftest.$ac_ext 9711 LIBS=$ac_check_lib_save_LIBS 9712 fi 9713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avutil_main" >&5 9714 $as_echo "$ac_cv_lib_avutil_main" >&6; } 9715 if test "x$ac_cv_lib_avutil_main" = xyes; then : 9716 cat >>confdefs.h <<_ACEOF 9717 #define HAVE_LIBAVUTIL 1 9718 _ACEOF 9719 9720 LIBS="-lavutil $LIBS" 9721 9722 else 9723 as_fn_error $? "librappture requires libavutil" "$LINENO" 5 9724 fi 9725 9726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavformat" >&5 9727 $as_echo_n "checking for main in -lavformat... " >&6; } 9728 if ${ac_cv_lib_avformat_main+:} false; then : 9729 $as_echo_n "(cached) " >&6 9730 else 9731 ac_check_lib_save_LIBS=$LIBS 9732 LIBS="-lavformat $LIBS" 9733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9734 /* end confdefs.h. */ 9735 9736 9737 int 9738 main () 9739 { 9740 return main (); 9741 ; 9742 return 0; 9743 } 9744 _ACEOF 9745 if ac_fn_cxx_try_link "$LINENO"; then : 9746 ac_cv_lib_avformat_main=yes 9747 else 9748 ac_cv_lib_avformat_main=no 9749 fi 9750 rm -f core conftest.err conftest.$ac_objext \ 9751 conftest$ac_exeext conftest.$ac_ext 9752 LIBS=$ac_check_lib_save_LIBS 9753 fi 9754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avformat_main" >&5 9755 $as_echo "$ac_cv_lib_avformat_main" >&6; } 9756 if test "x$ac_cv_lib_avformat_main" = xyes; then : 9757 cat >>confdefs.h <<_ACEOF 9758 #define HAVE_LIBAVFORMAT 1 9759 _ACEOF 9760 9761 LIBS="-lavformat $LIBS" 9762 9763 else 9764 as_fn_error $? "librappture requires libavformat" "$LINENO" 5 9765 fi 9766 9767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lswscale" >&5 9768 $as_echo_n "checking for main in -lswscale... " >&6; } 9769 if ${ac_cv_lib_swscale_main+:} false; then : 9770 $as_echo_n "(cached) " >&6 9771 else 9772 ac_check_lib_save_LIBS=$LIBS 9773 LIBS="-lswscale $LIBS" 9774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9775 /* end confdefs.h. */ 9776 9777 9778 int 9779 main () 9780 { 9781 return main (); 9782 ; 9783 return 0; 9784 } 9785 _ACEOF 9786 if ac_fn_cxx_try_link "$LINENO"; then : 9787 ac_cv_lib_swscale_main=yes 9788 else 9789 ac_cv_lib_swscale_main=no 9790 fi 9791 rm -f core conftest.err conftest.$ac_objext \ 9792 conftest$ac_exeext conftest.$ac_ext 9793 LIBS=$ac_check_lib_save_LIBS 9794 fi 9795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_swscale_main" >&5 9796 $as_echo "$ac_cv_lib_swscale_main" >&6; } 9797 if test "x$ac_cv_lib_swscale_main" = xyes; then : 9798 cat >>confdefs.h <<_ACEOF 9799 #define HAVE_LIBSWSCALE 1 9800 _ACEOF 9801 9802 LIBS="-lswscale $LIBS" 9803 9804 fi 9805 9806 for ac_func in avcodec_decode_video2 9807 do : 9808 ac_fn_cxx_check_func "$LINENO" "avcodec_decode_video2" "ac_cv_func_avcodec_decode_video2" 9809 if test "x$ac_cv_func_avcodec_decode_video2" = xyes; then : 9810 cat >>confdefs.h <<_ACEOF 9811 #define HAVE_AVCODEC_DECODE_VIDEO2 1 9812 _ACEOF 9813 9814 fi 9815 done 9816 9817 for ac_func in avcodec_decode_video 9818 do : 9819 ac_fn_cxx_check_func "$LINENO" "avcodec_decode_video" "ac_cv_func_avcodec_decode_video" 9820 if test "x$ac_cv_func_avcodec_decode_video" = xyes; then : 9821 cat >>confdefs.h <<_ACEOF 9822 #define HAVE_AVCODEC_DECODE_VIDEO 1 9823 _ACEOF 9824 9825 fi 9826 done 9827 9828 for ac_func in avformat_open_input 9829 do : 9830 ac_fn_cxx_check_func "$LINENO" "avformat_open_input" "ac_cv_func_avformat_open_input" 9831 if test "x$ac_cv_func_avformat_open_input" = xyes; then : 9832 cat >>confdefs.h <<_ACEOF 9833 #define HAVE_AVFORMAT_OPEN_INPUT 1 9834 _ACEOF 9835 9836 fi 9837 done 9838 9839 for ac_func in av_open_input_file 9840 do : 9841 ac_fn_cxx_check_func "$LINENO" "av_open_input_file" "ac_cv_func_av_open_input_file" 9842 if test "x$ac_cv_func_av_open_input_file" = xyes; then : 9843 cat >>confdefs.h <<_ACEOF 9844 #define HAVE_AV_OPEN_INPUT_FILE 1 9845 _ACEOF 9846 9847 fi 9848 done 9849 9850 for ac_func in avio_close 9851 do : 9852 ac_fn_cxx_check_func "$LINENO" "avio_close" "ac_cv_func_avio_close" 9853 if test "x$ac_cv_func_avio_close" = xyes; then : 9854 cat >>confdefs.h <<_ACEOF 9855 #define HAVE_AVIO_CLOSE 1 9856 _ACEOF 9857 9858 fi 9859 done 9860 9861 for ac_func in url_close 9862 do : 9863 ac_fn_cxx_check_func "$LINENO" "url_close" "ac_cv_func_url_close" 9864 if test "x$ac_cv_func_url_close" = xyes; then : 9865 cat >>confdefs.h <<_ACEOF 9866 #define HAVE_URL_CLOSE 1 9867 _ACEOF 9868 9869 fi 9870 done 9871 9872 ac_fn_cxx_check_func "$LINENO" "av_find_stream_info" "ac_cv_func_av_find_stream_info" 9873 if test "x$ac_cv_func_av_find_stream_info" = xyes; then : 9874 9875 else 9876 as_fn_error $? "oops! no av_find_stream_info?!?" "$LINENO" 5 9877 fi 9878 9879 ac_fn_cxx_check_func "$LINENO" "avcodec_find_decoder" "ac_cv_func_avcodec_find_decoder" 9880 if test "x$ac_cv_func_avcodec_find_decoder" = xyes; then : 9881 9882 else 9883 as_fn_error $? "oops! no av_codec_find_decoder ?!?" "$LINENO" 5 9884 fi 9885 9886 ac_fn_cxx_check_func "$LINENO" "avcodec_open" "ac_cv_func_avcodec_open" 9887 if test "x$ac_cv_func_avcodec_open" = xyes; then : 9888 9889 else 9890 as_fn_error $? "oops! avcodec_open ?!?" "$LINENO" 5 9891 fi 9892 9893 ac_fn_cxx_check_func "$LINENO" "avcodec_alloc_frame" "ac_cv_func_avcodec_alloc_frame" 9894 if test "x$ac_cv_func_avcodec_alloc_frame" = xyes; then : 9895 9896 else 9897 as_fn_error $? "oops! no avcode_alloc_frame ?!?" "$LINENO" 5 9898 fi 9899 9900 ac_fn_cxx_check_func "$LINENO" "av_rescale_q" "ac_cv_func_av_rescale_q" 9901 if test "x$ac_cv_func_av_rescale_q" = xyes; then : 9902 9903 else 9904 as_fn_error $? "oops! no av_rescale_q ?!?" "$LINENO" 5 9905 fi 9906 9907 ac_fn_cxx_check_func "$LINENO" "av_read_frame" "ac_cv_func_av_read_frame" 9908 if test "x$ac_cv_func_av_read_frame" = xyes; then : 9909 9910 else 9911 as_fn_error $? "oops! av_read_frame ?!?" "$LINENO" 5 9912 fi 9913 9914 ac_fn_cxx_check_func "$LINENO" "av_free" "ac_cv_func_av_free" 9915 if test "x$ac_cv_func_av_free" = xyes; then : 9916 9917 else 9918 as_fn_error $? "oops! no av_frame ?!?" "$LINENO" 5 9919 fi 9920 9921 ac_fn_cxx_check_func "$LINENO" "avcodec_default_release_buffer" "ac_cv_func_avcodec_default_release_buffer" 9922 if test "x$ac_cv_func_avcodec_default_release_buffer" = xyes; then : 9923 9924 else 9925 as_fn_error $? "oops! no avcode_default_release_buffer ?!?" "$LINENO" 5 9926 fi 9927 9928 ac_fn_cxx_check_func "$LINENO" "avpicture_get_size" "ac_cv_func_avpicture_get_size" 9929 if test "x$ac_cv_func_avpicture_get_size" = xyes; then : 9930 9931 else 9932 as_fn_error $? "oops! no avpicture_get_size ?!?" "$LINENO" 5 9933 fi 9934 9935 ac_fn_cxx_check_func "$LINENO" "avpicture_fill" "ac_cv_func_avpicture_fill" 9936 if test "x$ac_cv_func_avpicture_fill" = xyes; then : 9937 9938 else 9939 as_fn_error $? "oops! no avpicture_fill ?!?" "$LINENO" 5 9940 fi 9941 9942 for ac_func in sws_getCachedContext 9943 do : 9944 ac_fn_cxx_check_func "$LINENO" "sws_getCachedContext" "ac_cv_func_sws_getCachedContext" 9945 if test "x$ac_cv_func_sws_getCachedContext" = xyes; then : 9946 cat >>confdefs.h <<_ACEOF 9947 #define HAVE_SWS_GETCACHEDCONTEXT 1 9948 _ACEOF 9949 9950 fi 9951 done 9952 9953 for ac_func in img_convert 9703 9954 do : 9704 9955 ac_fn_cxx_check_func "$LINENO" "img_convert" "ac_cv_func_img_convert" … … 9711 9962 done 9712 9963 9713 for ac_func in sws_scale9964 for ac_func in sws_scale 9714 9965 do : 9715 9966 ac_fn_cxx_check_func "$LINENO" "sws_scale" "ac_cv_func_sws_scale" … … 9722 9973 done 9723 9974 9975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9976 /* end confdefs.h. */ 9977 9978 #define __STDC_CONSTANT_MACROS 1 9979 #include <stdlib.h> 9980 #ifdef HAVE_FFMPEG_AVCODEC_H 9981 # include <ffmpeg/avcodec.h> 9982 #endif 9983 #ifdef HAVE_LIBAVCODEC_AVCODEC_H 9984 # include <libavcodec/avcodec.h> 9985 #endif 9986 int x = AVMEDIA_TYPE_VIDEO; 9987 9988 int 9989 main () 9990 { 9991 9992 ; 9993 return 0; 9994 } 9995 _ACEOF 9996 if ac_fn_cxx_try_compile "$LINENO"; then : 9997 ac_avmedia_type_video="yes" 9998 else 9999 ac_avmedia_type_video="no" 10000 fi 10001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10002 if test "$ac_avmedia_type_video" == "yes" ; then 10003 10004 $as_echo "#define HAVE_AVMEDIA_TYPE_VIDEO 1" >>confdefs.h 10005 10006 fi 10007 fi 9724 10008 9725 10009 … … 9801 10085 9802 10086 10087 10088 10089 10090 10091 10092 10093 9803 10094 ac_configure_args="--disable-threads --enable-shared" 9804 10095 … … 9807 10098 9808 10099 9809 ac_config_files="$ac_config_files Makefile packages/Makefile src/Makefile src/core/Makefile src/core2/Makefile src/objects/Makefile src/objects/RpHash.h gui/Makefile gui/apps/Makefile gui/apps/about gui/apps/encodedata gui/apps/rappture gui/apps/rappture-csh.env gui/apps/rappture.env gui/apps/rappture.use gui/apps/rerun gui/apps/simsim gui/apps/xmldiff gui/pkgIndex.tcl gui/scripts/Makefile gui/src/Makefile builder/Makefile builder/pkgIndex.tcl builder/scripts/Makefile tester/Makefile tester/pkgIndex.tcl tester/scripts/Makefile lang/Makefile lang/java/Makefile lang/java/rappture/Makefile lang/perl/Makefile lang/perl/Makefile.PL lang/python/Makefile lang/python/setup.py lang/matlab/Makefile lang/octave/Makefile lang/octave/octave2/Makefile lang/octave/octave3/Makefile lang/ ruby/Makefile lang/ruby/build.rb lang/tcl/Makefile lang/tcl/pkgIndex.tcl lang/tcl/src/Makefile lang/tcl/scripts/Makefile lang/tcl/tests/Makefile lib/Makefile examples/3D/Makefile examples/Makefile examples/app-fermi/2.0/Makefile examples/app-fermi/Makefile examples/app-fermi/cee/Makefile examples/app-fermi/fortran/Makefile examples/app-fermi/java/Makefile examples/app-fermi/matlab/Makefile examples/app-fermi/matlab/compiled/Makefile examples/app-fermi/matlab/uncompiled/Makefile examples/app-fermi/octave/octave2/Makefile examples/app-fermi/octave/octave3/Makefile examples/app-fermi/octave/Makefile examples/app-fermi/perl/Makefile examples/app-fermi/python/Makefile examples/app-fermi/ruby/Makefile examples/app-fermi/tcl/Makefile examples/app-fermi/wrapper/Makefile examples/app-fermi/wrapper/cee/Makefile examples/app-fermi/wrapper/perl/Makefile examples/app-fermi/wrapper/python/Makefile examples/app-fermi/wrapper/tcl/Makefile examples/c-example/Makefile examples/canvas/Makefile examples/demo.bash examples/flow/Makefile examples/flow/demo1/Makefile examples/flow/demo2/Makefile examples/flow/demo3/Makefile examples/graph/Makefile examples/objects/Makefile examples/objects/axis/Makefile examples/objects/contour/Makefile examples/objects/curve/Makefile examples/objects/dxWriter/Makefile examples/objects/floatBuffer/Makefile examples/objects/histogram/Makefile examples/objects/library/Makefile examples/objects/number/Makefile examples/objects/path/Makefile examples/objects/plot/Makefile examples/objects/scatter/Makefile examples/objects/string/Makefile examples/objects/tree/Makefile examples/objects/xmlparser/Makefile examples/zoo/Makefile examples/zoo/binary/Makefile examples/zoo/boolean/Makefile examples/zoo/choice/Makefile examples/zoo/cloud/Makefile examples/zoo/cloud/matlab/Makefile examples/zoo/curve/Makefile examples/zoo/datatable/Makefile examples/zoo/datatable/matlab/Makefile examples/zoo/enable/Makefile examples/zoo/field/Makefile examples/zoo/filechoice/Makefile examples/zoo/group/Makefile examples/zoo/histogram/Makefile examples/zoo/image/Makefile examples/zoo/image/docs/Makefile examples/zoo/image/examples/Makefile examples/zoo/integer/Makefile examples/zoo/integer2/Makefile examples/zoo/loader/Makefile examples/zoo/loader/examples/Makefile examples/zoo/loadrun/Makefile examples/zoo/log/Makefile examples/zoo/note/Makefile examples/zoo/note/docs/Makefile examples/zoo/number/Makefile examples/zoo/number2/Makefile examples/zoo/parallelepiped/Makefile examples/zoo/periodicelement/Makefile examples/zoo/phase/Makefile examples/zoo/sequence/Makefile examples/zoo/sequence/examples/Makefile examples/zoo/string/Makefile examples/zoo/structure/Makefile examples/zoo/structure/examples/Makefile examples/zoo/table/Makefile examples/zoo/unirect2d/Makefile oldtest/Makefile oldtest/src/Makefile"10100 ac_config_files="$ac_config_files Makefile packages/Makefile src/Makefile src/core/Makefile src/core2/Makefile src/objects/Makefile src/objects/RpHash.h gui/Makefile gui/apps/Makefile gui/apps/about gui/apps/encodedata gui/apps/rappture gui/apps/rappture-csh.env gui/apps/rappture.env gui/apps/rappture.use gui/apps/rerun gui/apps/simsim gui/apps/xmldiff gui/pkgIndex.tcl gui/scripts/Makefile gui/src/Makefile builder/Makefile builder/pkgIndex.tcl builder/scripts/Makefile tester/Makefile tester/pkgIndex.tcl tester/scripts/Makefile lang/Makefile lang/java/Makefile lang/java/rappture/Makefile lang/perl/Makefile lang/perl/Makefile.PL lang/python/Makefile lang/python/setup.py lang/matlab/Makefile lang/octave/Makefile lang/octave/octave2/Makefile lang/octave/octave3/Makefile lang/R/Makefile lang/ruby/Makefile lang/ruby/build.rb lang/tcl/Makefile lang/tcl/pkgIndex.tcl lang/tcl/src/Makefile lang/tcl/scripts/Makefile lang/tcl/tests/Makefile lib/Makefile examples/3D/Makefile examples/Makefile examples/app-fermi/2.0/Makefile examples/app-fermi/Makefile examples/app-fermi/cee/Makefile examples/app-fermi/fortran/Makefile examples/app-fermi/java/Makefile examples/app-fermi/matlab/Makefile examples/app-fermi/matlab/compiled/Makefile examples/app-fermi/matlab/uncompiled/Makefile examples/app-fermi/octave/octave2/Makefile examples/app-fermi/octave/octave3/Makefile examples/app-fermi/octave/Makefile examples/app-fermi/perl/Makefile examples/app-fermi/python/Makefile examples/app-fermi/ruby/Makefile examples/app-fermi/tcl/Makefile examples/app-fermi/wrapper/Makefile examples/app-fermi/wrapper/cee/Makefile examples/app-fermi/wrapper/perl/Makefile examples/app-fermi/wrapper/python/Makefile examples/app-fermi/wrapper/tcl/Makefile examples/app-fermi/R/Makefile examples/c-example/Makefile examples/canvas/Makefile examples/demo.bash examples/flow/Makefile examples/flow/demo1/Makefile examples/flow/demo2/Makefile examples/flow/demo3/Makefile examples/graph/Makefile examples/objects/Makefile examples/objects/axis/Makefile examples/objects/contour/Makefile examples/objects/curve/Makefile examples/objects/dxWriter/Makefile examples/objects/floatBuffer/Makefile examples/objects/histogram/Makefile examples/objects/library/Makefile examples/objects/number/Makefile examples/objects/path/Makefile examples/objects/plot/Makefile examples/objects/scatter/Makefile examples/objects/string/Makefile examples/objects/tree/Makefile examples/objects/xmlparser/Makefile examples/zoo/Makefile examples/zoo/binary/Makefile examples/zoo/boolean/Makefile examples/zoo/choice/Makefile examples/zoo/cloud/Makefile examples/zoo/cloud/matlab/Makefile examples/zoo/curve/Makefile examples/zoo/datatable/Makefile examples/zoo/datatable/matlab/Makefile examples/zoo/enable/Makefile examples/zoo/field/Makefile examples/zoo/filechoice/Makefile examples/zoo/group/Makefile examples/zoo/histogram/Makefile examples/zoo/image/Makefile examples/zoo/image/docs/Makefile examples/zoo/image/examples/Makefile examples/zoo/integer/Makefile examples/zoo/integer2/Makefile examples/zoo/loader/Makefile examples/zoo/loader/examples/Makefile examples/zoo/loadrun/Makefile examples/zoo/log/Makefile examples/zoo/note/Makefile examples/zoo/note/docs/Makefile examples/zoo/number/Makefile examples/zoo/number2/Makefile examples/zoo/parallelepiped/Makefile examples/zoo/periodicelement/Makefile examples/zoo/phase/Makefile examples/zoo/sequence/Makefile examples/zoo/sequence/examples/Makefile examples/zoo/string/Makefile examples/zoo/structure/Makefile examples/zoo/structure/examples/Makefile examples/zoo/table/Makefile examples/zoo/unirect2d/Makefile oldtest/Makefile oldtest/src/Makefile" 9810 10101 9811 10102 cat >confcache <<\_ACEOF … … 10553 10844 "lang/octave/octave2/Makefile") CONFIG_FILES="$CONFIG_FILES lang/octave/octave2/Makefile" ;; 10554 10845 "lang/octave/octave3/Makefile") CONFIG_FILES="$CONFIG_FILES lang/octave/octave3/Makefile" ;; 10846 "lang/R/Makefile") CONFIG_FILES="$CONFIG_FILES lang/R/Makefile" ;; 10555 10847 "lang/ruby/Makefile") CONFIG_FILES="$CONFIG_FILES lang/ruby/Makefile" ;; 10556 10848 "lang/ruby/build.rb") CONFIG_FILES="$CONFIG_FILES lang/ruby/build.rb" ;; … … 10583 10875 "examples/app-fermi/wrapper/python/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/wrapper/python/Makefile" ;; 10584 10876 "examples/app-fermi/wrapper/tcl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/wrapper/tcl/Makefile" ;; 10877 "examples/app-fermi/R/Makefile") CONFIG_FILES="$CONFIG_FILES examples/app-fermi/R/Makefile" ;; 10585 10878 "examples/c-example/Makefile") CONFIG_FILES="$CONFIG_FILES examples/c-example/Makefile" ;; 10586 10879 "examples/canvas/Makefile") CONFIG_FILES="$CONFIG_FILES examples/canvas/Makefile" ;; -
branches/blt4/configure.in
r2716 r2742 166 166 fi 167 167 168 168 169 169 TCL_INC_SPEC="$TCL_INCLUDE_SPEC" 170 170 … … 200 200 AC_MSG_RESULT([$VTKDIR]) 201 201 202 with_ncurses="yes"203 AC_ARG_WITH(204 [ncurses],205 [AS_HELP_STRING([--with-ncurses[=DIR]],206 [location of ncurses @<:@default=yes@:>@])],207 [],208 [with_ncurses=yes])209 210 if test "$with_vtk" != "no" ; then211 if test "$with_vtk" = "yes" ; then212 for path in \213 $libdir \214 $prefix/lib \215 $exec_prefix/lib \216 /usr/lib217 do218 for vtk in $path/vtk-* ; do219 if test -d "${vtk}" ; then220 VTKDIR=${vtk}221 fi222 done223 if test "x${VTKDIR}" != "x" ; then224 break225 fi226 done227 fi228 fi229 230 202 RP_LANG_MATLAB 231 203 RP_LANG_OCTAVE … … 233 205 RP_LANG_PYTHON 234 206 RP_LANG_JAVA 207 RP_LANG_R 235 208 236 209 RUBY="" … … 313 286 #-------------------------------------------------------------------- 314 287 315 AC_CHECK_HEADERS(ffmpeg/avcodec.h,[],[], 316 [[#define __STDC_CONSTANT_MACROS 1 317 #ifdef HAVE_FFMPEG_AVCODEC_H 318 # include <ffmpeg/avcodec.h> 319 #endif 320 ]]) 321 322 AC_CHECK_HEADERS(libavcodec/avcodec.h,[],[], 323 [[#define __STDC_CONSTANT_MACROS 1 324 #ifdef HAVE_LIBAVCODEC_AVCODEC_H 325 # include <libavcodec/avcodec.h> 326 #endif 327 ]]) 328 329 AC_CHECK_HEADERS([ffmpeg/avformat.h],[],[], 330 [[#define __STDC_CONSTANT_MACROS 1 331 #ifdef HAVE_FFMPEG_AVFORMAT_H 332 # include <ffmpeg/avformat.h> 333 #endif 334 ]]) 335 336 AC_CHECK_HEADERS([libavformat/avformat.h],[],[], 337 [[#define __STDC_CONSTANT_MACROS 1 338 #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H 339 # include <libavformat/avformat.h> 340 #endif 341 ]]) 342 343 AC_CHECK_HEADERS([ffmpeg/avutil.h],[],[], 344 [[#define __STDC_CONSTANT_MACROS 1 345 #ifdef HAVE_FFMPEG_AVUTIL_H 346 # include <ffmpeg/avutil.h> 347 #endif 348 ]]) 349 350 AC_CHECK_HEADERS([libavutil/avutil.h],[],[], 351 [[#define __STDC_CONSTANT_MACROS 1 352 #ifdef HAVE_LIBAVUTIL_AVUTIL_H 353 # include <libavutil/avutil.h> 354 #endif 355 ]]) 356 357 AC_CHECK_HEADERS([ffmpeg/swscale.h],[],[], 358 [[#define __STDC_CONSTANT_MACROS 1 359 #ifdef HAVE_FFMPEG_SWSCALE_H 360 # include <ffmpeg/swscale.h> 361 #endif 362 ]]) 363 364 AC_CHECK_HEADERS([libswscale/swscale.h],[],[], 365 [[#define __STDC_CONSTANT_MACROS 1 366 #ifdef HAVE_LIBSWSCALE_SWSCALE_H 367 # include <libswscale/swscale.h> 368 #endif 369 ]]) 288 AC_CHECK_HEADERS([ffmpeg/avcodec.h libavcodec/avcodec.h ffmpeg/avformat.h libavformat/avformat.h ffmpeg/avutil.h libavutil/avutil.h],,,[ 289 #define __STDC_CONSTANT_MACROS 1 290 ]) 370 291 371 292 HAVE_FFMPEG_LIBS="" … … 382 303 AC_DEFINE(BUILD_with_ffmpeg, 1, [Build rappture with ffmpeg widgets]) 383 304 fi 384 fi 385 386 AC_CHECK_FUNCS(img_convert) 387 AC_CHECK_FUNCS(sws_scale) 305 AC_CHECK_LIB(avcodec, main,,AC_MSG_ERROR(librappture requires libavcodec)) 306 AC_CHECK_LIB(avutil, main,,AC_MSG_ERROR(librappture requires libavutil)) 307 AC_CHECK_LIB(avformat, main,,AC_MSG_ERROR(librappture requires libavformat)) 308 AC_CHECK_LIB(swscale, main) 309 AC_CHECK_FUNCS(avcodec_decode_video2) 310 AC_CHECK_FUNCS(avcodec_decode_video) 311 AC_CHECK_FUNCS(avformat_open_input) 312 AC_CHECK_FUNCS(av_open_input_file) 313 AC_CHECK_FUNCS(avio_close) 314 AC_CHECK_FUNCS(url_close) 315 AC_CHECK_FUNC(av_find_stream_info,, 316 AC_MSG_ERROR(oops! no av_find_stream_info?!?)) 317 AC_CHECK_FUNC(avcodec_find_decoder,, 318 AC_MSG_ERROR(oops! no av_codec_find_decoder ?!?)) 319 AC_CHECK_FUNC(avcodec_open,,AC_MSG_ERROR(oops! avcodec_open ?!?)) 320 AC_CHECK_FUNC(avcodec_alloc_frame,, 321 AC_MSG_ERROR(oops! no avcode_alloc_frame ?!?)) 322 AC_CHECK_FUNC(av_rescale_q,,AC_MSG_ERROR(oops! no av_rescale_q ?!?)) 323 AC_CHECK_FUNC(av_read_frame,,AC_MSG_ERROR(oops! av_read_frame ?!?)) 324 AC_CHECK_FUNC(av_free,,AC_MSG_ERROR(oops! no av_frame ?!?)) 325 AC_CHECK_FUNC(avcodec_default_release_buffer,, 326 AC_MSG_ERROR(oops! no avcode_default_release_buffer ?!?)) 327 AC_CHECK_FUNC(avpicture_get_size,, 328 AC_MSG_ERROR(oops! no avpicture_get_size ?!?)) 329 AC_CHECK_FUNC(avpicture_fill,,AC_MSG_ERROR(oops! no avpicture_fill ?!?)) 330 AC_CHECK_FUNCS(sws_getCachedContext) 331 AC_CHECK_FUNCS(img_convert) 332 AC_CHECK_FUNCS(sws_scale) 333 AC_TRY_COMPILE([ 334 #define __STDC_CONSTANT_MACROS 1 335 #include <stdlib.h> 336 #ifdef HAVE_FFMPEG_AVCODEC_H 337 # include <ffmpeg/avcodec.h> 338 #endif 339 #ifdef HAVE_LIBAVCODEC_AVCODEC_H 340 # include <libavcodec/avcodec.h> 341 #endif 342 int x = AVMEDIA_TYPE_VIDEO; 343 ],, ac_avmedia_type_video="yes", ac_avmedia_type_video="no") 344 if test "$ac_avmedia_type_video" == "yes" ; then 345 AC_DEFINE(HAVE_AVMEDIA_TYPE_VIDEO,1,[Define if AVMEDIA_TYPE_VIDEO enum exists. ]) 346 fi 347 fi 388 348 389 349 AC_SUBST(CFLAGS_DEBUG) … … 434 394 AC_SUBST(PYTHON_SITE_PACKAGES) 435 395 AC_SUBST(PYTHON_VERSION) 396 AC_SUBST(R) 436 397 AC_SUBST(RP_BASE) 437 398 AC_SUBST(RUBY) … … 513 474 lang/octave/octave2/Makefile 514 475 lang/octave/octave3/Makefile 476 lang/R/Makefile 515 477 lang/ruby/Makefile 516 478 lang/ruby/build.rb … … 543 505 examples/app-fermi/wrapper/python/Makefile 544 506 examples/app-fermi/wrapper/tcl/Makefile 507 examples/app-fermi/R/Makefile 545 508 examples/c-example/Makefile 546 509 examples/canvas/Makefile -
branches/blt4/examples/app-fermi/Makefile.in
r2541 r2742 14 14 INSTALL_SCRIPT = ${INSTALL} -m 644 15 15 16 F77 = @F77@ 17 CC = @CC@ 18 CXX = @CXX@ 19 RUBY = @RUBY@ 20 PERL = @PERL@ 21 TCLSH = @TCLSH@ 22 PYTHON = @PYTHON@ 23 MEX = @MEX@ 24 MKOCTFILE2 = @MKOCTFILE2@ 25 MKOCTFILE3 = @MKOCTFILE3@ 26 OCTAVE = $(MKOCTFILE2) $(MKOCTFILE3) 27 JAVAC = @JAVAC@ 16 F77 = @F77@ 17 CC = @CC@ 18 CXX = @CXX@ 19 RUBY = @RUBY@ 20 PERL = @PERL@ 21 TCLSH = @TCLSH@ 22 PYTHON = @PYTHON@ 23 MEX = @MEX@ 24 MKOCTFILE2 = @MKOCTFILE2@ 25 MKOCTFILE3 = @MKOCTFILE3@ 26 OCTAVE = $(MKOCTFILE2) $(MKOCTFILE3) 27 JAVAC = @JAVAC@ 28 R = @R@ 28 29 29 30 .PHONY: tcl cee fortran octave matlab perl python ruby java 2.0 wrapper … … 51 52 LANGS += java 52 53 endif 54 ifneq ($(R),) 55 LANGS += R 56 endif 53 57 54 58 all: -
branches/blt4/gui/apps/Makefile.in
r2704 r2742 28 28 $(srcdir)/vtkstreamlines-test \ 29 29 $(srcdir)/vtkviewer-test \ 30 $(srcdir)/vtkvolume-test \ 30 31 $(srcdir)/flowvis-test \ 31 32 $(srcdir)/rpdiff \ … … 56 57 57 58 distclean: clean 58 $(RM) encodedata rappture.env rappture rappture.use rerun rpdiffsimsim xmldiff59 $(RM) encodedata rappture.env rappture rappture.use rerun simsim xmldiff 59 60 $(RM) Makefile *~ 60 61 -
branches/blt4/gui/apps/rappture.use.in
r1988 r2742 35 35 prepend TK_LIBRARY ${libdir}/tk${tcl_version} 36 36 37 prepend R_LIBS ${libdir}/R 38 37 39 tags DEVEL -
branches/blt4/gui/apps/vtkcontour-test
r2536 r2742 244 244 if {"" != $file && [catch { 245 245 set fid [open $file r] 246 fconfigure $fid -translation binary 246 fconfigure $fid -translation binary -encoding binary 247 247 set info [read $fid] 248 248 close $fid -
branches/blt4/gui/apps/vtkstreamlines-test
r2536 r2742 122 122 if {"" != $file && [catch { 123 123 set fid [open $file r] 124 fconfigure $fid -translation binary 124 fconfigure $fid -translation binary -encoding binary 125 125 set info [read $fid] 126 126 close $fid … … 143 143 if {"" != $file && [catch { 144 144 set fid [open $file r] 145 fconfigure $fid -translation binary 145 fconfigure $fid -translation binary -encoding binary 146 146 set info [read $fid] 147 147 close $fid … … 164 164 if {"" != $file && [catch { 165 165 set fid [open $file r] 166 fconfigure $fid -translation binary 166 fconfigure $fid -translation binary -encoding binary 167 167 set info [read $fid] 168 168 close $fid -
branches/blt4/gui/apps/vtkviewer-test
r2536 r2742 90 90 return $_data 91 91 } 92 public method vtkdata {args} { 93 return $_data 94 } 92 95 public method values {args} { 93 96 return $_data … … 116 119 if {"" != $file && [catch { 117 120 set fid [open $file r] 118 fconfigure $fid -translation binary 121 fconfigure $fid -translation binary -encoding binary 119 122 set info [read $fid] 120 123 close $fid … … 137 140 if {"" != $file && [catch { 138 141 set fid [open $file r] 139 fconfigure $fid -translation binary 142 fconfigure $fid -translation binary -encoding binary 140 143 set info [read $fid] 141 144 close $fid -
branches/blt4/gui/cf/config.guess
r2706 r2742 2 2 # Attempt to guess a canonical system name. 3 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 5 # Free Software Foundation, Inc. 6 7 timestamp='2008-04-14' 4 # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 5 6 timestamp='2003-02-22' 8 7 9 8 # This file is free software; you can redistribute it and/or modify it … … 19 18 # You should have received a copy of the GNU General Public License 20 19 # along with this program; if not, write to the Free Software 21 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 22 # 02110-1301, USA. 20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 21 # 24 22 # As a special exception to the GNU General Public License, if you … … 26 24 # configuration script generated by Autoconf, you may include it under 27 25 # the same distribution terms that you use for the rest of that program. 28 29 26 30 27 # Originally written by Per Bothner <per@bothner.com>. … … 57 54 58 55 Originally written by Per Bothner. 59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ,60 2002, 2003, 2004, 2005, 2006, 2007, 2008Free Software Foundation, Inc.56 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 57 Free Software Foundation, Inc. 61 58 62 59 This is free software; see the source for copying conditions. There is NO … … 70 67 case $1 in 71 68 --time-stamp | --time* | -t ) 72 echo "$timestamp" ; exit ;;69 echo "$timestamp" ; exit 0 ;; 73 70 --version | -v ) 74 echo "$version" ; exit ;;71 echo "$version" ; exit 0 ;; 75 72 --help | --h* | -h ) 76 echo "$usage"; exit ;;73 echo "$usage"; exit 0 ;; 77 74 -- ) # Stop option processing 78 75 shift; break ;; … … 108 105 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 109 106 : ${TMPDIR=/tmp} ; 110 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 111 108 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 112 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||113 109 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 114 110 dummy=$tmp/dummy ; … … 127 123 ,,*) CC_FOR_BUILD=$CC ;; 128 124 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 129 esac ; set_cc_for_build= ;'125 esac ;' 130 126 131 127 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. … … 162 158 sh3el) machine=shl-unknown ;; 163 159 sh3eb) machine=sh-unknown ;; 164 sh5el) machine=sh5le-unknown ;;165 160 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 166 161 esac … … 201 196 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 202 197 echo "${machine}-${os}${release}" 203 exit ;; 198 exit 0 ;; 199 amiga:OpenBSD:*:*) 200 echo m68k-unknown-openbsd${UNAME_RELEASE} 201 exit 0 ;; 202 arc:OpenBSD:*:*) 203 echo mipsel-unknown-openbsd${UNAME_RELEASE} 204 exit 0 ;; 205 hp300:OpenBSD:*:*) 206 echo m68k-unknown-openbsd${UNAME_RELEASE} 207 exit 0 ;; 208 mac68k:OpenBSD:*:*) 209 echo m68k-unknown-openbsd${UNAME_RELEASE} 210 exit 0 ;; 211 macppc:OpenBSD:*:*) 212 echo powerpc-unknown-openbsd${UNAME_RELEASE} 213 exit 0 ;; 214 mvme68k:OpenBSD:*:*) 215 echo m68k-unknown-openbsd${UNAME_RELEASE} 216 exit 0 ;; 217 mvme88k:OpenBSD:*:*) 218 echo m88k-unknown-openbsd${UNAME_RELEASE} 219 exit 0 ;; 220 mvmeppc:OpenBSD:*:*) 221 echo powerpc-unknown-openbsd${UNAME_RELEASE} 222 exit 0 ;; 223 pmax:OpenBSD:*:*) 224 echo mipsel-unknown-openbsd${UNAME_RELEASE} 225 exit 0 ;; 226 sgi:OpenBSD:*:*) 227 echo mipseb-unknown-openbsd${UNAME_RELEASE} 228 exit 0 ;; 229 sun3:OpenBSD:*:*) 230 echo m68k-unknown-openbsd${UNAME_RELEASE} 231 exit 0 ;; 232 wgrisc:OpenBSD:*:*) 233 echo mipsel-unknown-openbsd${UNAME_RELEASE} 234 exit 0 ;; 204 235 *:OpenBSD:*:*) 205 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 206 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 207 exit ;; 208 *:ekkoBSD:*:*) 209 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 210 exit ;; 211 *:SolidBSD:*:*) 212 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 213 exit ;; 214 macppc:MirBSD:*:*) 215 echo powerpc-unknown-mirbsd${UNAME_RELEASE} 216 exit ;; 217 *:MirBSD:*:*) 218 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 219 exit ;; 236 echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} 237 exit 0 ;; 220 238 alpha:OSF1:*:*) 221 case $UNAME_RELEASE in 222 *4.0) 239 if test $UNAME_RELEASE = "V4.0"; then 223 240 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 224 ;; 225 *5.*) 226 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 227 ;; 228 esac 241 fi 229 242 # According to Compaq, /usr/sbin/psrinfo has been available on 230 243 # OSF/1 and Tru64 systems produced since 1995. I hope that … … 264 277 UNAME_MACHINE="alphaev79" ;; 265 278 esac 266 # A Pn.n version is a patched version.267 279 # A Vn.n version is a released version. 268 280 # A Tn.n version is a released field test version. 269 281 # A Xn.n version is an unreleased experimental baselevel. 270 282 # 1.2 uses "1.2" for uname -r. 271 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[ PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`272 exit ;;283 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 284 exit 0 ;; 273 285 Alpha\ *:Windows_NT*:*) 274 286 # How do we know it's Interix rather than the generic POSIX subsystem? … … 276 288 # of the specific Alpha model? 277 289 echo alpha-pc-interix 278 exit ;;290 exit 0 ;; 279 291 21064:Windows_NT:50:3) 280 292 echo alpha-dec-winnt3.5 281 exit ;;293 exit 0 ;; 282 294 Amiga*:UNIX_System_V:4.0:*) 283 295 echo m68k-unknown-sysv4 284 exit ;;296 exit 0;; 285 297 *:[Aa]miga[Oo][Ss]:*:*) 286 298 echo ${UNAME_MACHINE}-unknown-amigaos 287 exit ;;299 exit 0 ;; 288 300 *:[Mm]orph[Oo][Ss]:*:*) 289 301 echo ${UNAME_MACHINE}-unknown-morphos 290 exit ;;302 exit 0 ;; 291 303 *:OS/390:*:*) 292 304 echo i370-ibm-openedition 293 exit ;; 294 *:z/VM:*:*) 295 echo s390-ibm-zvmoe 296 exit ;; 297 *:OS400:*:*) 298 echo powerpc-ibm-os400 299 exit ;; 305 exit 0 ;; 300 306 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 301 307 echo arm-acorn-riscix${UNAME_RELEASE} 302 exit ;; 303 arm:riscos:*:*|arm:RISCOS:*:*) 304 echo arm-unknown-riscos 305 exit ;; 308 exit 0;; 306 309 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 307 310 echo hppa1.1-hitachi-hiuxmpp 308 exit ;;311 exit 0;; 309 312 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 310 313 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. … … 314 317 echo pyramid-pyramid-bsd 315 318 fi 316 exit ;;319 exit 0 ;; 317 320 NILE*:*:*:dcosx) 318 321 echo pyramid-pyramid-svr4 319 exit ;; 320 DRS?6000:unix:4.0:6*) 321 echo sparc-icl-nx6 322 exit ;; 323 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 322 exit 0 ;; 323 DRS?6000:UNIX_SV:4.2*:7*) 324 324 case `/usr/bin/uname -p` in 325 sparc) echo sparc-icl-nx7 ; exit;;325 sparc) echo sparc-icl-nx7 && exit 0 ;; 326 326 esac ;; 327 327 sun4H:SunOS:5.*:*) 328 328 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 329 exit ;;329 exit 0 ;; 330 330 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 331 331 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 332 exit ;;333 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)332 exit 0 ;; 333 i86pc:SunOS:5.*:*) 334 334 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 335 exit ;;335 exit 0 ;; 336 336 sun4*:SunOS:6*:*) 337 337 # According to config.sub, this is the proper way to canonicalize … … 339 339 # it's likely to be more like Solaris than SunOS4. 340 340 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 341 exit ;;341 exit 0 ;; 342 342 sun4*:SunOS:*:*) 343 343 case "`/usr/bin/arch -k`" in … … 348 348 # Japanese Language versions have a version number like `4.1.3-JL'. 349 349 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 350 exit ;;350 exit 0 ;; 351 351 sun3*:SunOS:*:*) 352 352 echo m68k-sun-sunos${UNAME_RELEASE} 353 exit ;;353 exit 0 ;; 354 354 sun*:*:4.2BSD:*) 355 355 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` … … 363 363 ;; 364 364 esac 365 exit ;;365 exit 0 ;; 366 366 aushp:SunOS:*:*) 367 367 echo sparc-auspex-sunos${UNAME_RELEASE} 368 exit ;;368 exit 0 ;; 369 369 # The situation for MiNT is a little confusing. The machine name 370 370 # can be virtually everything (everything which is not … … 377 377 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 378 378 echo m68k-atari-mint${UNAME_RELEASE} 379 exit ;;379 exit 0 ;; 380 380 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 381 381 echo m68k-atari-mint${UNAME_RELEASE} 382 exit ;;382 exit 0 ;; 383 383 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 384 384 echo m68k-atari-mint${UNAME_RELEASE} 385 exit ;;385 exit 0 ;; 386 386 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 387 387 echo m68k-milan-mint${UNAME_RELEASE} 388 exit ;;388 exit 0 ;; 389 389 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 390 390 echo m68k-hades-mint${UNAME_RELEASE} 391 exit ;;391 exit 0 ;; 392 392 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 393 393 echo m68k-unknown-mint${UNAME_RELEASE} 394 exit ;; 395 m68k:machten:*:*) 396 echo m68k-apple-machten${UNAME_RELEASE} 397 exit ;; 394 exit 0 ;; 398 395 powerpc:machten:*:*) 399 396 echo powerpc-apple-machten${UNAME_RELEASE} 400 exit ;;397 exit 0 ;; 401 398 RISC*:Mach:*:*) 402 399 echo mips-dec-mach_bsd4.3 403 exit ;;400 exit 0 ;; 404 401 RISC*:ULTRIX:*:*) 405 402 echo mips-dec-ultrix${UNAME_RELEASE} 406 exit ;;403 exit 0 ;; 407 404 VAX*:ULTRIX*:*:*) 408 405 echo vax-dec-ultrix${UNAME_RELEASE} 409 exit ;;406 exit 0 ;; 410 407 2020:CLIX:*:* | 2430:CLIX:*:*) 411 408 echo clipper-intergraph-clix${UNAME_RELEASE} 412 exit ;;409 exit 0 ;; 413 410 mips:*:*:UMIPS | mips:*:*:RISCos) 414 411 eval $set_cc_for_build … … 434 431 } 435 432 EOF 436 $CC_FOR_BUILD -o $dummy $dummy.c && 437 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 438 SYSTEM_NAME=`$dummy $dummyarg` && 439 { echo "$SYSTEM_NAME"; exit; } 433 $CC_FOR_BUILD -o $dummy $dummy.c \ 434 && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 435 && exit 0 440 436 echo mips-mips-riscos${UNAME_RELEASE} 441 exit ;;437 exit 0 ;; 442 438 Motorola:PowerMAX_OS:*:*) 443 439 echo powerpc-motorola-powermax 444 exit ;;440 exit 0 ;; 445 441 Motorola:*:4.3:PL8-*) 446 442 echo powerpc-harris-powermax 447 exit ;;443 exit 0 ;; 448 444 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 449 445 echo powerpc-harris-powermax 450 exit ;;446 exit 0 ;; 451 447 Night_Hawk:Power_UNIX:*:*) 452 448 echo powerpc-harris-powerunix 453 exit ;;449 exit 0 ;; 454 450 m88k:CX/UX:7*:*) 455 451 echo m88k-harris-cxux7 456 exit ;;452 exit 0 ;; 457 453 m88k:*:4*:R4*) 458 454 echo m88k-motorola-sysv4 459 exit ;;455 exit 0 ;; 460 456 m88k:*:3*:R3*) 461 457 echo m88k-motorola-sysv3 462 exit ;;458 exit 0 ;; 463 459 AViiON:dgux:*:*) 464 460 # DG/UX returns AViiON for all architectures … … 476 472 echo i586-dg-dgux${UNAME_RELEASE} 477 473 fi 478 exit ;;474 exit 0 ;; 479 475 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 480 476 echo m88k-dolphin-sysv3 481 exit ;;477 exit 0 ;; 482 478 M88*:*:R3*:*) 483 479 # Delta 88k system running SVR3 484 480 echo m88k-motorola-sysv3 485 exit ;;481 exit 0 ;; 486 482 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 487 483 echo m88k-tektronix-sysv3 488 exit ;;484 exit 0 ;; 489 485 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 490 486 echo m68k-tektronix-bsd 491 exit ;;487 exit 0 ;; 492 488 *:IRIX*:*:*) 493 489 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 494 exit ;;490 exit 0 ;; 495 491 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 496 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id497 exit ;;# Note that: echo "'`uname -s`'" gives 'AIX '492 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 493 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 498 494 i*86:AIX:*:*) 499 495 echo i386-ibm-aix 500 exit ;;496 exit 0 ;; 501 497 ia64:AIX:*:*) 502 498 if [ -x /usr/bin/oslevel ] ; then … … 506 502 fi 507 503 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 508 exit ;;504 exit 0 ;; 509 505 *:AIX:2:3) 510 506 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then … … 521 517 } 522 518 EOF 523 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 524 then 525 echo "$SYSTEM_NAME" 526 else 527 echo rs6000-ibm-aix3.2.5 528 fi 519 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 520 echo rs6000-ibm-aix3.2.5 529 521 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 530 522 echo rs6000-ibm-aix3.2.4 … … 532 524 echo rs6000-ibm-aix3.2 533 525 fi 534 exit ;;535 *:AIX:*:[45 6])526 exit 0 ;; 527 *:AIX:*:[45]) 536 528 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 537 529 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then … … 546 538 fi 547 539 echo ${IBM_ARCH}-ibm-aix${IBM_REV} 548 exit ;;540 exit 0 ;; 549 541 *:AIX:*:*) 550 542 echo rs6000-ibm-aix 551 exit ;;543 exit 0 ;; 552 544 ibmrt:4.4BSD:*|romp-ibm:BSD:*) 553 545 echo romp-ibm-bsd4.4 554 exit ;;546 exit 0 ;; 555 547 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 556 548 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 557 exit ;;# report: romp-ibm BSD 4.3549 exit 0 ;; # report: romp-ibm BSD 4.3 558 550 *:BOSX:*:*) 559 551 echo rs6000-bull-bosx 560 exit ;;552 exit 0 ;; 561 553 DPX/2?00:B.O.S.:*:*) 562 554 echo m68k-bull-sysv3 563 exit ;;555 exit 0 ;; 564 556 9000/[34]??:4.3bsd:1.*:*) 565 557 echo m68k-hp-bsd 566 exit ;;558 exit 0 ;; 567 559 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 568 560 echo m68k-hp-bsd4.4 569 exit ;;561 exit 0 ;; 570 562 9000/[34678]??:HP-UX:*:*) 571 563 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` … … 629 621 if [ ${HP_ARCH} = "hppa2.0w" ] 630 622 then 631 eval $set_cc_for_build 632 633 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 634 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 635 # generating 64-bit code. GNU and HP use different nomenclature: 636 # 637 # $ CC_FOR_BUILD=cc ./config.guess 638 # => hppa2.0w-hp-hpux11.23 639 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 640 # => hppa64-hp-hpux11.23 641 642 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 643 grep __LP64__ >/dev/null 623 # avoid double evaluation of $set_cc_for_build 624 test -n "$CC_FOR_BUILD" || eval $set_cc_for_build 625 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null 644 626 then 645 627 HP_ARCH="hppa2.0w" … … 649 631 fi 650 632 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 651 exit ;;633 exit 0 ;; 652 634 ia64:HP-UX:*:*) 653 635 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 654 636 echo ia64-hp-hpux${HPUX_REV} 655 exit ;;637 exit 0 ;; 656 638 3050*:HI-UX:*:*) 657 639 eval $set_cc_for_build … … 681 663 } 682 664 EOF 683 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 684 { echo "$SYSTEM_NAME"; exit; } 665 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 685 666 echo unknown-hitachi-hiuxwe2 686 exit ;;667 exit 0 ;; 687 668 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 688 669 echo hppa1.1-hp-bsd 689 exit ;;670 exit 0 ;; 690 671 9000/8??:4.3bsd:*:*) 691 672 echo hppa1.0-hp-bsd 692 exit ;;673 exit 0 ;; 693 674 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 694 675 echo hppa1.0-hp-mpeix 695 exit ;;676 exit 0 ;; 696 677 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 697 678 echo hppa1.1-hp-osf 698 exit ;;679 exit 0 ;; 699 680 hp8??:OSF1:*:*) 700 681 echo hppa1.0-hp-osf 701 exit ;;682 exit 0 ;; 702 683 i*86:OSF1:*:*) 703 684 if [ -x /usr/sbin/sysversion ] ; then … … 706 687 echo ${UNAME_MACHINE}-unknown-osf1 707 688 fi 708 exit ;;689 exit 0 ;; 709 690 parisc*:Lites*:*:*) 710 691 echo hppa1.1-hp-lites 711 exit ;;692 exit 0 ;; 712 693 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 713 694 echo c1-convex-bsd 714 exit ;;695 exit 0 ;; 715 696 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 716 697 if getsysinfo -f scalar_acc … … 718 699 else echo c2-convex-bsd 719 700 fi 720 exit ;;701 exit 0 ;; 721 702 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 722 703 echo c34-convex-bsd 723 exit ;;704 exit 0 ;; 724 705 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 725 706 echo c38-convex-bsd 726 exit ;;707 exit 0 ;; 727 708 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 728 709 echo c4-convex-bsd 729 exit ;;710 exit 0 ;; 730 711 CRAY*Y-MP:*:*:*) 731 712 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 732 exit ;;713 exit 0 ;; 733 714 CRAY*[A-Z]90:*:*:*) 734 715 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ … … 736 717 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 737 718 -e 's/\.[^.]*$/.X/' 738 exit ;;719 exit 0 ;; 739 720 CRAY*TS:*:*:*) 740 721 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 741 exit ;;722 exit 0 ;; 742 723 CRAY*T3E:*:*:*) 743 724 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 744 exit ;;725 exit 0 ;; 745 726 CRAY*SV1:*:*:*) 746 727 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 747 exit ;;728 exit 0 ;; 748 729 *:UNICOS/mp:*:*) 749 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'750 exit ;;730 echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 731 exit 0 ;; 751 732 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 752 733 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` … … 754 735 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 755 736 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 756 exit ;; 757 5000:UNIX_System_V:4.*:*) 758 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 759 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 760 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 761 exit ;; 737 exit 0 ;; 762 738 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 763 739 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 764 exit ;;740 exit 0 ;; 765 741 sparc*:BSD/OS:*:*) 766 742 echo sparc-unknown-bsdi${UNAME_RELEASE} 767 exit ;;743 exit 0 ;; 768 744 *:BSD/OS:*:*) 769 745 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 770 exit ;;746 exit 0 ;; 771 747 *:FreeBSD:*:*) 772 case ${UNAME_MACHINE} in 773 pc98) 774 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 775 amd64) 776 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 777 *) 778 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 779 esac 780 exit ;; 748 # Determine whether the default compiler uses glibc. 749 eval $set_cc_for_build 750 sed 's/^ //' << EOF >$dummy.c 751 #include <features.h> 752 #if __GLIBC__ >= 2 753 LIBC=gnu 754 #else 755 LIBC= 756 #endif 757 EOF 758 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 759 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} 760 exit 0 ;; 781 761 i*:CYGWIN*:*) 782 762 echo ${UNAME_MACHINE}-pc-cygwin 783 exit ;;784 *:MINGW*:*)763 exit 0 ;; 764 i*:MINGW*:*) 785 765 echo ${UNAME_MACHINE}-pc-mingw32 786 exit ;; 787 i*:windows32*:*) 788 # uname -m includes "-pc" on this system. 789 echo ${UNAME_MACHINE}-mingw32 790 exit ;; 766 exit 0 ;; 767 i*:MSYS*:*) 768 echo ${UNAME_MACHINE}-pc-msys 769 exit 0 ;; 791 770 i*:PW*:*) 792 771 echo ${UNAME_MACHINE}-pc-pw32 793 exit ;; 794 *:Interix*:[3456]*) 795 case ${UNAME_MACHINE} in 796 x86) 797 echo i586-pc-interix${UNAME_RELEASE} 798 exit ;; 799 EM64T | authenticamd) 800 echo x86_64-unknown-interix${UNAME_RELEASE} 801 exit ;; 802 IA64) 803 echo ia64-unknown-interix${UNAME_RELEASE} 804 exit ;; 805 esac ;; 772 exit 0 ;; 773 x86:Interix*:3*) 774 echo i586-pc-interix3 775 exit 0 ;; 806 776 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 807 777 echo i${UNAME_MACHINE}-pc-mks 808 exit ;;778 exit 0 ;; 809 779 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 810 780 # How do we know it's Interix rather than the generic POSIX subsystem? … … 812 782 # UNAME_MACHINE based on the output of uname instead of i386? 813 783 echo i586-pc-interix 814 exit ;;784 exit 0 ;; 815 785 i*:UWIN*:*) 816 786 echo ${UNAME_MACHINE}-pc-uwin 817 exit ;; 818 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 819 echo x86_64-unknown-cygwin 820 exit ;; 787 exit 0 ;; 821 788 p*:CYGWIN*:*) 822 789 echo powerpcle-unknown-cygwin 823 exit ;;790 exit 0 ;; 824 791 prep*:SunOS:5.*:*) 825 792 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 826 exit ;;793 exit 0 ;; 827 794 *:GNU:*:*) 828 # the GNU system829 795 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 830 exit ;; 831 *:GNU/*:*:*) 832 # other systems with GNU libc and userland 833 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 834 exit ;; 796 exit 0 ;; 835 797 i*86:Minix:*:*) 836 798 echo ${UNAME_MACHINE}-pc-minix 837 exit ;;799 exit 0 ;; 838 800 arm*:Linux:*:*) 839 eval $set_cc_for_build840 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \841 | grep -q __ARM_EABI__842 then843 echo ${UNAME_MACHINE}-unknown-linux-gnu844 else845 echo ${UNAME_MACHINE}-unknown-linux-gnueabi846 fi847 exit ;;848 avr32*:Linux:*:*)849 801 echo ${UNAME_MACHINE}-unknown-linux-gnu 850 exit ;; 851 cris:Linux:*:*) 852 echo cris-axis-linux-gnu 853 exit ;; 854 crisv32:Linux:*:*) 855 echo crisv32-axis-linux-gnu 856 exit ;; 857 frv:Linux:*:*) 858 echo frv-unknown-linux-gnu 859 exit ;; 802 exit 0 ;; 860 803 ia64:Linux:*:*) 861 804 echo ${UNAME_MACHINE}-unknown-linux-gnu 862 exit ;; 863 m32r*:Linux:*:*) 864 echo ${UNAME_MACHINE}-unknown-linux-gnu 865 exit ;; 805 exit 0 ;; 866 806 m68*:Linux:*:*) 867 807 echo ${UNAME_MACHINE}-unknown-linux-gnu 868 exit ;;808 exit 0 ;; 869 809 mips:Linux:*:*) 870 810 eval $set_cc_for_build … … 883 823 #endif 884 824 EOF 885 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 886 /^CPU/{ 887 s: ::g 888 p 889 }'`" 890 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 825 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 826 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 891 827 ;; 892 828 mips64:Linux:*:*) … … 906 842 #endif 907 843 EOF 908 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 909 /^CPU/{ 910 s: ::g 911 p 912 }'`" 913 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 844 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 845 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 914 846 ;; 915 or32:Linux:*:*)916 echo or32-unknown-linux-gnu917 exit ;;918 847 ppc:Linux:*:*) 919 848 echo powerpc-unknown-linux-gnu 920 exit ;;849 exit 0 ;; 921 850 ppc64:Linux:*:*) 922 851 echo powerpc64-unknown-linux-gnu 923 exit ;;852 exit 0 ;; 924 853 alpha:Linux:*:*) 925 854 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in … … 935 864 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 936 865 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 937 exit ;;866 exit 0 ;; 938 867 parisc:Linux:*:* | hppa:Linux:*:*) 939 868 # Look for CPU level … … 943 872 *) echo hppa-unknown-linux-gnu ;; 944 873 esac 945 exit ;;874 exit 0 ;; 946 875 parisc64:Linux:*:* | hppa64:Linux:*:*) 947 876 echo hppa64-unknown-linux-gnu 948 exit ;;877 exit 0 ;; 949 878 s390:Linux:*:* | s390x:Linux:*:*) 950 879 echo ${UNAME_MACHINE}-ibm-linux 951 exit ;; 952 sh64*:Linux:*:*) 953 echo ${UNAME_MACHINE}-unknown-linux-gnu 954 exit ;; 880 exit 0 ;; 955 881 sh*:Linux:*:*) 956 882 echo ${UNAME_MACHINE}-unknown-linux-gnu 957 exit ;;883 exit 0 ;; 958 884 sparc:Linux:*:* | sparc64:Linux:*:*) 959 885 echo ${UNAME_MACHINE}-unknown-linux-gnu 960 exit ;; 961 vax:Linux:*:*) 962 echo ${UNAME_MACHINE}-dec-linux-gnu 963 exit ;; 886 exit 0 ;; 964 887 x86_64:Linux:*:*) 965 888 echo x86_64-unknown-linux-gnu 966 exit ;; 967 xtensa*:Linux:*:*) 968 echo ${UNAME_MACHINE}-unknown-linux-gnu 969 exit ;; 889 exit 0 ;; 970 890 i*86:Linux:*:*) 971 891 # The BFD linker knows what the default object file format is, so … … 985 905 a.out-i386-linux) 986 906 echo "${UNAME_MACHINE}-pc-linux-gnuaout" 987 exit ;; 907 exit 0 ;; 908 coff-i386) 909 echo "${UNAME_MACHINE}-pc-linux-gnucoff" 910 exit 0 ;; 988 911 "") 989 912 # Either a pre-BFD a.out linker (linux-gnuoldld) or 990 913 # one that does not give us useful --help. 991 914 echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 992 exit ;;915 exit 0 ;; 993 916 esac 994 917 # Determine whether the default compiler is a.out or elf … … 1007 930 # endif 1008 931 #else 1009 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)932 #ifdef __INTEL_COMPILER 1010 933 LIBC=gnu 1011 934 #else … … 1013 936 #endif 1014 937 #endif 1015 #ifdef __dietlibc__1016 LIBC=dietlibc1017 #endif1018 938 EOF 1019 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 1020 /^LIBC/{ 1021 s: ::g 1022 p 1023 }'`" 1024 test x"${LIBC}" != x && { 1025 echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 1026 exit 1027 } 1028 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } 939 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 940 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 941 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 1029 942 ;; 1030 943 i*86:DYNIX/ptx:4*:*) … … 1033 946 # sysname and nodename. 1034 947 echo i386-sequent-sysv4 1035 exit ;;948 exit 0 ;; 1036 949 i*86:UNIX_SV:4.2MP:2.*) 1037 950 # Unixware is an offshoot of SVR4, but it has its own version … … 1041 954 # Use sysv4.2uw... so that sysv4* matches it. 1042 955 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1043 exit ;;956 exit 0 ;; 1044 957 i*86:OS/2:*:*) 1045 958 # If we were able to find `uname', then EMX Unix compatibility 1046 959 # is probably installed. 1047 960 echo ${UNAME_MACHINE}-pc-os2-emx 1048 exit ;;961 exit 0 ;; 1049 962 i*86:XTS-300:*:STOP) 1050 963 echo ${UNAME_MACHINE}-unknown-stop 1051 exit ;;964 exit 0 ;; 1052 965 i*86:atheos:*:*) 1053 966 echo ${UNAME_MACHINE}-unknown-atheos 1054 exit ;; 1055 i*86:syllable:*:*) 1056 echo ${UNAME_MACHINE}-pc-syllable 1057 exit ;; 967 exit 0 ;; 1058 968 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1059 969 echo i386-unknown-lynxos${UNAME_RELEASE} 1060 exit ;;970 exit 0 ;; 1061 971 i*86:*DOS:*:*) 1062 972 echo ${UNAME_MACHINE}-pc-msdosdjgpp 1063 exit ;;973 exit 0 ;; 1064 974 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1065 975 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` … … 1069 979 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1070 980 fi 1071 exit ;; 1072 i*86:*:5:[678]*) 1073 # UnixWare 7.x, OpenUNIX and OpenServer 6. 981 exit 0 ;; 982 i*86:*:5:[78]*) 1074 983 case `/bin/uname -X | grep "^Machine"` in 1075 984 *486*) UNAME_MACHINE=i486 ;; … … 1078 987 esac 1079 988 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1080 exit ;;989 exit 0 ;; 1081 990 i*86:*:3.2:*) 1082 991 if test -f /usr/options/cb.name; then … … 1096 1005 echo ${UNAME_MACHINE}-pc-sysv32 1097 1006 fi 1098 exit ;;1007 exit 0 ;; 1099 1008 pc:*:*:*) 1100 1009 # Left here for compatibility: … … 1102 1011 # the processor, so we play safe by assuming i386. 1103 1012 echo i386-pc-msdosdjgpp 1104 exit ;;1013 exit 0 ;; 1105 1014 Intel:Mach:3*:*) 1106 1015 echo i386-pc-mach3 1107 exit ;;1016 exit 0 ;; 1108 1017 paragon:*:*:*) 1109 1018 echo i860-intel-osf1 1110 exit ;;1019 exit 0 ;; 1111 1020 i860:*:4.*:*) # i860-SVR4 1112 1021 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then … … 1115 1024 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1116 1025 fi 1117 exit ;;1026 exit 0 ;; 1118 1027 mini*:CTIX:SYS*5:*) 1119 1028 # "miniframe" 1120 1029 echo m68010-convergent-sysv 1121 exit ;;1030 exit 0 ;; 1122 1031 mc68k:UNIX:SYSTEM5:3.51m) 1123 1032 echo m68k-convergent-sysv 1124 exit ;;1033 exit 0 ;; 1125 1034 M680?0:D-NIX:5.3:*) 1126 1035 echo m68k-diab-dnix 1127 exit ;;1128 M68*:*:R3V[567 8]*:*)1129 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; };;1130 3[34 5]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)1036 exit 0 ;; 1037 M68*:*:R3V[567]*:*) 1038 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 1039 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) 1131 1040 OS_REL='' 1132 1041 test -r /etc/.relid \ 1133 1042 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1134 1043 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1135 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }1044 && echo i486-ncr-sysv4.3${OS_REL} && exit 0 1136 1045 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1137 && { echo i586-ncr-sysv4.3${OS_REL}; exit; };;1046 && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 1138 1047 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1139 1048 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1140 && { echo i486-ncr-sysv4; exit; };;1049 && echo i486-ncr-sysv4 && exit 0 ;; 1141 1050 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1142 1051 echo m68k-unknown-lynxos${UNAME_RELEASE} 1143 exit ;;1052 exit 0 ;; 1144 1053 mc68030:UNIX_System_V:4.*:*) 1145 1054 echo m68k-atari-sysv4 1146 exit ;;1055 exit 0 ;; 1147 1056 TSUNAMI:LynxOS:2.*:*) 1148 1057 echo sparc-unknown-lynxos${UNAME_RELEASE} 1149 exit ;;1058 exit 0 ;; 1150 1059 rs6000:LynxOS:2.*:*) 1151 1060 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1152 exit ;;1061 exit 0 ;; 1153 1062 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1154 1063 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1155 exit ;;1064 exit 0 ;; 1156 1065 SM[BE]S:UNIX_SV:*:*) 1157 1066 echo mips-dde-sysv${UNAME_RELEASE} 1158 exit ;;1067 exit 0 ;; 1159 1068 RM*:ReliantUNIX-*:*:*) 1160 1069 echo mips-sni-sysv4 1161 exit ;;1070 exit 0 ;; 1162 1071 RM*:SINIX-*:*:*) 1163 1072 echo mips-sni-sysv4 1164 exit ;;1073 exit 0 ;; 1165 1074 *:SINIX-*:*:*) 1166 1075 if uname -p 2>/dev/null >/dev/null ; then … … 1170 1079 echo ns32k-sni-sysv 1171 1080 fi 1172 exit ;;1081 exit 0 ;; 1173 1082 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1174 1083 # says <Richard.M.Bartel@ccMail.Census.GOV> 1175 1084 echo i586-unisys-sysv4 1176 exit ;;1085 exit 0 ;; 1177 1086 *:UNIX_System_V:4*:FTX*) 1178 1087 # From Gerald Hewes <hewes@openmarket.com>. 1179 1088 # How about differentiating between stratus architectures? -djm 1180 1089 echo hppa1.1-stratus-sysv4 1181 exit ;;1090 exit 0 ;; 1182 1091 *:*:*:FTX*) 1183 1092 # From seanf@swdc.stratus.com. 1184 1093 echo i860-stratus-sysv4 1185 exit ;; 1186 i*86:VOS:*:*) 1187 # From Paul.Green@stratus.com. 1188 echo ${UNAME_MACHINE}-stratus-vos 1189 exit ;; 1094 exit 0 ;; 1190 1095 *:VOS:*:*) 1191 1096 # From Paul.Green@stratus.com. 1192 1097 echo hppa1.1-stratus-vos 1193 exit ;;1098 exit 0 ;; 1194 1099 mc68*:A/UX:*:*) 1195 1100 echo m68k-apple-aux${UNAME_RELEASE} 1196 exit ;;1101 exit 0 ;; 1197 1102 news*:NEWS-OS:6*:*) 1198 1103 echo mips-sony-newsos6 1199 exit ;;1104 exit 0 ;; 1200 1105 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1201 1106 if [ -d /usr/nec ]; then … … 1204 1109 echo mips-unknown-sysv${UNAME_RELEASE} 1205 1110 fi 1206 exit ;;1111 exit 0 ;; 1207 1112 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1208 1113 echo powerpc-be-beos 1209 exit ;;1114 exit 0 ;; 1210 1115 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1211 1116 echo powerpc-apple-beos 1212 exit ;;1117 exit 0 ;; 1213 1118 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1214 1119 echo i586-pc-beos 1215 exit ;; 1216 BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1217 echo i586-pc-haiku 1218 exit ;; 1120 exit 0 ;; 1219 1121 SX-4:SUPER-UX:*:*) 1220 1122 echo sx4-nec-superux${UNAME_RELEASE} 1221 exit ;;1123 exit 0 ;; 1222 1124 SX-5:SUPER-UX:*:*) 1223 1125 echo sx5-nec-superux${UNAME_RELEASE} 1224 exit ;;1126 exit 0 ;; 1225 1127 SX-6:SUPER-UX:*:*) 1226 1128 echo sx6-nec-superux${UNAME_RELEASE} 1227 exit ;; 1228 SX-7:SUPER-UX:*:*) 1229 echo sx7-nec-superux${UNAME_RELEASE} 1230 exit ;; 1231 SX-8:SUPER-UX:*:*) 1232 echo sx8-nec-superux${UNAME_RELEASE} 1233 exit ;; 1234 SX-8R:SUPER-UX:*:*) 1235 echo sx8r-nec-superux${UNAME_RELEASE} 1236 exit ;; 1129 exit 0 ;; 1237 1130 Power*:Rhapsody:*:*) 1238 1131 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1239 exit ;;1132 exit 0 ;; 1240 1133 *:Rhapsody:*:*) 1241 1134 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1242 exit ;;1135 exit 0 ;; 1243 1136 *:Darwin:*:*) 1244 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown1245 case $UNAME_PROCESSOR in1246 unknown) UNAME_PROCESSOR=powerpc ;;1137 case `uname -p` in 1138 *86) UNAME_PROCESSOR=i686 ;; 1139 powerpc) UNAME_PROCESSOR=powerpc ;; 1247 1140 esac 1248 1141 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1249 exit ;;1142 exit 0 ;; 1250 1143 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1251 1144 UNAME_PROCESSOR=`uname -p` … … 1255 1148 fi 1256 1149 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1257 exit ;;1150 exit 0 ;; 1258 1151 *:QNX:*:4*) 1259 1152 echo i386-pc-qnx 1260 exit ;; 1261 NSE-?:NONSTOP_KERNEL:*:*) 1262 echo nse-tandem-nsk${UNAME_RELEASE} 1263 exit ;; 1264 NSR-?:NONSTOP_KERNEL:*:*) 1153 exit 0 ;; 1154 NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) 1265 1155 echo nsr-tandem-nsk${UNAME_RELEASE} 1266 exit ;;1156 exit 0 ;; 1267 1157 *:NonStop-UX:*:*) 1268 1158 echo mips-compaq-nonstopux 1269 exit ;;1159 exit 0 ;; 1270 1160 BS2000:POSIX*:*:*) 1271 1161 echo bs2000-siemens-sysv 1272 exit ;;1162 exit 0 ;; 1273 1163 DS/*:UNIX_System_V:*:*) 1274 1164 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1275 exit ;;1165 exit 0 ;; 1276 1166 *:Plan9:*:*) 1277 1167 # "uname -m" is not consistent, so use $cputype instead. 386 … … 1284 1174 fi 1285 1175 echo ${UNAME_MACHINE}-unknown-plan9 1286 exit ;;1176 exit 0 ;; 1287 1177 *:TOPS-10:*:*) 1288 1178 echo pdp10-unknown-tops10 1289 exit ;;1179 exit 0 ;; 1290 1180 *:TENEX:*:*) 1291 1181 echo pdp10-unknown-tenex 1292 exit ;;1182 exit 0 ;; 1293 1183 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1294 1184 echo pdp10-dec-tops20 1295 exit ;;1185 exit 0 ;; 1296 1186 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1297 1187 echo pdp10-xkl-tops20 1298 exit ;;1188 exit 0 ;; 1299 1189 *:TOPS-20:*:*) 1300 1190 echo pdp10-unknown-tops20 1301 exit ;;1191 exit 0 ;; 1302 1192 *:ITS:*:*) 1303 1193 echo pdp10-unknown-its 1304 exit ;; 1305 SEI:*:*:SEIUX) 1306 echo mips-sei-seiux${UNAME_RELEASE} 1307 exit ;; 1308 *:DragonFly:*:*) 1309 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1310 exit ;; 1311 *:*VMS:*:*) 1312 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1313 case "${UNAME_MACHINE}" in 1314 A*) echo alpha-dec-vms ; exit ;; 1315 I*) echo ia64-dec-vms ; exit ;; 1316 V*) echo vax-dec-vms ; exit ;; 1317 esac ;; 1318 *:XENIX:*:SysV) 1319 echo i386-pc-xenix 1320 exit ;; 1321 i*86:skyos:*:*) 1322 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1323 exit ;; 1324 i*86:rdos:*:*) 1325 echo ${UNAME_MACHINE}-pc-rdos 1326 exit ;; 1194 exit 0 ;; 1327 1195 esac 1328 1196 … … 1356 1224 1357 1225 #if defined (__arm) && defined (__acorn) && defined (__unix) 1358 printf ("arm-acorn-riscix \n"); exit (0);1226 printf ("arm-acorn-riscix"); exit (0); 1359 1227 #endif 1360 1228 … … 1445 1313 EOF 1446 1314 1447 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 1448 { echo "$SYSTEM_NAME"; exit; } 1315 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 1449 1316 1450 1317 # Apollos put the system type in the environment. 1451 1318 1452 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit ; }1319 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } 1453 1320 1454 1321 # Convex versions that predate uname can use getsysinfo(1) … … 1459 1326 c1*) 1460 1327 echo c1-convex-bsd 1461 exit ;;1328 exit 0 ;; 1462 1329 c2*) 1463 1330 if getsysinfo -f scalar_acc … … 1465 1332 else echo c2-convex-bsd 1466 1333 fi 1467 exit ;;1334 exit 0 ;; 1468 1335 c34*) 1469 1336 echo c34-convex-bsd 1470 exit ;;1337 exit 0 ;; 1471 1338 c38*) 1472 1339 echo c38-convex-bsd 1473 exit ;;1340 exit 0 ;; 1474 1341 c4*) 1475 1342 echo c4-convex-bsd 1476 exit ;;1343 exit 0 ;; 1477 1344 esac 1478 1345 fi … … 1485 1352 download the most up to date version of the config scripts from 1486 1353 1487 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1488 and 1489 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1354 ftp://ftp.gnu.org/pub/gnu/config/ 1490 1355 1491 1356 If the version you run ($0) is already up to date, please -
branches/blt4/gui/cf/config.sub
r2706 r2742 2 2 # Configuration validation subroutine script. 3 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 5 # Free Software Foundation, Inc. 6 7 timestamp='2008-04-14' 4 # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 5 6 timestamp='2003-02-22' 8 7 9 8 # This file is (in principle) common to ALL GNU software. … … 23 22 # You should have received a copy of the GNU General Public License 24 23 # along with this program; if not, write to the Free Software 25 # Foundation, Inc., 5 1 Franklin Street - Fifth Floor, Boston, MA26 # 02110-1301, USA.27 # 24 # Foundation, Inc., 59 Temple Place - Suite 330, 25 # Boston, MA 02111-1307, USA. 26 28 27 # As a special exception to the GNU General Public License, if you 29 28 # distribute this file as part of a program that contains a 30 29 # configuration script generated by Autoconf, you may include it under 31 30 # the same distribution terms that you use for the rest of that program. 32 33 31 34 32 # Please send patches to <config-patches@gnu.org>. Submit a context … … 73 71 GNU config.sub ($timestamp) 74 72 75 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ,76 2002, 2003, 2004, 2005, 2006, 2007, 2008Free Software Foundation, Inc.73 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 74 Free Software Foundation, Inc. 77 75 78 76 This is free software; see the source for copying conditions. There is NO … … 86 84 case $1 in 87 85 --time-stamp | --time* | -t ) 88 echo "$timestamp" ; exit ;;86 echo "$timestamp" ; exit 0 ;; 89 87 --version | -v ) 90 echo "$version" ; exit ;;88 echo "$version" ; exit 0 ;; 91 89 --help | --h* | -h ) 92 echo "$usage"; exit ;;90 echo "$usage"; exit 0 ;; 93 91 -- ) # Stop option processing 94 92 shift; break ;; … … 102 100 # First pass through any local machine types. 103 101 echo $1 104 exit ;;102 exit 0;; 105 103 106 104 * ) … … 121 119 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 122 120 case $maybe_os in 123 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ 124 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ 125 storm-chaos* | os2-emx* | rtmk-nova*) 121 nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) 126 122 os=-$maybe_os 127 123 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` … … 149 145 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 150 146 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 151 -apple | -axis | -knuth | -cray)147 -apple | -axis) 152 148 os= 153 149 basic_machine=$1 … … 174 170 os=-hiuxwe2 175 171 ;; 176 -sco6)177 os=-sco5v6178 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`179 ;;180 172 -sco5) 181 173 os=-sco3.2v5 … … 191 183 ;; 192 184 -sco3.2v[4-9]*) 193 # Don't forget version if it is 3.2v4 or newer.194 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`195 ;;196 -sco5v6*)197 185 # Don't forget version if it is 3.2v4 or newer. 198 186 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` … … 241 229 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 242 230 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 243 | am33_2.0 \ 244 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ 245 | bfin \ 246 | c4x | clipper \ 231 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ 232 | clipper \ 247 233 | d10v | d30v | dlx | dsp16xx \ 248 | f ido | fr30 | frv \234 | fr30 | frv \ 249 235 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 250 236 | i370 | i860 | i960 | ia64 \ 251 | ip2k | iq2000 \ 252 | m32c | m32r | m32rle | m68000 | m68k | m88k \ 253 | maxq | mb | microblaze | mcore | mep | metag \ 237 | ip2k \ 238 | m32r | m68000 | m68k | m88k | mcore \ 254 239 | mips | mipsbe | mipseb | mipsel | mipsle \ 255 240 | mips16 \ 256 241 | mips64 | mips64el \ 257 | mips64 octeon | mips64octeonel \242 | mips64vr | mips64vrel \ 258 243 | mips64orion | mips64orionel \ 259 | mips64r5900 | mips64r5900el \260 | mips64vr | mips64vrel \261 244 | mips64vr4100 | mips64vr4100el \ 262 245 | mips64vr4300 | mips64vr4300el \ 263 246 | mips64vr5000 | mips64vr5000el \ 264 | mips64vr5900 | mips64vr5900el \265 247 | mipsisa32 | mipsisa32el \ 266 248 | mipsisa32r2 | mipsisa32r2el \ 267 249 | mipsisa64 | mipsisa64el \ 268 | mipsisa64r2 | mipsisa64r2el \269 250 | mipsisa64sb1 | mipsisa64sb1el \ 270 251 | mipsisa64sr71k | mipsisa64sr71kel \ 271 252 | mipstx39 | mipstx39el \ 272 253 | mn10200 | mn10300 \ 273 | mt \274 254 | msp430 \ 275 | nios | nios2 \276 255 | ns16k | ns32k \ 277 | o r32 \256 | openrisc | or32 \ 278 257 | pdp10 | pdp11 | pj | pjl \ 279 258 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 280 259 | pyramid \ 281 | score \ 282 | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 260 | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ 283 261 | sh64 | sh64le \ 284 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 285 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 286 | spu | strongarm \ 287 | tahoe | thumb | tic4x | tic80 | tron \ 262 | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ 263 | strongarm \ 264 | tahoe | thumb | tic80 | tron \ 288 265 | v850 | v850e \ 289 266 | we32k \ 290 | x86 | x c16x | xscale | xscalee[bl]| xstormy16 | xtensa \267 | x86 | xscale | xstormy16 | xtensa \ 291 268 | z8k) 292 269 basic_machine=$basic_machine-unknown … … 298 275 ;; 299 276 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 300 ;;301 ms1)302 basic_machine=mt-unknown303 277 ;; 304 278 … … 321 295 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 322 296 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 323 | avr-* | avr32-*\324 | b fin-* | bs2000-* \297 | avr-* \ 298 | bs2000-* \ 325 299 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 326 | clipper-* | c raynv-* | cydra-* \300 | clipper-* | cydra-* \ 327 301 | d10v-* | d30v-* | dlx-* \ 328 302 | elxsi-* \ 329 | f30[01]-* | f700-* | f ido-* | fr30-* | frv-* | fx80-* \303 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ 330 304 | h8300-* | h8500-* \ 331 305 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 332 306 | i*86-* | i860-* | i960-* | ia64-* \ 333 | ip2k-* | iq2000-*\334 | m32 c-* | m32r-* | m32rle-* \307 | ip2k-* \ 308 | m32r-* \ 335 309 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 336 | m88110-* | m88k-* | m axq-* | mcore-* | metag-* \310 | m88110-* | m88k-* | mcore-* \ 337 311 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 338 312 | mips16-* \ 339 313 | mips64-* | mips64el-* \ 340 | mips64 octeon-* | mips64octeonel-* \314 | mips64vr-* | mips64vrel-* \ 341 315 | mips64orion-* | mips64orionel-* \ 342 | mips64r5900-* | mips64r5900el-* \343 | mips64vr-* | mips64vrel-* \344 316 | mips64vr4100-* | mips64vr4100el-* \ 345 317 | mips64vr4300-* | mips64vr4300el-* \ 346 318 | mips64vr5000-* | mips64vr5000el-* \ 347 | mips64vr5900-* | mips64vr5900el-* \348 319 | mipsisa32-* | mipsisa32el-* \ 349 320 | mipsisa32r2-* | mipsisa32r2el-* \ 350 321 | mipsisa64-* | mipsisa64el-* \ 351 | mipsisa64r2-* | mipsisa64r2el-* \352 322 | mipsisa64sb1-* | mipsisa64sb1el-* \ 353 323 | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 354 324 | mipstx39-* | mipstx39el-* \ 355 | mmix-* \356 | mt-* \357 325 | msp430-* \ 358 | nios-* | nios2-* \ 359 | none-* | np1-* | ns16k-* | ns32k-* \ 326 | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ 360 327 | orion-* \ 361 328 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ … … 363 330 | pyramid-* \ 364 331 | romp-* | rs6000-* \ 365 | sh-* | sh[1234]-* | sh[2 4]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \332 | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ 366 333 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 367 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 368 | sparclite-* \ 369 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ 334 | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ 335 | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ 370 336 | tahoe-* | thumb-* \ 371 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-*\337 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 372 338 | tron-* \ 373 339 | v850-* | v850e-* | vax-* \ 374 340 | we32k-* \ 375 | x86-* | x86_64-* | x c16x-* | xps100-* | xscale-* | xscalee[bl]-* \376 | x stormy16-* | xtensa*-* \341 | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ 342 | xtensa-* \ 377 343 | ymp-* \ 378 344 | z8k-*) 379 ;;380 # Recognize the basic CPU types without company name, with glob match.381 xtensa*)382 basic_machine=$basic_machine-unknown383 345 ;; 384 346 # Recognize the various machine names and aliases which stand … … 398 360 os=-udi 399 361 ;; 400 abacus)401 basic_machine=abacus-unknown402 ;;403 362 adobe68k) 404 363 basic_machine=m68010-adobe … … 415 374 os=-bsd 416 375 ;; 417 amd64)418 basic_machine=x86_64-pc419 ;;420 amd64-*)421 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`422 ;;423 376 amdahl) 424 377 basic_machine=580-amdahl … … 452 405 os=-dynix 453 406 ;; 454 blackfin)455 basic_machine=bfin-unknown456 os=-linux457 ;;458 blackfin-*)459 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`460 os=-linux461 ;;462 407 c90) 463 408 basic_machine=c90-cray … … 488 433 os=-unicos 489 434 ;; 490 craynv)491 basic_machine=craynv-cray492 os=-unicosmp493 ;;494 cr16)495 basic_machine=cr16-unknown496 os=-elf497 ;;498 435 crds | unos) 499 436 basic_machine=m68k-crds 500 437 ;; 501 crisv32 | crisv32-* | etraxfs*)502 basic_machine=crisv32-axis503 ;;504 438 cris | cris-* | etrax*) 505 439 basic_machine=cris-axis 506 ;;507 crx)508 basic_machine=crx-unknown509 os=-elf510 440 ;; 511 441 da30 | da30-*) … … 530 460 basic_machine=m88k-motorola 531 461 os=-sysv3 532 ;;533 dicos)534 basic_machine=i686-pc535 os=-dicos536 ;;537 djgpp)538 basic_machine=i586-pc539 os=-msdosdjgpp540 462 ;; 541 463 dpx20 | dpx20-*) … … 689 611 os=-sysv 690 612 ;; 691 m68knommu)692 basic_machine=m68k-unknown693 os=-linux694 ;;695 m68knommu-*)696 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`697 os=-linux698 ;;699 613 m88k-omron*) 700 614 basic_machine=m88k-omron … … 709 623 ;; 710 624 mingw32) 711 basic_machine=i 386-pc625 basic_machine=i686-pc 712 626 os=-mingw32 713 627 ;; 714 m ingw32ce)715 basic_machine= arm-unknown716 os=-m ingw32ce628 msys) 629 basic_machine=i686-pc 630 os=-msys 717 631 ;; 718 632 miniframe) … … 729 643 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 730 644 ;; 645 mmix*) 646 basic_machine=mmix-knuth 647 os=-mmixware 648 ;; 731 649 monitor) 732 650 basic_machine=m68k-rom68k … … 740 658 basic_machine=i386-pc 741 659 os=-msdos 742 ;;743 ms1-*)744 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`745 660 ;; 746 661 mvs) … … 812 727 basic_machine=np1-gould 813 728 ;; 729 nv1) 730 basic_machine=nv1-cray 731 os=-unicosmp 732 ;; 814 733 nsr-tandem) 815 734 basic_machine=nsr-tandem … … 819 738 os=-proelf 820 739 ;; 821 o penrisc | openrisc-*)740 or32 | or32-*) 822 741 basic_machine=or32-unknown 823 ;; 824 os400) 825 basic_machine=powerpc-ibm 826 os=-os400 742 os=-coff 827 743 ;; 828 744 OSE68000 | ose68000) … … 842 758 os=-osf 843 759 ;; 844 parisc)845 basic_machine=hppa-unknown846 os=-linux847 ;;848 parisc-*)849 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`850 os=-linux851 ;;852 760 pbd) 853 761 basic_machine=sparc-tti … … 859 767 basic_machine=ns32k-pc532 860 768 ;; 861 pc98)862 basic_machine=i386-pc863 ;;864 pc98-*)865 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`866 ;;867 769 pentium | p5 | k5 | k6 | nexgen | viac3) 868 770 basic_machine=i586-pc … … 871 773 basic_machine=i686-pc 872 774 ;; 873 pentiumii | pentium2 | pentiumiii | pentium3)775 pentiumii | pentium2) 874 776 basic_machine=i686-pc 875 ;;876 pentium4)877 basic_machine=i786-pc878 777 ;; 879 778 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) … … 883 782 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 884 783 ;; 885 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)784 pentiumii-* | pentium2-*) 886 785 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 887 ;;888 pentium4-*)889 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`890 786 ;; 891 787 pn) … … 921 817 os=-pw32 922 818 ;; 923 rdos)924 basic_machine=i386-pc925 os=-rdos926 ;;927 819 rom68k) 928 820 basic_machine=m68k-rom68k … … 951 843 basic_machine=mipsisa64sb1el-unknown 952 844 ;; 953 sde)954 basic_machine=mipsisa32-sde955 os=-elf956 ;;957 sei)958 basic_machine=mips-sei959 os=-seiux960 ;;961 845 sequent) 962 846 basic_machine=i386-sequent … … 966 850 os=-hms 967 851 ;; 968 sh5el)969 basic_machine=sh5le-unknown970 ;;971 sh64)972 basic_machine=sh64-unknown973 ;;974 852 sparclite-wrs | simso-wrs) 975 853 basic_machine=sparclite-wrs … … 1046 924 os=-unicos 1047 925 ;; 926 tic4x | c4x*) 927 basic_machine=tic4x-unknown 928 os=-coff 929 ;; 1048 930 tic54x | c54x*) 1049 931 basic_machine=tic54x-unknown … … 1058 940 os=-coff 1059 941 ;; 1060 tile*)1061 basic_machine=tile-unknown1062 os=-linux-gnu1063 ;;1064 942 tx39) 1065 943 basic_machine=mipstx39-unknown … … 1075 953 basic_machine=m68k-ncr 1076 954 ;; 1077 tpf)1078 basic_machine=s390x-ibm1079 os=-tpf1080 ;;1081 955 udi29k) 1082 956 basic_machine=a29k-amd … … 1121 995 basic_machine=hppa1.1-winbond 1122 996 os=-proelf 1123 ;;1124 xbox)1125 basic_machine=i686-pc1126 os=-mingw321127 997 ;; 1128 998 xps | xps100) … … 1156 1026 basic_machine=romp-ibm 1157 1027 ;; 1158 mmix)1159 basic_machine=mmix-knuth1160 ;;1161 1028 rs6000) 1162 1029 basic_machine=rs6000-ibm … … 1175 1042 basic_machine=we32k-att 1176 1043 ;; 1177 sh [1234] | sh[24]a| sh[34]eb | sh[1234]le | sh[23]ele)1044 sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) 1178 1045 basic_machine=sh-unknown 1179 1046 ;; 1180 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 1047 sh64) 1048 basic_machine=sh64-unknown 1049 ;; 1050 sparc | sparcv9 | sparcv9b) 1181 1051 basic_machine=sparc-sun 1182 1052 ;; … … 1251 1121 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1252 1122 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1253 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 1254 | -openbsd* | -solidbsd* \ 1255 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1256 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1123 | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ 1124 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1257 1125 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1258 1126 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1259 1127 | -chorusos* | -chorusrdb* \ 1260 1128 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1261 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ 1262 | -uxpv* | -beos* | -mpeix* | -udk* \ 1129 | -mingw32* | -msys* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ 1263 1130 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1264 1131 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ … … 1266 1133 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1267 1134 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1268 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1269 | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) 1135 | -powermax* | -dnix*) 1270 1136 # Remember, each alternative MUST END IN *, to match a version number. 1271 1137 ;; … … 1285 1151 ;; 1286 1152 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 1287 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku*\1153 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ 1288 1154 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1289 1155 ;; … … 1291 1157 os=`echo $os | sed -e 's|mac|macos|'` 1292 1158 ;; 1293 -linux-dietlibc)1294 os=-linux-dietlibc1295 ;;1296 1159 -linux*) 1297 1160 os=`echo $os | sed -e 's|linux|linux-gnu|'` … … 1306 1169 os=-openedition 1307 1170 ;; 1308 -os400*)1309 os=-os4001310 ;;1311 1171 -wince*) 1312 1172 os=-wince … … 1329 1189 -atheos*) 1330 1190 os=-atheos 1331 ;;1332 -syllable*)1333 os=-syllable1334 1191 ;; 1335 1192 -386bsd) … … 1355 1212 os=-sysv4 1356 1213 ;; 1357 -tpf*)1358 os=-tpf1359 ;;1360 1214 -triton*) 1361 1215 os=-sysv3 … … 1393 1247 -kaos*) 1394 1248 os=-kaos 1395 ;;1396 -zvmoe)1397 os=-zvmoe1398 ;;1399 -dicos*)1400 os=-dicos1401 1249 ;; 1402 1250 -none) … … 1422 1270 1423 1271 case $basic_machine in 1424 score-*)1425 os=-elf1426 ;;1427 spu-*)1428 os=-elf1429 ;;1430 1272 *-acorn) 1431 1273 os=-riscix1.2 … … 1436 1278 arm*-semi) 1437 1279 os=-aout 1438 ;;1439 c4x-* | tic4x-*)1440 os=-coff1441 1280 ;; 1442 1281 # This must come before the *-dec entry. … … 1465 1304 os=-aout 1466 1305 ;; 1467 mep-*)1468 os=-elf1469 ;;1470 1306 mips*-cisco) 1471 1307 os=-elf … … 1486 1322 os=-beos 1487 1323 ;; 1488 *-haiku)1489 os=-haiku1490 ;;1491 1324 *-ibm) 1492 1325 os=-aix 1493 ;;1494 *-knuth)1495 os=-mmixware1496 1326 ;; 1497 1327 *-wec) … … 1627 1457 vendor=ibm 1628 1458 ;; 1629 -os400*)1630 vendor=ibm1631 ;;1632 1459 -ptx*) 1633 1460 vendor=sequent 1634 1461 ;; 1635 -tpf*)1636 vendor=ibm1637 ;;1638 1462 -vxsim* | -vxworks* | -windiss*) 1639 1463 vendor=wrs … … 1660 1484 1661 1485 echo $basic_machine$os 1662 exit 1486 exit 0 1663 1487 1664 1488 # Local variables: -
branches/blt4/gui/scripts/Makefile.in
r2690 r2742 131 131 $(srcdir)/vtkcontourviewer.tcl \ 132 132 $(srcdir)/vtkstreamlinesviewer.tcl \ 133 $(srcdir)/vtkvolumeviewer.tcl \ 134 $(srcdir)/vtkheightmapviewer.tcl \ 133 135 $(srcdir)/xylegend.tcl \ 134 136 $(srcdir)/xyprint.tcl \ -
branches/blt4/gui/scripts/field.tcl
r2690 r2742 35 35 public method flowhints { cname } 36 36 public method type {} 37 public method vtkdata {{what -overall}} 37 38 38 39 protected method _build {} … … 50 51 private variable _comp2vtk ;# maps component name => vtkFloatArray 51 52 private variable _comp2vtkstreamlines ;# maps component name => vtkFloatArray 53 private variable _comp2vtkvolume ;# maps component name => vtkFloatArray 54 private variable _comp2volume ;# maps component name => vtkFloatArray 52 55 private variable _comp2dx ;# maps component name => OpenDX data 53 56 private variable _comp2unirect2d ;# maps component name => unirect2d obj … … 201 204 return "" ;# no mesh -- it's embedded in the value data 202 205 } 206 if {[info exists _comp2vtkvolume($what)]} { 207 return "" ;# no mesh -- it's embedded in the value data 208 } 203 209 if {[info exists _comp2unirect2d($what)]} { 204 210 set mobj [lindex $_comp2unirect2d($what) 0] … … 261 267 if { [info exists _comp2vtk($what)] } { 262 268 return "" 269 } 270 if { [info exists _comp2vtkvolume($what)] } { 271 return $_comp2vtkvolume($what) 263 272 } 264 273 if { [info exists _comp2vtkstreamlines($what)] } { … … 578 587 catch {unset _comp2dims} 579 588 catch {unset _comp2style} 589 array unset _comp2volume 580 590 array unset _comp2vtkstreamlines 581 591 array unset _comp2unirect2d … … 603 613 } 604 614 } elseif {[$_field element $cname.opendx] != ""} { 605 set type "opendx" 615 global env 616 if { [info exists env(VTKVOLUME)] } { 617 set type "vtkvolume" 618 } else { 619 set type "dx" 620 } 606 621 } elseif {[$_field element $cname.dx] != ""} { 607 set type "dx" 622 global env 623 if { [info exists env(VTKVOLUME)] } { 624 set type "vtkvolume" 625 } else { 626 set type "dx" 627 } 608 628 } 609 629 set _comp2style($cname) "" … … 796 816 set _comp2style($cname) [$_field get $cname.style] 797 817 incr _counter 818 } elseif {$type == "vtkvolume"} { 819 set _comp2dims($cname) "3D" 820 # Allow redirects to another element. 821 set data [$_field get -decode no $cname.dx] 822 set data [Rappture::encoding::decode -as zb64 $data] 823 if 1 { 824 set file "/tmp/$cname.dx" 825 set f [open $file "w"] 826 puts $f $data 827 close $f 828 } 829 set data [Rappture::ConvertDxToVtk $data] 830 if 1 { 831 set file "/tmp/$cname.vtk" 832 set f [open $file "w"] 833 puts $f $data 834 close $f 835 } 836 set _comp2vtkvolume($cname) $data 837 set _comp2style($cname) [$_field get $cname.style] 838 incr _counter 798 839 } elseif {$type == "vtkstreamlines2"} { 799 840 set _comp2dims($cname) "3D" … … 801 842 set _comp2style($cname) [$_field get $cname.style] 802 843 incr _counter 803 } elseif {$type == "dx" } {844 } elseif {$type == "dx" } { 804 845 # 805 846 # HACK ALERT! Extract gzipped, base64-encoded OpenDX … … 809 850 set _comp2dims($cname) "3D" 810 851 set _comp2dx($cname) [$_field get -decode no $cname.dx] 852 if 1 { 853 set data [$_field get -decode yes $cname.dx] 854 set file "/tmp/junk.dx" 855 set f [open $file "w"] 856 puts $f $data 857 close $f 858 if { [string match "<ODX>*" $data] } { 859 set data [string range $data 5 end] 860 set _comp2dx($cname) \ 861 [Rappture::encoding::encode -as zb64 $data] 862 } 863 } 811 864 set _comp2style($cname) [$_field get $cname.style] 812 865 if {[$_field element $cname.flow] != ""} { … … 955 1008 return $_comp2extents($what) 956 1009 } 1010 1011 # ---------------------------------------------------------------------- 1012 # USAGE: blob ?<name>? 1013 # 1014 # Returns a string representing the blob of data for the mesh and values. 1015 # ---------------------------------------------------------------------- 1016 itcl::body Rappture::Field::vtkdata {{what -overall}} { 1017 if {$what == "component0"} { 1018 set what "component" 1019 } 1020 if {[info exists _comp2xy($what)]} { 1021 return "" 1022 } 1023 if { [info exists _comp2vtk($what)] } { 1024 return "" 1025 } 1026 if { [info exists _comp2vtkstreamlines($what)] } { 1027 # Return the contents of the vtk file. 1028 return $_comp2vtkstreamlines($what) 1029 } 1030 if { [info exists _comp2vtkvolume($what)] } { 1031 # Return the contents of the vtk file. 1032 return $_comp2vtkvolume($what) 1033 } 1034 if {[info exists _comp2dx($what)]} { 1035 return $_comp2dx($what) 1036 } 1037 if {[info exists _comp2unirect2d($what)]} { 1038 return [$_comp2unirect2d($what) blob] 1039 } 1040 if {[info exists _comp2unirect3d($what)]} { 1041 return [$_comp2unirect3d($what) blob] 1042 } 1043 error "bad option \"$what\": should be [join [lsort [array names _comp2dims]] {, }]" 1044 } -
branches/blt4/gui/scripts/field2dresult.tcl
r2208 r2742 61 61 set servers [Rappture::VisViewer::GetServerList "nanovis"] 62 62 } 63 "vtkcontour" {63 "vtkcontour" - "vtkheightmap" { 64 64 set servers [Rappture::VisViewer::GetServerList "vtkvis"] 65 65 } … … 76 76 itk_component add renderer { 77 77 Rappture::HeightmapViewer $itk_interior.ren $servers 78 } 79 } 80 "vtkheightmap" { 81 itk_component add renderer { 82 Rappture::VtkHeightmapViewer $itk_interior.ren $servers 78 83 } 79 84 } -
branches/blt4/gui/scripts/field3dresult.tcl
r2534 r2742 59 59 set servers [Rappture::VisViewer::GetServerList "nanovis"] 60 60 } 61 "vtkcontour" - "vtkstreamlines" {61 "vtkcontour" - "vtkstreamlines" - "vtkvolume" - "vtkviewer" { 62 62 set servers [Rappture::VisViewer::GetServerList "vtkvis"] 63 63 } … … 81 81 Rappture::FlowvisViewer $itk_interior.ren $servers 82 82 } 83 } 84 "vtkvolume" { 85 catch { 86 itk_component add renderer { 87 Rappture::VtkVolumeViewer $itk_interior.ren $servers 88 } 89 } errs 90 puts stderr errs=$errs 83 91 } 84 92 "vtkstreamlines" { -
branches/blt4/gui/scripts/molvisviewer.tcl
r2692 r2742 601 601 0,1 $f.cancel 602 602 blt::table $inner \ 603 0,0 $inner.pdb -anchor w \ 604 1,0 $inner.image -anchor w \ 605 2,0 $f -fill x -pady 4 603 0,0 $inner.summary -anchor w \ 604 1,0 $inner.pdb -anchor w \ 605 2,0 $inner.image -anchor w \ 606 3,0 $f -fill x -pady 4 606 607 $inner.pdb select 607 608 } else { … … 1209 1210 set _view(c) $c 1210 1211 if { !$_rotatePending } { 1211 $_dispatcher event -after 50 !rotate1212 $_dispatcher event -after 100 !rotate 1212 1213 set _rotatePending 1 1213 1214 } -
branches/blt4/gui/scripts/nanovisviewer.tcl
r2048 r2742 156 156 private variable _first "" ;# This is the topmost volume. 157 157 private variable _buffering 0 158 158 159 159 # This 160 160 # indicates which isomarkers and transfer … … 181 181 # ---------------------------------------------------------------------- 182 182 itcl::body Rappture::NanovisViewer::constructor {hostlist args} { 183 set _serverType "nanovis" 183 184 184 185 # Draw legend event … … 237 238 238 239 itk_component add 3dview { 239 label $itk_component(plotarea).v ol-image $_image(plot) \240 label $itk_component(plotarea).view -image $_image(plot) \ 240 241 -highlightthickness 0 -borderwidth 0 241 242 } { … … 749 750 if { ![info exists _vol2style($vol)] } { 750 751 puts stderr "unknown volume $vol" 751 continue; 752 continue; # How does this happen? 752 753 } 753 754 set tf $_vol2style($vol) … … 843 844 } 844 845 } 846 847 # The colormap may have changed. Resync the slicers with the colormap. 848 set vols [CurrentVolumes -cutplanes] 849 SendCmd "volume data state $_settings($this-volume) $vols" 850 851 # Adjust the cutplane for only the first component in the topmost volume 852 # (i.e. the first volume designated in the field). 853 set vol [lindex $vols 0] 854 foreach axis {x y z} { 855 # Turn off cutplanes for all volumes 856 SendCmd "cutplane state 0 $axis" 857 if { $_settings($this-${axis}cutplane) } { 858 # Turn on cutplane for this particular volume and set the position 859 SendCmd "cutplane state 1 $axis $vol" 860 set pos [expr {0.01*$_settings($this-${axis}cutposition)}] 861 SendCmd "cutplane position $pos $axis $vol" 862 } 863 } 845 864 } 846 865 … … 985 1004 updatetransferfuncs 986 1005 } 987 988 # Sync the state of slicers989 set vols [CurrentVolumes -cutplanes]990 1006 foreach axis {x y z} { 991 SendCmd "cutplane state $_settings($this-${axis}cutplane) $axis $vols" 992 set pos [expr {0.01*$_settings($this-${axis}cutposition)}] 993 SendCmd "cutplane position $pos $axis $vols" 994 } 995 SendCmd "volume data state $_settings($this-volume) $vols" 996 set _buffering 0; # Turn off buffering. 1007 # Turn off cutplanes for all volumes 1008 SendCmd "cutplane state 0 $axis" 1009 } 1010 set _buffering 0; # Turn off buffering. 997 1011 # Actually write the commands to the server socket. If it fails, we don't 998 1012 # care. We're finished here. 999 1013 blt::busy hold $itk_component(hull) 1000 SendBytes $_outbuf; 1014 SendBytes $_outbuf; 1001 1015 blt::busy release $itk_component(hull) 1002 set _outbuf ""; # Clear the buffer.1016 set _outbuf ""; # Clear the buffer. 1003 1017 } 1004 1018 … … 1022 1036 } 1023 1037 array set style [lindex [$_first components -style $comp] 0] 1024 if { $what != "-cutplanes" || $style(-cutplanes)} {1038 if { $what != "-cutplanes" || $style(-cutplanes) } { 1025 1039 lappend rlist $vol 1026 1040 } … … 1300 1314 if { [isconnected] } { 1301 1315 set vols [CurrentVolumes -cutplanes] 1302 SendCmd "cutplane state $bool $axis $vols" 1316 set vol [lindex $vols 0] 1317 SendCmd "cutplane state $bool $axis $vol" 1303 1318 } 1304 1319 if { $bool } { … … 1992 2007 set newpos [expr {0.01*$newval}] 1993 2008 set vols [CurrentVolumes -cutplanes] 1994 SendCmd "cutplane position $newpos $axis $vols" 2009 set vol [lindex $vols 0] 2010 SendCmd "cutplane position $newpos $axis $vol" 1995 2011 } 1996 2012 default { -
branches/blt4/gui/scripts/numberresult.tcl
r2716 r2742 875 875 set g $itk_component(plot) 876 876 set elem "" 877 877 878 878 # Peek inside of Blt_ZoomStack package to see if we're currently in the 879 879 # middle of a zoom selection. … … 889 889 # for dealing with xy line plots 890 890 set elem $info(name) 891 892 891 # Some elements are generated dynamically and therefore will 893 # not have a data objobject associated with them.892 # not have a data object associated with them. 894 893 set mapx [$g element cget $elem -mapx] 895 894 set mapy [$g element cget $elem -mapy] -
branches/blt4/gui/scripts/resultset.tcl
r2048 r2742 1095 1095 } 1096 1096 if { $_active == "" } { 1097 return 1097 return; # Nothing active. Don't do anything. 1098 1098 } 1099 1099 eval lappend params [_getValues $_active all] … … 1527 1527 if {$col == "xmlobj"} { 1528 1528 set val "#[expr {$which+1}]" 1529 } else { 1530 set val [lindex [$_results get -format $col $which] 0] 1529 } else { 1530 # Be careful giving singleton elements as the "columns" 1531 # argument to "Tuples::get". It is expecting a list. 1532 set val [lindex [$_results get -format [list $col] $which] 0] 1531 1533 } 1532 1534 if {[info exists label2val($val)]} { … … 1620 1622 foreach col $_cntlInfo($this-all) { 1621 1623 set quantity $_cntlInfo($this-$col-label) 1622 set val [lindex [$_results get -format $col $index] 0] 1624 # Be careful giving singleton elements as the "columns" 1625 # argument to "Tuples::get". It is expecting a list. 1626 set val [lindex [$_results get -format [list $col] $index] 0] 1623 1627 if {$col == "xmlobj"} { 1624 1628 set num [lindex [$_results find -format xmlobj $val] 0] -
branches/blt4/gui/scripts/resultviewer.tcl
r2561 r2742 220 220 set servers [Rappture::VisViewer::GetServerList "vtkvis"] 221 221 set w $itk_interior.vtkviewer 222 catch { Rappture::VtkViewer $w $servers } errs 223 puts stderr errs=$errs 222 Rappture::VtkViewer $w $servers 224 223 set _mode2widget($mode) $w 225 224 } … … 267 266 if { [$dataobj hints type] == "contour" } { 268 267 set resultMode "vtkcontour" 268 } elseif { [info exists env(VTKHEIGHTMAP)] } { 269 set resultMode "vtkheightmap" 269 270 } else { 270 271 set resultMode "heightmap" … … 298 299 } 299 300 } 301 "vtkvolume" { 302 set fmt "vtkvolume" 303 } 300 304 "vtkstreamlines" { 301 305 set fmt "vtkstreamlines" -
branches/blt4/gui/scripts/sequenceresult.tcl
r2201 r2742 397 397 global readyForNextFrame 398 398 set readyForNextFrame 1; # By default, always ready 399 400 # toggle the button to "play" mode 401 $itk_component(play) configure \ 402 -bitmap [Rappture::icon play] \ 403 -command [itcl::code $this play] 399 400 # Check if the play button still exists. We may be in the process 401 # of destroying the widget. 402 if { [info exists itk_component(play)] } { 403 # toggle the button to "play" mode 404 $itk_component(play) configure \ 405 -bitmap [Rappture::icon play] \ 406 -command [itcl::code $this play] 407 } 404 408 } 405 409 -
branches/blt4/gui/scripts/sidebarframe.tcl
r2559 r2742 310 310 # argument can be a panel index, name, or title. 311 311 # ---------------------------------------------------------------------- 312 itcl::body Rappture::SidebarFrame::select { 312 itcl::body Rappture::SidebarFrame::select {which} { 313 313 set pname "" 314 314 switch -glob -- $which { -
branches/blt4/gui/scripts/tool.tcl
r2646 r2742 206 206 207 207 if { $status != 0 } { 208 foreach { pstatuspid mesg} $::Rappture::Tool::job(control) break209 if { $ pstatus!= "EXITED" } {210 set result "Abnormal program termination \"$ pstatus\": $mesg"208 foreach {code pid mesg} $::Rappture::Tool::job(control) break 209 if { $code != "EXITED" } { 210 set result "Abnormal program termination \"$code\": $mesg" 211 211 return [list $status $result] 212 212 } 213 213 } 214 214 } 215 215 # ...job is finished 216 216 array set times [Rappture::rusage measure] 217 217 218 if {[resources -jobprotocol] != "submit"} { 218 219 set id [$_xmlobj get tool.id] -
branches/blt4/gui/scripts/visviewer.tcl
r2537 r2742 25 25 set _servers(vtkvis) "localhost:2010" 26 26 27 protected variable _sid "" ;# socket connection to server 28 private common _done ;# Used to indicate status of send. 29 private variable _buffer ;# buffer for incoming/outgoing commands 27 protected variable _serverType "???";# Type of server. 28 protected variable _sid "" ; # socket connection to server 29 private common _done ; # Used to indicate status of send. 30 private variable _buffer ; # buffer for incoming/outgoing commands 30 31 private variable _initialized 31 32 private variable _isOpen 0 33 private variable _afterId -1 34 private variable _icon 0 35 32 36 # Number of milliseconds to wait before idle timeout. 33 37 # If greater than 0, automatically disconnect from the visualization … … 37 41 #private variable _idleTimeout 0; # No timeout 38 42 39 protected variable _dispatcher "" ;# dispatcher for !events40 protected variable _hosts "" ; # list of hosts for server41 protected variable _parser "" ; # interpreter for incoming commands43 protected variable _dispatcher ""; # dispatcher for !events 44 protected variable _hosts "" ; # list of hosts for server 45 protected variable _parser "" ; # interpreter for incoming commands 42 46 protected variable _image 43 47 protected variable _hostname … … 56 60 private method SendHelper.old {} 57 61 private method CheckConnection {} 62 private method SplashScreen { state } 58 63 59 64 protected method SendEcho { channel {data ""} } … … 67 72 protected method Color2RGB { color } 68 73 protected method Euler2XYZ { theta phi psi } 74 protected method StartWaiting {} 75 protected method StopWaiting {} 76 77 private method Waiting { option widget } 69 78 70 79 private proc CheckNameList { namelist } { 71 set pattern {^[a-zA-Z0-9\.]+:[0-9]+(,[a-zA-Z0-9\.]+:[0-9]+)*$} 72 if { ![regexp $pattern $namelist match] } { 73 error "bad visualization server address \"$namelist\": should be host:port,host:port,..." 80 foreach host $namelist { 81 set pattern {^[a-zA-Z0-9\.]+:[0-9]} 82 if { ![regexp $pattern $host match] } { 83 error "bad visualization server address \"$host\": should be host:port,host:port,..." 84 } 74 85 } 75 86 } 76 public proc GetServerList { tag } { 77 return $_servers($tag) 78 } 79 public proc SetServerList { tag namelist } { 87 public proc GetServerList { type } { 88 return $_servers($type) 89 } 90 public proc SetServerList { type namelist } { 91 # Convert the comma separated list into a Tcl list. OGRE also adds 92 # a trailing comma that we want to ignore. 93 regsub -all "," $namelist " " namelist 80 94 CheckNameList $namelist 81 set _servers($tag) $namelist 95 set _servers($type) $namelist 96 } 97 public proc RemoveServerFromList { type server } { 98 if { ![info exists _servers($type)] } { 99 error "unknown server type \"$type\"" 100 } 101 set i [lsearch $_servers($type) $server] 102 if { $i < 0 } { 103 return 104 } 105 set _servers($type) [lreplace $_servers($type) $i $i] 82 106 } 83 107 public proc SetPymolServerList { namelist } { … … 106 130 $_dispatcher register !timeout 107 131 $_dispatcher dispatch $this !timeout "[itcl::code $this Disconnect]; list" 132 133 $_dispatcher register !waiting 108 134 109 135 CheckNameList $hostlist … … 118 144 $_parser hide $cmd 119 145 } 120 121 146 # 122 147 # Set up the widgets in the main body … … 155 180 # Shuffle the list of server hosts. 156 181 # 157 itcl::body Rappture::VisViewer::Shuffle { hostlist } { 158 set hosts [split $hostlist ,] 182 itcl::body Rappture::VisViewer::Shuffle { hosts } { 159 183 set randomHosts {} 160 184 set ticks [clock clicks] … … 200 224 itcl::body Rappture::VisViewer::Connect { hostlist } { 201 225 blt::busy hold $itk_component(hull) -cursor watch 202 # Can't call update because of all the pending stuff going on 203 #update 204 205 # Shuffle the list of servers so as to pick random 206 set servers [Shuffle $hostlist] 207 208 # Get the first server 209 foreach {hostname port} [split [lindex $servers 0] :] break 210 set servers [lrange $servers 1 end] 211 212 while {1} { 213 puts stderr "connecting to $hostname:$port..." 226 227 puts stderr "server type is $_serverType" 228 foreach server [Shuffle $hostlist] { 229 puts stderr "connecting to $server..." 230 foreach {hostname port} [split $server ":"] break 214 231 if { [catch {socket $hostname $port} _sid] != 0 } { 215 232 set _sid "" 216 if {[llength $servers] == 0} { 217 blt::busy release $itk_component(hull) 218 return 0 219 } 220 # Get the next server 221 foreach {hostname port} [split [lindex $servers 0] :] break 222 set servers [lrange $servers 1 end] 223 continue 224 } 225 set _hostname $hostname:$port 233 RemoveServerFromList $_serverType $server 234 continue 235 } 236 set _hostname $server 226 237 fconfigure $_sid -translation binary -encoding binary 227 238 228 # Read back a reconnection order239 # Read back the server identification string. 229 240 if { [gets $_sid data] <= 0 } { 230 error "reading from server" 241 set _sid "" 242 puts stderr "reading from server" 243 RemoveServerFromList $_serverType $server 244 continue 231 245 } 232 246 puts stderr "render server is $data" … … 242 256 return 1 243 257 } 244 #NOTREACHED245 258 blt::busy release $itk_component(hull) 259 set x [expr {[winfo rootx $itk_component(hull)]+10}] 260 set y [expr {[winfo rooty $itk_component(hull)]+10}] 261 Rappture::Tooltip::cue @$x,$y "Can't connect to any $_serverType visualization server. This may be a network problem. Wait a few moments and try resetting the view." 246 262 return 0 247 263 } … … 254 270 # 255 271 itcl::body Rappture::VisViewer::Disconnect {} { 272 after cancel $_afterId 256 273 $_dispatcher cancel !timeout 257 274 catch {close $_sid} … … 307 324 Rappture::Tooltip::cue hide 308 325 } else { 309 Rappture::Tooltip::cue @$x,$y "Can't connect to visualization server. This may be a network problem. Wait a few moments and try resetting the view."326 Rappture::Tooltip::cue @$x,$y "Can't connect to any $_serverType visualization server. This may be a network problem. Wait a few moments and try resetting the view." 310 327 return 0 311 328 } … … 400 417 flush $_sid 401 418 } 402 if 0 {403 if { ![CheckConnection] } {404 puts stderr "connection is now down"405 return 0406 }407 }408 419 return $_done($this) 420 } 421 422 # 423 # ReceiveBytes -- 424 # 425 # Read some number of bytes from the visualization server. 426 # 427 itcl::body Rappture::VisViewer::StartWaiting {} { 428 after cancel $_afterId 429 set _afterId [after 500 [itcl::code $this SplashScreen on]] 430 } 431 432 itcl::body Rappture::VisViewer::StopWaiting {} { 433 SplashScreen off 409 434 } 410 435 … … 539 564 } 540 565 } 566 567 itcl::body Rappture::VisViewer::SplashScreen { state } { 568 after cancel $_afterId 569 set _afterId -1 570 if { $state } { 571 if { [winfo exists $itk_component(plotarea).view.splash] } { 572 return 573 } 574 set inner [frame $itk_component(plotarea).view.splash] 575 $inner configure -relief raised -bd 2 576 label $inner.text1 -text "Rendering, please wait." \ 577 -font "Arial 10" 578 label $inner.icon 579 pack $inner -expand yes -anchor c 580 blt::table $inner \ 581 0,0 $inner.text1 -anchor w \ 582 0,1 $inner.icon 583 Waiting start $inner.icon 584 } else { 585 if { ![winfo exists $itk_component(plotarea).view.splash] } { 586 return 587 } 588 Waiting stop $itk_component(plotarea).view.splash 589 destroy $itk_component(plotarea).view.splash 590 } 591 } 592 593 itcl::body Rappture::VisViewer::Waiting { option widget } { 594 switch -- $option { 595 "start" { 596 $_dispatcher dispatch $this !waiting \ 597 "[itcl::code $this Waiting "next" $widget] ; list" 598 set _icon 0 599 $widget configure -image [Rappture::icon bigroller${_icon}] 600 $_dispatcher event -after 150 !waiting 601 } 602 "next" { 603 incr _icon 604 if { $_icon >= 8 } { 605 set _icon 0 606 } 607 $widget configure -image [Rappture::icon bigroller${_icon}] 608 $_dispatcher event -after 150 !waiting 609 } 610 "stop" { 611 $_dispatcher cancel !waiting 612 } 613 } 614 } -
branches/blt4/gui/scripts/vtkcontourviewer.tcl
r2591 r2742 144 144 # ---------------------------------------------------------------------- 145 145 itcl::body Rappture::VtkContourViewer::constructor {hostlist args} { 146 set _serverType "vtkvis" 146 147 package require vtk 147 148 # Draw legend event … … 790 791 set _image(legend) [image create picture] 791 792 } 793 $_image(legend) configure -data $bytes 792 794 puts stderr "read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>" 793 set src [image create picture -data $bytes]794 blt::winop image rotate $src $_image(legend) 90795 set dst $_image(legend)796 795 DrawLegend 797 796 } -
branches/blt4/gui/scripts/vtkstreamlinesviewer.tcl
r2591 r2742 68 68 protected method Disconnect {} 69 69 protected method DoResize {} 70 protected method DoReseed {} 70 71 protected method DoRotate {} 71 72 protected method AdjustSetting {what {value ""}} 72 protected method FixSettings { args }73 protected method InitSettings { args } 73 74 protected method Pan {option x y} 74 75 protected method Pick {x y} … … 79 80 protected method Rotate {option x y} 80 81 protected method SendCmd {string} 82 protected method SendCmdNoWait {string} 81 83 protected method Zoom {option} 82 84 … … 84 86 private method BuildAxisTab {} 85 87 private method BuildCameraTab {} 86 private method BuildColormap { colormap dataobj comp}87 private method BuildCut awayTab {}88 private method BuildColormap { name colors } 89 private method BuildCutplaneTab {} 88 90 private method BuildDownloadPopup { widget command } 89 91 private method BuildStreamsTab {} 90 92 private method BuildVolumeTab {} 91 93 private method ConvertToVtkData { dataobj comp } 92 private method DrawLegend {} 94 private method DrawLegend { title } 95 private method Combo { option } 93 96 private method EnterLegend { x y } 94 97 private method EventuallyResize { w h } 98 private method EventuallyReseed { numPoints } 95 99 private method EventuallyRotate { q } 100 private method EventuallySetCutplane { axis args } 96 101 private method GetImage { args } 97 102 private method GetVtkData { args } … … 102 107 private method RequestLegend {} 103 108 private method SetColormap { dataobj comp } 109 private method ChangeColormap { dataobj comp color } 110 private method ColorsToColormap { color } 104 111 private method SetLegendTip { x y } 105 112 private method SetObjectStyle { dataobj comp } … … 107 114 108 115 private variable _arcball "" 109 private variable _outbuf ;# buffer for outgoing commands 110 111 private variable _dlist "" ;# list of data objects 112 private variable _allDataObjs 116 private variable _outbuf ; # buffer for outgoing commands 117 118 private variable _dlist "" ; # list of data objects 113 119 private variable _obj2datasets 114 private variable _obj2ovride ; # maps dataobj => style override115 private variable _datasets ; # contains all the dataobj-component116 ; # datasets in the server117 private variable _colormaps ; # contains all the colormaps118 ; # in the server.120 private variable _obj2ovride ; # maps dataobj => style override 121 private variable _datasets ; # contains all the dataobj-component 122 ; # datasets in the server 123 private variable _colormaps ; # contains all the colormaps 124 ; # in the server. 119 125 private variable _dataset2style ;# maps dataobj-component to transfunc 120 private variable _style2datasets ;# maps tf back to list of 121 # dataobj-components using the tf. 122 123 private variable _click ;# info used for rotate operations 124 private variable _limits ;# autoscale min/max for all axes 125 private variable _view ;# view params for 3D view 126 127 private variable _click ; # info used for rotate operations 128 private variable _limits ; # autoscale min/max for all axes 129 private variable _view ; # view params for 3D view 126 130 private variable _settings 127 private variable _volume 128 private variable _axis 129 private variable _streamlines 130 private variable _reset 1 ;# indicates if camera needs to be reset 131 # to starting position. 132 133 private variable _first "" ;# This is the topmost dataset. 131 private variable _style; # Array of current component styles. 132 private variable _initialStyle; # Array of initial component styles. 133 private variable _reset 1; # indicates if camera needs to be reset 134 # to starting position. 135 136 private variable _first "" ; # This is the topmost dataset. 134 137 private variable _start 0 135 138 private variable _buffering 0 … … 137 140 private variable _seeds 138 141 139 common _downloadPopup ;# download options from popup142 common _downloadPopup; # download options from popup 140 143 private common _hardcopy 141 144 private variable _width 0 142 145 private variable _height 0 143 146 private variable _resizePending 0 147 private variable _reseedPending 0 144 148 private variable _rotatePending 0 149 private variable _cutplanePending 0 150 private variable _legendPending 0 145 151 private variable _outline 152 private variable _vectorFields 153 private variable _scalarFields 154 private variable _fields 155 private variable _currentField "" 156 private variable _field "" 157 private variable _numSeeds 200 158 private variable _colorMode "vmag";# Mode of colormap (vmag or scalar) 146 159 } 147 160 … … 155 168 # ---------------------------------------------------------------------- 156 169 itcl::body Rappture::VtkStreamlinesViewer::constructor {hostlist args} { 170 set _serverType "vtkvis" 157 171 package require vtk 172 158 173 # Rebuild event 159 174 $_dispatcher register !rebuild … … 164 179 $_dispatcher dispatch $this !resize "[itcl::code $this DoResize]; list" 165 180 181 # Reseed event 182 $_dispatcher register !reseed 183 $_dispatcher dispatch $this !reseed "[itcl::code $this DoReseed]; list" 184 166 185 # Rotate event 167 186 $_dispatcher register !rotate 168 187 $_dispatcher dispatch $this !rotate "[itcl::code $this DoRotate]; list" 169 188 170 set _outbuf "" 189 # Legend event 190 $_dispatcher register !legend 191 $_dispatcher dispatch $this !legend "[itcl::code $this RequestLegend]; list" 192 193 # X-Cutplane event 194 $_dispatcher register !xcutplane 195 $_dispatcher dispatch $this !xcutplane \ 196 "[itcl::code $this AdjustSetting cutplane-xposition]; list" 197 198 # Y-Cutplane event 199 $_dispatcher register !ycutplane 200 $_dispatcher dispatch $this !ycutplane \ 201 "[itcl::code $this AdjustSetting cutplane-yposition]; list" 202 203 # Z-Cutplane event 204 $_dispatcher register !zcutplane 205 $_dispatcher dispatch $this !zcutplane \ 206 "[itcl::code $this AdjustSetting cutplane-zposition]; list" 171 207 172 208 # … … 203 239 set _limits(zmax) 1.0 204 240 205 array set _axis [subst {206 xgrid 0207 ygrid 0208 zgrid 0209 xcutaway 0210 ycutaway 0211 zcutaway 0212 xposition 0213 yposition 0214 zposition 0215 xdirection -1216 ydirection -1217 zdirection -1218 visible 1219 labels 1220 }]221 array set _volume [subst {222 edges 0223 lighting 1224 opacity 40225 visible 1226 wireframe 0227 }]228 array set _streamlines [subst {229 seeds 0230 visible 1231 opacity 100232 }]233 241 array set _settings [subst { 234 legend 1 242 axis-xgrid 0 243 axis-ygrid 0 244 axis-zgrid 0 245 axis-xcutplane 0 246 axis-ycutplane 0 247 axis-zcutplane 0 248 axis-xposition 0 249 axis-yposition 0 250 axis-zposition 0 251 axis-visible 1 252 axis-labels 1 253 cutplane-edges 0 254 cutplane-xvisible 0 255 cutplane-yvisible 0 256 cutplane-zvisible 0 257 cutplane-xposition 50 258 cutplane-yposition 50 259 cutplane-zposition 50 260 cutplane-visible 1 261 cutplane-wireframe 0 262 cutplane-opacity 100 263 volume-edges 0 264 volume-lighting 1 265 volume-opacity 40 266 volume-visible 1 267 volume-wireframe 0 268 streamlines-seeds 0 269 streamlines-visible 1 270 streamlines-opacity 100 271 streamlines-numpoints 200 272 streamlines-lighting 1 273 streamlines-scale 1 274 legend-visible 1 235 275 }] 236 276 … … 243 283 } 244 284 285 itk_component add fieldmenu { 286 menu $itk_component(plotarea).menu -bg black -fg white -relief flat \ 287 -tearoff no 288 } { 289 usual 290 ignore -background -foreground -relief -tearoff 291 } 245 292 set c $itk_component(view) 246 293 bind $c <Configure> [itcl::code $this EventuallyResize %w %h] … … 299 346 Rappture::Tooltip::for $itk_component(zoomout) "Zoom out" 300 347 348 itk_component add volume { 349 Rappture::PushButton $f.volume \ 350 -onimage [Rappture::icon volume-on] \ 351 -offimage [Rappture::icon volume-off] \ 352 -variable [itcl::scope _settings(volume-visible)] \ 353 -command [itcl::code $this AdjustSetting volume-visible] 354 } 355 $itk_component(volume) select 356 Rappture::Tooltip::for $itk_component(volume) \ 357 "Don't display the volume" 358 pack $itk_component(volume) -padx 2 -pady 2 359 360 itk_component add streamlines { 361 Rappture::PushButton $f.streamlines \ 362 -onimage [Rappture::icon streamlines-on] \ 363 -offimage [Rappture::icon streamlines-off] \ 364 -variable [itcl::scope _settings(streamlines-visible)] \ 365 -command [itcl::code $this AdjustSetting streamlines-visible] \ 366 } 367 $itk_component(streamlines) select 368 Rappture::Tooltip::for $itk_component(streamlines) \ 369 "Toggle the streamlines on/off" 370 pack $itk_component(streamlines) -padx 2 -pady 2 371 372 itk_component add cutplane { 373 Rappture::PushButton $f.cutplane \ 374 -onimage [Rappture::icon cutbutton] \ 375 -offimage [Rappture::icon cutbutton] \ 376 -variable [itcl::scope _settings(cutplane-visible)] \ 377 -command [itcl::code $this AdjustSetting cutplane-visible] 378 } 379 $itk_component(cutplane) select 380 Rappture::Tooltip::for $itk_component(cutplane) \ 381 "Show/Hide cutplanes" 382 pack $itk_component(cutplane) -padx 2 -pady 2 383 384 301 385 if { [catch { 302 386 BuildVolumeTab 303 387 BuildStreamsTab 388 BuildCutplaneTab 304 389 BuildAxisTab 305 BuildCutawayTab306 390 BuildCameraTab 307 391 } errs] != 0 } { … … 389 473 eval itk_initialize $args 390 474 Connect 475 update 391 476 } 392 477 … … 396 481 itcl::body Rappture::VtkStreamlinesViewer::destructor {} { 397 482 Disconnect 398 $_dispatcher cancel !rebuild399 $_dispatcher cancel !resize400 $_dispatcher cancel !rotate401 483 image delete $_image(plot) 402 484 image delete $_image(download) … … 411 493 set _height 500 412 494 } 413 #puts stderr "DoResize screen size $_width $_height"414 495 set _start [clock clicks -milliseconds] 415 #puts stderr "screen size request width=$_width height=$_height"416 496 SendCmd "screen size $_width $_height" 417 RequestLegend497 set _legendPending 1 418 498 419 499 #SendCmd "imgflush" … … 431 511 } 432 512 513 itcl::body Rappture::VtkStreamlinesViewer::DoReseed {} { 514 foreach dataset [CurrentDatasets -visible] { 515 foreach {dataobj comp} [split $dataset -] break 516 # This command works for either random or fmesh seeds 517 SendCmd "streamlines seed numpts $_numSeeds $dataset" 518 } 519 set _reseedPending 0 520 } 521 433 522 itcl::body Rappture::VtkStreamlinesViewer::EventuallyResize { w h } { 434 #puts stderr "EventuallyResize $w $h"435 523 set _width $w 436 524 set _height $h … … 438 526 if { !$_resizePending } { 439 527 set _resizePending 1 440 $_dispatcher event -after 200 !resize 528 $_dispatcher event -after 400 !resize 529 } 530 } 531 532 itcl::body Rappture::VtkStreamlinesViewer::EventuallyReseed { numPoints } { 533 set _numSeeds $numPoints 534 if { !$_reseedPending } { 535 set _reseedPending 1 536 $_dispatcher event -after 600 !reseed 441 537 } 442 538 } … … 445 541 446 542 itcl::body Rappture::VtkStreamlinesViewer::EventuallyRotate { q } { 447 #puts stderr "EventuallyRotate $w $h"448 543 foreach { _view(qw) _view(qx) _view(qy) _view(qz) } $q break 449 544 if { !$_rotatePending } { … … 451 546 global rotate_delay 452 547 $_dispatcher event -after $rotate_delay !rotate 548 } 549 } 550 551 itcl::body Rappture::VtkStreamlinesViewer::EventuallySetCutplane { axis args } { 552 if { !$_cutplanePending } { 553 set _cutplanePending 1 554 $_dispatcher event -after 100 !${axis}cutplane 453 555 } 454 556 } … … 489 591 lappend _dlist $dataobj 490 592 } 491 set _allDataObjs($dataobj) 1492 593 set _obj2ovride($dataobj-color) $params(-color) 493 594 set _obj2ovride($dataobj-width) $params(-width) … … 518 619 # Remove it from the dataobj list. 519 620 set _dlist [lreplace $_dlist $pos $pos] 520 foreach comp [$dataobj components] { 521 SendCmd "dataset visible 0 $dataobj-$comp" 522 } 621 SendCmd "dataset visible 0" 523 622 array unset _obj2ovride $dataobj-* 623 array unset _settings $dataobj-* 524 624 # Append to the end of the dataobj list. 525 625 lappend _dlist $dataobj … … 571 671 } 572 672 if { ![info exists _obj2ovride($dataobj-raise)] } { 573 # No setting indicates that the object isn't invisible.673 # No setting indicates that the object isn't visible. 574 674 continue 575 675 } … … 707 807 # ---------------------------------------------------------------------- 708 808 itcl::body Rappture::VtkStreamlinesViewer::Connect {} { 709 #puts stderr "Enter Connect: [info level -1]"710 809 set _hosts [GetServerList "vtkvis"] 711 810 if { "" == $_hosts } { … … 714 813 set result [VisViewer::Connect $_hosts] 715 814 if { $result } { 716 #puts stderr "Connected to $_hostname sid=$_sid"717 815 set w [winfo width $itk_component(view)] 718 816 set h [winfo height $itk_component(view)] … … 748 846 VisViewer::Disconnect 749 847 848 $_dispatcher cancel !rebuild 849 $_dispatcher cancel !resize 850 $_dispatcher cancel !reseed 851 $_dispatcher cancel !rotate 852 $_dispatcher cancel !xcutplane 853 $_dispatcher cancel !ycutplane 854 $_dispatcher cancel !zcutplane 855 $_dispatcher cancel !legend 750 856 # disconnected -- no more data sitting on server 751 857 set _outbuf "" … … 753 859 array unset _data 754 860 array unset _colormaps 861 array unset _seeds 862 array unset _dataset2style 863 array unset _obj2datasets 755 864 } 756 865 … … 760 869 itcl::body Rappture::VtkStreamlinesViewer::sendto { bytes } { 761 870 SendBytes "$bytes\n" 871 StartWaiting 762 872 } 763 873 … … 774 884 } else { 775 885 SendBytes "$string\n" 886 StartWaiting 887 } 888 } 889 890 # 891 # SendCmdNoWait 892 # 893 # Send commands off to the rendering server. If we're currently 894 # sending data objects to the server, buffer the commands to be 895 # sent later. 896 # 897 itcl::body Rappture::VtkStreamlinesViewer::SendCmdNoWait {string} { 898 if { $_buffering } { 899 append _outbuf $string "\n" 900 } else { 901 SendBytes "$string\n" 776 902 } 777 903 } … … 792 918 array set info $args 793 919 set bytes [ReceiveBytes $info(-bytes)] 920 StopWaiting 794 921 if { $info(-type) == "image" } { 795 922 if 0 { … … 810 937 set tag $this-print-$info(-token) 811 938 set _hardcopy($tag) $bytes 939 } 940 if { $_legendPending } { 941 RequestLegend 812 942 } 813 943 } … … 863 993 # ---------------------------------------------------------------------- 864 994 itcl::body Rappture::VtkStreamlinesViewer::Rebuild {} { 865 995 update 866 996 set w [winfo width $itk_component(view)] 867 997 set h [winfo height $itk_component(view)] … … 871 1001 } 872 1002 1003 set _buffering 1 1004 set _legendPending 1 873 1005 # Turn on buffering of commands to the server. We don't want to 874 1006 # be preempted by a server disconnect/reconnect (which automatically 875 1007 # generates a new call to Rebuild). 876 set _buffering 1877 878 1008 set _width $w 879 1009 set _height $h … … 892 1022 DoRotate 893 1023 PanCamera 894 set _first [lindex [get -objects] 0] 895 if { $_reset || $_first == "" } { 896 Zoom reset 897 set _reset 0 898 } 899 FixSettings axis-xgrid axis-ygrid axis-zgrid axis-mode \ 900 axis-visible axis-labels \ 901 streamlines-seeds streamlines-visible streamlines-opacity \ 902 volume-edges volume-lighting volume-opacity volume-visible \ 903 volume-wireframe 904 905 #SendCmd "imgflush" 1024 set _first "" 1025 InitSettings axis-xgrid axis-ygrid axis-zgrid axis-mode \ 1026 axis-visible axis-labels cutplane-visible \ 1027 cutplane-xposition cutplane-yposition cutplane-zposition \ 1028 cutplane-xvisible cutplane-yvisible cutplane-zvisible 1029 1030 SendCmd "imgflush" 906 1031 907 1032 set _limits(zmin) "" … … 921 1046 append _outbuf $bytes 922 1047 set _datasets($tag) 1 1048 SetObjectStyle $dataobj $comp 923 1049 } 924 1050 lappend _obj2datasets($dataobj) $tag … … 928 1054 SendCmd "dataset visible 0 $tag" 929 1055 } 930 SetObjectStyle $dataobj $comp931 1056 } 932 1057 } … … 936 1061 array set view $location 937 1062 } 938 } 939 foreach axis { x y z } { 940 set label [$_first hints ${axis}label] 941 if { $label != "" } { 942 SendCmd "axis name $axis $label" 943 } 944 set units [$_first hints ${axis}units] 945 if { $units != "" } { 946 SendCmd "axis units $axis $units" 947 } 948 } 949 1063 1064 if 0 { 1065 # Tell the server the name of the tool, the version, and dataset 1066 # that we are rendering. Have to do it here because we don't know 1067 # what data objects are using the renderer until be get here. 1068 set args "" 1069 lappend args tool [$_first hints toolId] 1070 lappend args version [$_first hints toolRevision] 1071 lappend args dataset [$_first hints label] 1072 SendCmd "clientinfo $args" 1073 } 1074 1075 foreach axis { x y z } { 1076 set label [$_first hints ${axis}label] 1077 if { $label != "" } { 1078 SendCmd "axis name $axis $label" 1079 } 1080 set units [$_first hints ${axis}units] 1081 if { $units != "" } { 1082 SendCmd "axis units $axis $units" 1083 } 1084 } 1085 array unset _scalarFields 1086 array unset _vectorFields 1087 set _currentField [$_first hints default] 1088 $itk_component(field) choices delete 0 end 1089 $itk_component(fieldmenu) delete 0 end 1090 array unset _fields 1091 foreach { name title units } [$_first hints vectors] { 1092 set _vectorFields($title) $name 1093 $itk_component(field) choices insert end "$name" "$title" 1094 $itk_component(fieldmenu) add radiobutton -label "$title" \ 1095 -value $title -variable [itcl::scope _currentField] \ 1096 -selectcolor red \ 1097 -activebackground black \ 1098 -activeforeground white \ 1099 -font "Arial 8" \ 1100 -command [itcl::code $this Combo invoke] 1101 set _fields($name) [list $title $units] 1102 } 1103 foreach { name title units } [$_first hints scalars] { 1104 set _scalarFields($title) $name 1105 $itk_component(field) choices insert end "$name" "$title" 1106 $itk_component(fieldmenu) add radiobutton -label "$title" \ 1107 -value $title -variable [itcl::scope _currentField] \ 1108 -selectcolor red \ 1109 -activebackground black \ 1110 -activeforeground white \ 1111 -font "Arial 8" \ 1112 -command [itcl::code $this Combo invoke] 1113 set _fields($name) [list $title $units] 1114 } 1115 $itk_component(field) value $_currentField 1116 } 1117 1118 InitSettings streamlines-visible streamlines-palette volume-visible 1119 1120 if { $_reset } { 1121 InitSettings streamlines-seeds streamlines-opacity \ 1122 streamlines-numpoints streamlines-lighting \ 1123 streamlines-palette streamlines-field \ 1124 volume-edges volume-lighting volume-opacity volume-wireframe 1125 Zoom reset 1126 set _reset 0 1127 } 950 1128 set _buffering 0; # Turn off buffering. 951 1129 … … 953 1131 # care. We're finished here. 954 1132 blt::busy hold $itk_component(hull) 955 SendBytes$_outbuf;1133 sendto $_outbuf; 956 1134 blt::busy release $itk_component(hull) 957 1135 set _outbuf ""; # Clear the buffer. … … 1163 1341 1164 1342 # ---------------------------------------------------------------------- 1165 # USAGE: FixSettings <what> ?<value>?1343 # USAGE: InitSettings <what> ?<value>? 1166 1344 # 1167 1345 # Used internally to update rendering settings whenever parameters … … 1169 1347 # to the back end. 1170 1348 # ---------------------------------------------------------------------- 1171 itcl::body Rappture::VtkStreamlinesViewer::FixSettings { args } { 1172 foreach setting $args { 1173 AdjustSetting $setting 1349 itcl::body Rappture::VtkStreamlinesViewer::InitSettings { args } { 1350 foreach spec $args { 1351 if { [info exists _settings($_first-$spec)] } { 1352 # Reset global setting with dataobj specific setting 1353 set _settings($spec) $_settings($_first-$spec) 1354 } 1355 AdjustSetting $spec 1174 1356 } 1175 1357 } … … 1188 1370 switch -- $what { 1189 1371 "volume-opacity" { 1190 set val $_ volume(opacity)1372 set val $_settings(volume-opacity) 1191 1373 set sval [expr { 0.01 * double($val) }] 1192 foreach dataset [CurrentDatasets -visible $_first] {1374 foreach dataset [CurrentDatasets -visible] { 1193 1375 SendCmd "polydata opacity $sval $dataset" 1194 1376 } 1195 1377 } 1196 1378 "volume-wireframe" { 1197 set bool $_ volume(wireframe)1198 foreach dataset [CurrentDatasets -visible $_first] {1379 set bool $_settings(volume-wireframe) 1380 foreach dataset [CurrentDatasets -visible] { 1199 1381 SendCmd "polydata wireframe $bool $dataset" 1200 1382 } 1201 1383 } 1202 1384 "volume-visible" { 1203 set bool $_ volume(visible)1204 foreach dataset [CurrentDatasets -visible $_first] {1385 set bool $_settings(volume-visible) 1386 foreach dataset [CurrentDatasets -visible] { 1205 1387 SendCmd "polydata visible $bool $dataset" 1206 1388 } 1389 if { $bool } { 1390 Rappture::Tooltip::for $itk_component(volume) \ 1391 "Hide the volume" 1392 } else { 1393 Rappture::Tooltip::for $itk_component(volume) \ 1394 "Show the volume" 1395 } 1207 1396 } 1208 1397 "volume-lighting" { 1209 set bool $_ volume(lighting)1210 foreach dataset [CurrentDatasets -visible $_first] {1398 set bool $_settings(volume-lighting) 1399 foreach dataset [CurrentDatasets -visible] { 1211 1400 SendCmd "polydata lighting $bool $dataset" 1212 1401 } 1213 1402 } 1214 1403 "volume-edges" { 1215 set bool $_ volume(edges)1216 foreach dataset [CurrentDatasets -visible $_first] {1404 set bool $_settings(volume-edges) 1405 foreach dataset [CurrentDatasets -visible] { 1217 1406 SendCmd "polydata edges $bool $dataset" 1218 1407 } 1219 1408 } 1220 1409 "axis-visible" { 1221 set bool $_ axis(visible)1410 set bool $_settings(axis-visible) 1222 1411 SendCmd "axis visible all $bool" 1223 1412 } 1224 1413 "axis-labels" { 1225 set bool $_ axis(labels)1414 set bool $_settings(axis-labels) 1226 1415 SendCmd "axis labels all $bool" 1227 1416 } 1228 "axis-xgrid" { 1229 set bool $_axis(xgrid) 1230 SendCmd "axis grid x $bool" 1231 } 1232 "axis-ygrid" { 1233 set bool $_axis(ygrid) 1234 SendCmd "axis grid y $bool" 1235 } 1236 "axis-zgrid" { 1237 set bool $_axis(zgrid) 1238 SendCmd "axis grid z $bool" 1417 "axis-xgrid" - "axis-ygrid" - "axis-zgrid" { 1418 set axis [string range $what 5 5] 1419 set bool $_settings($what) 1420 SendCmd "axis grid $axis $bool" 1239 1421 } 1240 1422 "axis-mode" { 1241 1423 set mode [$itk_component(axismode) value] 1242 1424 set mode [$itk_component(axismode) translate $mode] 1425 set _settings($what) $mode 1243 1426 SendCmd "axis flymode $mode" 1244 1427 } 1245 "axis-xcutaway" - "axis-ycutaway" - "axis-zcutaway" { 1246 set axis [string range $what 5 5] 1247 set bool $_axis(${axis}cutaway) 1428 "cutplane-edges" { 1429 set bool $_settings($what) 1430 foreach dataset [CurrentDatasets -visible] { 1431 SendCmd "cutplane edges $bool $dataset" 1432 } 1433 } 1434 "cutplane-visible" { 1435 set bool $_settings($what) 1436 foreach dataset [CurrentDatasets -visible] { 1437 SendCmd "cutplane visible $bool $dataset" 1438 } 1439 } 1440 "cutplane-wireframe" { 1441 set bool $_settings($what) 1442 foreach dataset [CurrentDatasets -visible] { 1443 SendCmd "cutplane wireframe $bool $dataset" 1444 } 1445 } 1446 "cutplane-lighting" { 1447 set bool $_settings($what) 1448 foreach dataset [CurrentDatasets -visible] { 1449 SendCmd "cutplane lighting $bool $dataset" 1450 } 1451 } 1452 "cutplane-opacity" { 1453 set val $_settings($what) 1454 set sval [expr { 0.01 * double($val) }] 1455 foreach dataset [CurrentDatasets -visible] { 1456 SendCmd "cutplane opacity $sval $dataset" 1457 } 1458 } 1459 "cutplane-xvisible" - "cutplane-yvisible" - "cutplane-zvisible" { 1460 set axis [string range $what 9 9] 1461 set bool $_settings($what) 1248 1462 if { $bool } { 1249 set pos [expr $_axis(${axis}position) * 0.01]1250 set dir $_axis(${axis}direction)1251 1463 $itk_component(${axis}CutScale) configure -state normal \ 1252 1464 -troughcolor white 1253 SendCmd "renderer clipplane $axis $pos $dir"1254 1465 } else { 1255 1466 $itk_component(${axis}CutScale) configure -state disabled \ 1256 1467 -troughcolor grey82 1257 SendCmd "renderer clipplane $axis 1 -1"1258 1468 } 1259 }1260 "axis-xposition" - "axis-yposition" - "axis-zposition" -1261 " axis-xdirection" - "axis-ydirection" - "axis-zdirection" {1262 set axis [string range $what 5 5]1263 #set dir $_axis(${axis}direction)1264 set pos [expr $_axis(${axis}position) * 0.01]1265 SendCmd "renderer clipplane ${axis} $pos -1"1469 SendCmd "cutplane axis $axis $bool" 1470 } 1471 "cutplane-xposition" - "cutplane-yposition" - "cutplane-zposition" { 1472 set axis [string range $what 9 9] 1473 set pos [expr $_settings($what) * 0.01] 1474 SendCmd "cutplane slice ${axis} ${pos}" 1475 set _cutplanePending 0 1266 1476 } 1267 1477 "streamlines-seeds" { 1268 set bool $_s treamlines(seeds)1269 foreach dataset [CurrentDatasets -visible $_first] {1478 set bool $_settings($what) 1479 foreach dataset [CurrentDatasets -visible] { 1270 1480 SendCmd "streamlines seed visible $bool $dataset" 1271 1481 } 1272 1482 } 1483 "streamlines-numpoints" { 1484 set density $_settings($what) 1485 EventuallyReseed $density 1486 } 1273 1487 "streamlines-visible" { 1274 set bool $_s treamlines(visible)1275 foreach dataset [CurrentDatasets -visible $_first] {1488 set bool $_settings($what) 1489 foreach dataset [CurrentDatasets -visible] { 1276 1490 SendCmd "streamlines visible $bool $dataset" 1277 1491 } 1492 if { $bool } { 1493 Rappture::Tooltip::for $itk_component(streamlines) \ 1494 "Hide the streamlines" 1495 } else { 1496 Rappture::Tooltip::for $itk_component(streamlines) \ 1497 "Show the streamlines" 1498 } 1278 1499 } 1279 1500 "streamlines-mode" { 1280 1501 set mode [$itk_component(streammode) value] 1281 foreach dataset [CurrentDatasets -visible $_first] { 1502 set _settings(streamlines-mode) $mode 1503 foreach dataset [CurrentDatasets -visible] { 1282 1504 switch -- $mode { 1283 1505 "lines" { … … 1285 1507 } 1286 1508 "ribbons" { 1287 SendCmd "streamlines ribbons 10 $dataset"1509 SendCmd "streamlines ribbons 3 0 $dataset" 1288 1510 } 1289 1511 "tubes" { 1290 SendCmd "streamlines tubes 5 1$dataset"1512 SendCmd "streamlines tubes 5 3 $dataset" 1291 1513 } 1292 1514 } 1293 1515 } 1294 1516 } 1517 "streamlines-palette" { 1518 set palette [$itk_component(palette) value] 1519 set _settings(streamlines-palette) $palette 1520 foreach dataset [CurrentDatasets -visible $_first] { 1521 foreach {dataobj comp} [split $dataset -] break 1522 ChangeColormap $dataobj $comp $palette 1523 } 1524 set _legendPending 1 1525 } 1295 1526 "streamlines-opacity" { 1296 set val $_s treamlines(opacity)1527 set val $_settings(streamlines-opacity) 1297 1528 set sval [expr { 0.01 * double($val) }] 1298 1529 foreach dataset [CurrentDatasets -visible $_first] { … … 1300 1531 } 1301 1532 } 1533 "streamlines-scale" { 1534 set val $_settings(streamlines-scale) 1535 set sval [expr { 0.01 * double($val) }] 1536 foreach dataset [CurrentDatasets -visible $_first] { 1537 SendCmd "streamlines scale $sval $sval $sval $dataset" 1538 } 1539 } 1540 "streamlines-lighting" { 1541 set bool $_settings(streamlines-lighting) 1542 foreach dataset [CurrentDatasets -visible $_first] { 1543 SendCmd "streamlines lighting $bool $dataset" 1544 } 1545 } 1546 "streamlines-field" { 1547 set new [$itk_component(field) value] 1548 set value [$itk_component(field) translate $new] 1549 set _settings(streamlines-field) $value 1550 if { [info exists _scalarFields($new)] } { 1551 set name $_scalarFields($new) 1552 set _colorMode scalar 1553 set _currentField $new 1554 } elseif { [info exists _vectorFields($new)] } { 1555 set name $_vectorFields($new) 1556 set _colorMode vmag 1557 set _currentField $new 1558 } else { 1559 puts stderr "unknown field \"$new\"" 1560 return 1561 } 1562 foreach dataset [CurrentDatasets -visible] { 1563 puts stderr "streamlines colormode $_colorMode ${name} $dataset" 1564 puts stderr "cutplane colormode $_colorMode ${name} $dataset" 1565 SendCmd "streamlines colormode $_colorMode ${name} $dataset" 1566 SendCmd "cutplane colormode $_colorMode ${name} $dataset" 1567 } 1568 set _legendPending 1 1569 } 1302 1570 default { 1303 1571 error "don't know how to fix $what" … … 1314 1582 # 1315 1583 itcl::body Rappture::VtkStreamlinesViewer::RequestLegend {} { 1316 #puts stderr "RequestLegend _first=$_first"1317 #puts stderr "RequestLegend width=$_width height=$_height"1318 1584 set font "Arial 8" 1319 1585 set lineht [font metrics $font -linespace] 1320 1586 set c $itk_component(legend) 1321 1587 set w 12 1322 set h [expr {$_height - 2* ($lineht + 2)}]1588 set h [expr {$_height - 3 * ($lineht + 2)}] 1323 1589 if { $h < 1} { 1324 1590 return 1325 1591 } 1592 if { [info exists _scalarFields($_currentField)] } { 1593 set name $_scalarFields($_currentField) 1594 } elseif { [info exists _vectorFields($_currentField)] } { 1595 set name $_vectorFields($_currentField) 1596 } else { 1597 return 1598 } 1326 1599 # Set the legend on the first streamlines dataset. 1327 foreach dataset [CurrentDatasets -visible ] {1600 foreach dataset [CurrentDatasets -visible $_first] { 1328 1601 foreach {dataobj comp} [split $dataset -] break 1329 1602 if { [info exists _dataset2style($dataset)] } { 1330 #puts stderr "RequestLegend w=$w h=$h" 1331 SendCmd "legend $_dataset2style($dataset) vmag{} $w $h 0"1603 SendCmdNoWait \ 1604 "legend $_dataset2style($dataset) $_colorMode $name {} $w $h 0" 1332 1605 break; 1333 1606 } 1334 1607 } 1608 } 1609 1610 # 1611 # ChangeColormap -- 1612 # 1613 itcl::body Rappture::VtkStreamlinesViewer::ChangeColormap {dataobj comp color} { 1614 set tag $dataobj-$comp 1615 if { ![info exist _style($tag)] } { 1616 error "no initial colormap" 1617 } 1618 array set style $_style($tag) 1619 set style(-color) $color 1620 set _style($tag) [array get style] 1621 SetColormap $dataobj $comp 1335 1622 } 1336 1623 … … 1340 1627 itcl::body Rappture::VtkStreamlinesViewer::SetColormap { dataobj comp } { 1341 1628 array set style { 1342 -color rainbow1629 -color BGYOR 1343 1630 -levels 6 1344 1631 -opacity 1.0 1345 1632 } 1346 1633 set tag $dataobj-$comp 1347 array set style [$dataobj style $comp] 1348 set colormap "$style(-color):$style(-levels):$style(-opacity)" 1349 if { [info exists _colormaps($colormap)] } { 1350 puts stderr "Colormap $colormap already built" 1351 return $colormap 1352 } 1353 if { ![info exists _dataset2style($tag)] } { 1354 set _dataset2style($tag) $colormap 1355 lappend _style2datasets($colormap) $tag 1356 } 1357 if { ![info exists _colormaps($colormap)] } { 1358 # Build the pseudo colormap if it doesn't exist. 1359 BuildColormap $colormap $dataobj $comp 1360 set _colormaps($colormap) 1 1361 } 1362 SendCmd "streamlines colormap $colormap $tag" 1363 return $colormap 1364 } 1365 1366 # 1367 # BuildColormap -- 1368 # 1369 itcl::body Rappture::VtkStreamlinesViewer::BuildColormap { colormap dataobj comp } { 1370 array set style { 1371 -color rainbow 1372 -levels 6 1373 -opacity 1.0 1374 } 1375 array set style [$dataobj style $comp] 1376 if {$style(-color) == "rainbow"} { 1377 set style(-color) "white:yellow:green:cyan:blue:magenta" 1378 } 1379 set clist [split $style(-color) :] 1634 if { ![info exists _initialStyle($tag)] } { 1635 # Save the initial component style. 1636 set _initialStyle($tag) [$dataobj style $comp] 1637 } 1638 1639 # Override defaults with initial style defined in xml. 1640 array set style $_initialStyle($tag) 1641 1642 if { ![info exists _style($tag)] } { 1643 set _style($tag) [array get style] 1644 } 1645 # Override initial style with current style. 1646 array set style $_style($tag) 1647 1648 set name "$style(-color):$style(-levels):$style(-opacity)" 1649 if { ![info exists _colormaps($name)] } { 1650 BuildColormap $name [array get style] 1651 set _colormaps($name) 1 1652 } 1653 if { ![info exists _dataset2style($tag)] || 1654 $_dataset2style($tag) != $name } { 1655 SendCmd "streamlines colormap $name $tag" 1656 SendCmd "cutplane colormap $name $tag" 1657 set _dataset2style($tag) $name 1658 } 1659 } 1660 1661 itcl::body Rappture::VtkStreamlinesViewer::ColorsToColormap { colors } { 1662 switch -- $colors { 1663 "grey-to-blue" { 1664 return { 1665 0.0 0.200 0.200 0.200 1666 0.14285714285714285 0.400 0.400 0.400 1667 0.2857142857142857 0.600 0.600 0.600 1668 0.42857142857142855 0.900 0.900 0.900 1669 0.5714285714285714 0.800 1.000 1.000 1670 0.7142857142857143 0.600 1.000 1.000 1671 0.8571428571428571 0.400 0.900 1.000 1672 1.0 0.000 0.600 0.800 1673 } 1674 } 1675 "blue-to-grey" { 1676 return { 1677 0.0 0.000 0.600 0.800 1678 0.14285714285714285 0.400 0.900 1.000 1679 0.2857142857142857 0.600 1.000 1.000 1680 0.42857142857142855 0.800 1.000 1.000 1681 0.5714285714285714 0.900 0.900 0.900 1682 0.7142857142857143 0.600 0.600 0.600 1683 0.8571428571428571 0.400 0.400 0.400 1684 1.0 0.200 0.200 0.200 1685 } 1686 } 1687 "blue" { 1688 return { 1689 0.0 0.900 1.000 1.000 1690 0.1111111111111111 0.800 0.983 1.000 1691 0.2222222222222222 0.700 0.950 1.000 1692 0.3333333333333333 0.600 0.900 1.000 1693 0.4444444444444444 0.500 0.833 1.000 1694 0.5555555555555556 0.400 0.750 1.000 1695 0.6666666666666666 0.300 0.650 1.000 1696 0.7777777777777778 0.200 0.533 1.000 1697 0.8888888888888888 0.100 0.400 1.000 1698 1.0 0.000 0.250 1.000 1699 } 1700 } 1701 "brown-to-blue" { 1702 return { 1703 0.0 0.200 0.100 0.000 1704 0.09090909090909091 0.400 0.187 0.000 1705 0.18181818181818182 0.600 0.379 0.210 1706 0.2727272727272727 0.800 0.608 0.480 1707 0.36363636363636365 0.850 0.688 0.595 1708 0.45454545454545453 0.950 0.855 0.808 1709 0.5454545454545454 0.800 0.993 1.000 1710 0.6363636363636364 0.600 0.973 1.000 1711 0.7272727272727273 0.400 0.940 1.000 1712 0.8181818181818182 0.200 0.893 1.000 1713 0.9090909090909091 0.000 0.667 0.800 1714 1.0 0.000 0.480 0.600 1715 } 1716 } 1717 "blue-to-brown" { 1718 return { 1719 0.0 0.000 0.480 0.600 1720 0.09090909090909091 0.000 0.667 0.800 1721 0.18181818181818182 0.200 0.893 1.000 1722 0.2727272727272727 0.400 0.940 1.000 1723 0.36363636363636365 0.600 0.973 1.000 1724 0.45454545454545453 0.800 0.993 1.000 1725 0.5454545454545454 0.950 0.855 0.808 1726 0.6363636363636364 0.850 0.688 0.595 1727 0.7272727272727273 0.800 0.608 0.480 1728 0.8181818181818182 0.600 0.379 0.210 1729 0.9090909090909091 0.400 0.187 0.000 1730 1.0 0.200 0.100 0.000 1731 } 1732 } 1733 "blue-to-orange" { 1734 return { 1735 0.0 0.000 0.167 1.000 1736 0.09090909090909091 0.100 0.400 1.000 1737 0.18181818181818182 0.200 0.600 1.000 1738 0.2727272727272727 0.400 0.800 1.000 1739 0.36363636363636365 0.600 0.933 1.000 1740 0.45454545454545453 0.800 1.000 1.000 1741 0.5454545454545454 1.000 1.000 0.800 1742 0.6363636363636364 1.000 0.933 0.600 1743 0.7272727272727273 1.000 0.800 0.400 1744 0.8181818181818182 1.000 0.600 0.200 1745 0.9090909090909091 1.000 0.400 0.100 1746 1.0 1.000 0.167 0.000 1747 } 1748 } 1749 "orange-to-blue" { 1750 return { 1751 0.0 1.000 0.167 0.000 1752 0.09090909090909091 1.000 0.400 0.100 1753 0.18181818181818182 1.000 0.600 0.200 1754 0.2727272727272727 1.000 0.800 0.400 1755 0.36363636363636365 1.000 0.933 0.600 1756 0.45454545454545453 1.000 1.000 0.800 1757 0.5454545454545454 0.800 1.000 1.000 1758 0.6363636363636364 0.600 0.933 1.000 1759 0.7272727272727273 0.400 0.800 1.000 1760 0.8181818181818182 0.200 0.600 1.000 1761 0.9090909090909091 0.100 0.400 1.000 1762 1.0 0.000 0.167 1.000 1763 } 1764 } 1765 "rainbow" { 1766 set clist { 1767 "#EE82EE" 1768 "#4B0082" 1769 "blue" 1770 "#008000" 1771 "yellow" 1772 "#FFA500" 1773 "red" 1774 } 1775 } 1776 "BGYOR" { 1777 set clist { 1778 "blue" 1779 "#008000" 1780 "yellow" 1781 "#FFA500" 1782 "red" 1783 } 1784 } 1785 "ROYGB" { 1786 set clist { 1787 "red" 1788 "#FFA500" 1789 "yellow" 1790 "#008000" 1791 "blue" 1792 } 1793 } 1794 "RYGCB" { 1795 set clist { 1796 "red" 1797 "yellow" 1798 "green" 1799 "cyan" 1800 "blue" 1801 } 1802 } 1803 "BCGYR" { 1804 set clist { 1805 "blue" 1806 "cyan" 1807 "green" 1808 "yellow" 1809 "red" 1810 } 1811 } 1812 "spectral" { 1813 return { 1814 0.0 0.150 0.300 1.000 1815 0.1 0.250 0.630 1.000 1816 0.2 0.450 0.850 1.000 1817 0.3 0.670 0.970 1.000 1818 0.4 0.880 1.000 1.000 1819 0.5 1.000 1.000 0.750 1820 0.6 1.000 0.880 0.600 1821 0.7 1.000 0.680 0.450 1822 0.8 0.970 0.430 0.370 1823 0.9 0.850 0.150 0.196 1824 1.0 0.650 0.000 0.130 1825 } 1826 } 1827 "green-to-magenta" { 1828 return { 1829 0.0 0.000 0.316 0.000 1830 0.06666666666666667 0.000 0.526 0.000 1831 0.13333333333333333 0.000 0.737 0.000 1832 0.2 0.000 0.947 0.000 1833 0.26666666666666666 0.316 1.000 0.316 1834 0.3333333333333333 0.526 1.000 0.526 1835 0.4 0.737 1.000 0.737 1836 0.4666666666666667 1.000 1.000 1.000 1837 0.5333333333333333 1.000 0.947 1.000 1838 0.6 1.000 0.737 1.000 1839 0.6666666666666666 1.000 0.526 1.000 1840 0.7333333333333333 1.000 0.316 1.000 1841 0.8 0.947 0.000 0.947 1842 0.8666666666666667 0.737 0.000 0.737 1843 0.9333333333333333 0.526 0.000 0.526 1844 1.0 0.316 0.000 0.316 1845 } 1846 } 1847 "greyscale" { 1848 return { 1849 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1850 } 1851 } 1852 "nanohub" { 1853 set clist "white yellow green cyan blue magenta" 1854 } 1855 default { 1856 set clist $colors 1857 } 1858 } 1380 1859 set cmap {} 1381 1860 for {set i 0} {$i < [llength $clist]} {incr i} { … … 1384 1863 append cmap "$x [Color2RGB $color] " 1385 1864 } 1865 return $cmap 1866 } 1867 1868 # 1869 # BuildColormap -- 1870 # 1871 itcl::body Rappture::VtkStreamlinesViewer::BuildColormap { name styles } { 1872 array set style $styles 1873 set cmap [ColorsToColormap $style(-color)] 1386 1874 if { [llength $cmap] == 0 } { 1387 1875 set cmap "0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0" 1388 1876 } 1389 if { ![info exists _ volume(opacity)] } {1390 set _ volume(opacity) $style(-opacity)1391 } 1392 set max $_ volume(opacity)1877 if { ![info exists _settings(volume-opacity)] } { 1878 set _settings(volume-opacity) $style(-opacity) 1879 } 1880 set max $_settings(volume-opacity) 1393 1881 1394 1882 set wmap "0.0 1.0 1.0 1.0" 1395 SendCmd "colormap add $ colormap{ $cmap } { $wmap }"1883 SendCmd "colormap add $name { $cmap } { $wmap }" 1396 1884 } 1397 1885 … … 1418 1906 1419 1907 itcl::body Rappture::VtkStreamlinesViewer::limits { dataobj } { 1420 1908 return 1421 1909 array unset _limits $dataobj-* 1422 1910 foreach comp [$dataobj components] { … … 1426 1914 set tmpfile file[pid].vtk 1427 1915 set f [open "$tmpfile" "w"] 1916 fconfigure $f -translation binary -encoding binary 1428 1917 puts $f $data 1429 1918 close $f 1430 1919 set reader [vtkDataSetReader $tag-xvtkDataSetReader] 1431 1920 $reader SetFileName $tmpfile 1432 $reader ReadAllNormalsOn1433 1921 $reader ReadAllScalarsOn 1434 1922 $reader ReadAllVectorsOn … … 1439 1927 set pointData [$output GetPointData] 1440 1928 puts stderr "\#scalars=[$reader GetNumberOfScalarsInFile]" 1441 puts stderr "\#vectors=[$reader GetNumberOfVectorsInFile]"1442 puts stderr "\#tensors=[$reader GetNumberOfTensorsInFile]"1443 puts stderr "\#normals=[$reader GetNumberOfNormalsInFile]"1444 1929 puts stderr "\#fielddata=[$reader GetNumberOfFieldDataInFile]" 1445 1930 puts stderr "fielddataname=[$reader GetFieldDataNameInFile 0]" … … 1447 1932 set pointData [$output GetPointData] 1448 1933 puts stderr "field \#arrays=[$fieldData GetNumberOfArrays]" 1934 for { set i 0 } { $i < [$fieldData GetNumberOfArrays] } { incr i } { 1935 puts stderr [$fieldData GetArrayName $i] 1936 } 1449 1937 puts stderr "point \#arrays=[$pointData GetNumberOfArrays]" 1938 for { set i 0 } { $i < [$pointData GetNumberOfArrays] } { incr i } { 1939 set name [$pointData GetArrayName $i] 1940 if { ![info exists _fields($name)] } { 1941 $itk_component(field) choices insert end "$name" "$name" 1942 set _fields($name) 1 1943 } 1944 } 1450 1945 puts stderr "field \#components=[$fieldData GetNumberOfComponents]" 1451 1946 puts stderr "point \#components=[$pointData GetNumberOfComponents]" … … 1493 1988 checkbutton $inner.volume \ 1494 1989 -text "Show Volume" \ 1495 -variable [itcl::scope _ volume(visible)] \1990 -variable [itcl::scope _settings(volume-visible)] \ 1496 1991 -command [itcl::code $this AdjustSetting volume-visible] \ 1497 1992 -font "Arial 9" … … 1499 1994 checkbutton $inner.wireframe \ 1500 1995 -text "Show Wireframe" \ 1501 -variable [itcl::scope _ volume(wireframe)] \1996 -variable [itcl::scope _settings(volume-wireframe)] \ 1502 1997 -command [itcl::code $this AdjustSetting volume-wireframe] \ 1503 1998 -font "Arial 9" … … 1505 2000 checkbutton $inner.lighting \ 1506 2001 -text "Enable Lighting" \ 1507 -variable [itcl::scope _ volume(lighting)] \2002 -variable [itcl::scope _settings(volume-lighting)] \ 1508 2003 -command [itcl::code $this AdjustSetting volume-lighting] \ 1509 2004 -font "Arial 9" … … 1511 2006 checkbutton $inner.edges \ 1512 2007 -text "Show Edges" \ 1513 -variable [itcl::scope _ volume(edges)] \2008 -variable [itcl::scope _settings(volume-edges)] \ 1514 2009 -command [itcl::code $this AdjustSetting volume-edges] \ 1515 2010 -font "Arial 9" … … 1517 2012 label $inner.opacity_l -text "Opacity" -font "Arial 9" 1518 2013 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1519 -variable [itcl::scope _ volume(opacity)] \2014 -variable [itcl::scope _settings(volume-opacity)] \ 1520 2015 -width 10 \ 1521 2016 -showvalue off \ … … 1542 2037 set inner [$itk_component(main) insert end \ 1543 2038 -title "Streams Settings" \ 1544 -icon [Rappture::icon stream ]]2039 -icon [Rappture::icon streamlines-on]] 1545 2040 $inner configure -borderwidth 4 1546 2041 1547 2042 checkbutton $inner.streamlines \ 1548 2043 -text "Show Streamlines" \ 1549 -variable [itcl::scope _s treamlines(visible)] \2044 -variable [itcl::scope _settings(streamlines-visible)] \ 1550 2045 -command [itcl::code $this AdjustSetting streamlines-visible] \ 1551 2046 -font "Arial 9" 2047 2048 checkbutton $inner.lighting \ 2049 -text "Enable Lighting" \ 2050 -variable [itcl::scope _settings(streamlines-lighting)] \ 2051 -command [itcl::code $this AdjustSetting streamlines-lighting] \ 2052 -font "Arial 9" 1552 2053 1553 2054 checkbutton $inner.seeds \ 1554 2055 -text "Show Seeds" \ 1555 -variable [itcl::scope _s treamlines(seeds)] \2056 -variable [itcl::scope _settings(streamlines-seeds)] \ 1556 2057 -command [itcl::code $this AdjustSetting streamlines-seeds] \ 1557 2058 -font "Arial 9" … … 1570 2071 label $inner.opacity_l -text "Opacity" -font "Arial 9" 1571 2072 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1572 -variable [itcl::scope _s treamlines(opacity)] \2073 -variable [itcl::scope _settings(streamlines-opacity)] \ 1573 2074 -width 10 \ 1574 2075 -showvalue off \ 1575 2076 -command [itcl::code $this AdjustSetting streamlines-opacity] 1576 2077 2078 label $inner.density_l -text "Number of Seeds" -font "Arial 9" 2079 ::scale $inner.density -from 1 -to 1000 -orient horizontal \ 2080 -variable [itcl::scope _settings(streamlines-numpoints)] \ 2081 -width 10 \ 2082 -showvalue on \ 2083 -command [itcl::code $this AdjustSetting streamlines-numpoints] 2084 2085 label $inner.scale_l -text "Scale" -font "Arial 9" 2086 ::scale $inner.scale -from 1 -to 100 -orient horizontal \ 2087 -variable [itcl::scope _settings(streamlines-scale)] \ 2088 -width 10 \ 2089 -showvalue off \ 2090 -command [itcl::code $this AdjustSetting streamlines-scale] 2091 2092 label $inner.field_l -text "Field" -font "Arial 9" 2093 itk_component add field { 2094 Rappture::Combobox $inner.field -width 10 -editable no 2095 } 2096 bind $inner.field <<Value>> \ 2097 [itcl::code $this AdjustSetting streamlines-field] 2098 2099 label $inner.palette_l -text "Palette" -font "Arial 9" 2100 itk_component add palette { 2101 Rappture::Combobox $inner.palette -width 10 -editable no 2102 } 2103 $inner.palette choices insert end \ 2104 "BCGYR" "BCGYR" \ 2105 "BGYOR" "BGYOR" \ 2106 "blue" "blue" \ 2107 "blue-to-brown" "blue-to-brown" \ 2108 "blue-to-orange" "blue-to-orange" \ 2109 "blue-to-grey" "blue-to-grey" \ 2110 "green-to-magenta" "green-to-magenta" \ 2111 "greyscale" "greyscale" \ 2112 "nanohub" "nanohub" \ 2113 "rainbow" "rainbow" \ 2114 "spectral" "spectral" \ 2115 "ROYGB" "ROYGB" \ 2116 "RYGCB" "RYGCB" \ 2117 "brown-to-blue" "brown-to-blue" \ 2118 "grey-to-blue" "grey-to-blue" \ 2119 "orange-to-blue" "orange-to-blue" 2120 2121 $itk_component(palette) value "BCGYR" 2122 bind $inner.palette <<Value>> \ 2123 [itcl::code $this AdjustSetting streamlines-palette] 2124 1577 2125 blt::table $inner \ 1578 2126 0,0 $inner.streamlines -anchor w -pady 2 -cspan 2 \ 1579 1,0 $inner.seeds -anchor w -pady 2 -cspan 2 \ 1580 2,0 $inner.mode_l -anchor w -pady 2 \ 1581 2,1 $inner.mode -anchor w -pady 2 \ 1582 3,0 $inner.opacity_l -anchor w -pady 2 \ 1583 4,0 $inner.opacity -fill x -pady 2 -cspan 2 2127 1,0 $inner.lighting -anchor w -pady 2 -cspan 2 \ 2128 2,0 $inner.seeds -anchor w -pady 2 -cspan 2 \ 2129 3,0 $inner.density_l -anchor w -pady 2 -cspan 2 \ 2130 4,0 $inner.density -fill x -pady 2 -cspan 2 \ 2131 5,0 $inner.mode_l -anchor w -pady 2 \ 2132 5,1 $inner.mode -anchor w -pady 2 \ 2133 6,0 $inner.opacity_l -anchor w -pady 2 -cspan 2 \ 2134 7,0 $inner.opacity -fill x -pady 2 -cspan 2 \ 2135 8,0 $inner.field_l -anchor w -pady 2 \ 2136 8,1 $inner.field -anchor w -pady 2 \ 2137 9,0 $inner.palette_l -anchor w -pady 2 \ 2138 9,1 $inner.palette -anchor w -pady 2 \ 2139 1584 2140 1585 2141 blt::table configure $inner r* c* -resize none 1586 blt::table configure $inner r 5c1 c2 -resize expand2142 blt::table configure $inner r10 c1 c2 -resize expand 1587 2143 } 1588 2144 … … 1599 2155 checkbutton $inner.visible \ 1600 2156 -text "Show Axes" \ 1601 -variable [itcl::scope _ axis(visible)] \2157 -variable [itcl::scope _settings(axis-visible)] \ 1602 2158 -command [itcl::code $this AdjustSetting axis-visible] \ 1603 2159 -font "Arial 9" … … 1605 2161 checkbutton $inner.labels \ 1606 2162 -text "Show Axis Labels" \ 1607 -variable [itcl::scope _ axis(labels)] \2163 -variable [itcl::scope _settings(axis-labels)] \ 1608 2164 -command [itcl::code $this AdjustSetting axis-labels] \ 1609 2165 -font "Arial 9" … … 1611 2167 checkbutton $inner.gridx \ 1612 2168 -text "Show X Grid" \ 1613 -variable [itcl::scope _ axis(xgrid)] \2169 -variable [itcl::scope _settings(axis-xgrid)] \ 1614 2170 -command [itcl::code $this AdjustSetting axis-xgrid] \ 1615 2171 -font "Arial 9" 1616 2172 checkbutton $inner.gridy \ 1617 2173 -text "Show Y Grid" \ 1618 -variable [itcl::scope _ axis(ygrid)] \2174 -variable [itcl::scope _settings(axis-ygrid)] \ 1619 2175 -command [itcl::code $this AdjustSetting axis-ygrid] \ 1620 2176 -font "Arial 9" 1621 2177 checkbutton $inner.gridz \ 1622 2178 -text "Show Z Grid" \ 1623 -variable [itcl::scope _ axis(zgrid)] \2179 -variable [itcl::scope _settings(axis-zgrid)] \ 1624 2180 -command [itcl::code $this AdjustSetting axis-zgrid] \ 1625 2181 -font "Arial 9" … … 1687 2243 } 1688 2244 1689 itcl::body Rappture::VtkStreamlinesViewer::BuildCut awayTab {} {2245 itcl::body Rappture::VtkStreamlinesViewer::BuildCutplaneTab {} { 1690 2246 1691 2247 set fg [option get $itk_component(hull) font Font] 1692 2248 1693 2249 set inner [$itk_component(main) insert end \ 1694 -title "Cut away Along Axis" \2250 -title "Cutplane Settings" \ 1695 2251 -icon [Rappture::icon cutbutton]] 1696 2252 1697 2253 $inner configure -borderwidth 4 2254 2255 checkbutton $inner.visible \ 2256 -text "Show Cutplanes" \ 2257 -variable [itcl::scope _settings(cutplane-visible)] \ 2258 -command [itcl::code $this AdjustSetting cutplane-visible] \ 2259 -font "Arial 9" 2260 2261 checkbutton $inner.wireframe \ 2262 -text "Show Wireframe" \ 2263 -variable [itcl::scope _settings(cutplane-wireframe)] \ 2264 -command [itcl::code $this AdjustSetting cutplane-wireframe] \ 2265 -font "Arial 9" 2266 2267 checkbutton $inner.lighting \ 2268 -text "Enable Lighting" \ 2269 -variable [itcl::scope _settings(cutplane-lighting)] \ 2270 -command [itcl::code $this AdjustSetting cutplane-lighting] \ 2271 -font "Arial 9" 2272 2273 checkbutton $inner.edges \ 2274 -text "Show Edges" \ 2275 -variable [itcl::scope _settings(cutplane-edges)] \ 2276 -command [itcl::code $this AdjustSetting cutplane-edges] \ 2277 -font "Arial 9" 2278 2279 label $inner.opacity_l -text "Opacity" -font "Arial 9" 2280 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 2281 -variable [itcl::scope _settings(cutplane-opacity)] \ 2282 -width 10 \ 2283 -showvalue off \ 2284 -command [itcl::code $this AdjustSetting cutplane-opacity] 2285 $inner.opacity set $_settings(cutplane-opacity) 1698 2286 1699 2287 # X-value slicer... … … 1702 2290 -onimage [Rappture::icon x-cutplane] \ 1703 2291 -offimage [Rappture::icon x-cutplane] \ 1704 -command [itcl::code $this AdjustSetting axis-xcutaway] \1705 -variable [itcl::scope _ axis(xcutaway)]2292 -command [itcl::code $this AdjustSetting cutplane-xvisible] \ 2293 -variable [itcl::scope _settings(cutplane-xvisible)] 1706 2294 } 1707 2295 Rappture::Tooltip::for $itk_component(xCutButton) \ 1708 "Toggle the X-axis cut awayon/off"2296 "Toggle the X-axis cutplane on/off" 1709 2297 1710 2298 itk_component add xCutScale { … … 1712 2300 -width 10 -orient vertical -showvalue yes \ 1713 2301 -borderwidth 1 -highlightthickness 0 \ 1714 -command [itcl::code $this Slice move x] \1715 -variable [itcl::scope _ axis(xposition)]2302 -command [itcl::code $this EventuallySetCutplane x] \ 2303 -variable [itcl::scope _settings(cutplane-xposition)] 1716 2304 } { 1717 2305 usual 1718 2306 ignore -borderwidth -highlightthickness 1719 2307 } 1720 # Set the default cut awayvalue before disabling the scale.1721 $itk_component(xCutScale) set 1002308 # Set the default cutplane value before disabling the scale. 2309 $itk_component(xCutScale) set 50 1722 2310 $itk_component(xCutScale) configure -state disabled 1723 2311 Rappture::Tooltip::for $itk_component(xCutScale) \ 1724 2312 "@[itcl::code $this Slice tooltip x]" 1725 1726 itk_component add xDirButton {1727 Rappture::PushButton $inner.xdir \1728 -onimage [Rappture::icon arrow-down] \1729 -onvalue -1 \1730 -offimage [Rappture::icon arrow-up] \1731 -offvalue 1 \1732 -command [itcl::code $this AdjustSetting axis-xdirection] \1733 -variable [itcl::scope _axis(xdirection)]1734 }1735 set _axis(xdirection) -11736 Rappture::Tooltip::for $itk_component(xDirButton) \1737 "Toggle the direction of the X-axis cutaway"1738 2313 1739 2314 # Y-value slicer... … … 1742 2317 -onimage [Rappture::icon y-cutplane] \ 1743 2318 -offimage [Rappture::icon y-cutplane] \ 1744 -command [itcl::code $this AdjustSetting axis-ycutaway] \1745 -variable [itcl::scope _ axis(ycutaway)]2319 -command [itcl::code $this AdjustSetting cutplane-yvisible] \ 2320 -variable [itcl::scope _settings(cutplane-yvisible)] 1746 2321 } 1747 2322 Rappture::Tooltip::for $itk_component(yCutButton) \ 1748 "Toggle the Y-axis cut awayon/off"2323 "Toggle the Y-axis cutplane on/off" 1749 2324 1750 2325 itk_component add yCutScale { … … 1752 2327 -width 10 -orient vertical -showvalue yes \ 1753 2328 -borderwidth 1 -highlightthickness 0 \ 1754 -command [itcl::code $this Slice move y] \1755 -variable [itcl::scope _ axis(yposition)]2329 -command [itcl::code $this EventuallySetCutplane y] \ 2330 -variable [itcl::scope _settings(cutplane-yposition)] 1756 2331 } { 1757 2332 usual … … 1760 2335 Rappture::Tooltip::for $itk_component(yCutScale) \ 1761 2336 "@[itcl::code $this Slice tooltip y]" 1762 # Set the default cut awayvalue before disabling the scale.1763 $itk_component(yCutScale) set 1002337 # Set the default cutplane value before disabling the scale. 2338 $itk_component(yCutScale) set 50 1764 2339 $itk_component(yCutScale) configure -state disabled 1765 1766 itk_component add yDirButton {1767 Rappture::PushButton $inner.ydir \1768 -onimage [Rappture::icon arrow-down] \1769 -onvalue -1 \1770 -offimage [Rappture::icon arrow-up] \1771 -offvalue 1 \1772 -command [itcl::code $this AdjustSetting axis-ydirection] \1773 -variable [itcl::scope _axis(ydirection)]1774 }1775 Rappture::Tooltip::for $itk_component(yDirButton) \1776 "Toggle the direction of the Y-axis cutaway"1777 set _axis(ydirection) -11778 2340 1779 2341 # Z-value slicer... … … 1782 2344 -onimage [Rappture::icon z-cutplane] \ 1783 2345 -offimage [Rappture::icon z-cutplane] \ 1784 -command [itcl::code $this AdjustSetting axis-zcutaway] \1785 -variable [itcl::scope _ axis(zcutaway)]2346 -command [itcl::code $this AdjustSetting cutplane-zvisible] \ 2347 -variable [itcl::scope _settings(cutplane-zvisible)] 1786 2348 } 1787 2349 Rappture::Tooltip::for $itk_component(zCutButton) \ 1788 "Toggle the Z-axis cut awayon/off"2350 "Toggle the Z-axis cutplane on/off" 1789 2351 1790 2352 itk_component add zCutScale { … … 1792 2354 -width 10 -orient vertical -showvalue yes \ 1793 2355 -borderwidth 1 -highlightthickness 0 \ 1794 -command [itcl::code $this Slice move z] \1795 -variable [itcl::scope _ axis(zposition)]2356 -command [itcl::code $this EventuallySetCutplane z] \ 2357 -variable [itcl::scope _settings(cutplane-zposition)] 1796 2358 } { 1797 2359 usual 1798 2360 ignore -borderwidth -highlightthickness 1799 2361 } 1800 $itk_component(zCutScale) set 1002362 $itk_component(zCutScale) set 50 1801 2363 $itk_component(zCutScale) configure -state disabled 1802 2364 #$itk_component(zCutScale) configure -state disabled … … 1804 2366 "@[itcl::code $this Slice tooltip z]" 1805 2367 1806 itk_component add zDirButton {1807 Rappture::PushButton $inner.zdir \1808 -onimage [Rappture::icon arrow-down] \1809 -onvalue -1 \1810 -offimage [Rappture::icon arrow-up] \1811 -offvalue 1 \1812 -command [itcl::code $this AdjustSetting axis-zdirection] \1813 -variable [itcl::scope _axis(zdirection)]1814 }1815 set _axis(zdirection) -11816 Rappture::Tooltip::for $itk_component(zDirButton) \1817 "Toggle the direction of the Z-axis cutaway"1818 1819 2368 blt::table $inner \ 1820 0,0 $itk_component(xCutButton) -anchor e -padx 2 -pady 2 \ 1821 1,0 $itk_component(xCutScale) -fill y \ 1822 0,1 $itk_component(yCutButton) -anchor e -padx 2 -pady 2 \ 1823 1,1 $itk_component(yCutScale) -fill y \ 1824 0,2 $itk_component(zCutButton) -anchor e -padx 2 -pady 2 \ 1825 1,2 $itk_component(zCutScale) -fill y \ 2369 0,0 $inner.visible -anchor w -pady 2 -cspan 4 \ 2370 1,0 $inner.lighting -anchor w -pady 2 -cspan 4 \ 2371 2,0 $inner.wireframe -anchor w -pady 2 -cspan 4 \ 2372 3,0 $inner.edges -anchor w -pady 2 -cspan 4 \ 2373 4,0 $inner.opacity_l -anchor w -pady 2 -cspan 3 \ 2374 5,0 $inner.opacity -fill x -pady 2 -cspan 3 \ 2375 6,0 $itk_component(xCutButton) -anchor e -padx 2 -pady 2 \ 2376 7,0 $itk_component(xCutScale) -fill y \ 2377 6,1 $itk_component(yCutButton) -anchor e -padx 2 -pady 2 \ 2378 7,1 $itk_component(yCutScale) -fill y \ 2379 6,2 $itk_component(zCutButton) -anchor e -padx 2 -pady 2 \ 2380 7,2 $itk_component(zCutScale) -fill y \ 1826 2381 1827 2382 blt::table configure $inner r* c* -resize none 1828 blt::table configure $inner r 1c3 -resize expand2383 blt::table configure $inner r7 c3 -resize expand 1829 2384 } 1830 2385 … … 1899 2454 } 1900 2455 } 1901 return [list . txt$bytes]2456 return [list .vtk $bytes] 1902 2457 } 1903 2458 … … 1957 2512 set tag $dataobj-$comp 1958 2513 set style [$dataobj style $comp] 1959 #puts stderr "style $dataobj-$comp \"$style\""1960 if { $dataobj != $_first } {1961 set settings(-wireframe) 11962 }1963 2514 array set settings { 1964 2515 -color \#808080 … … 1973 2524 -visible 1 1974 2525 } 2526 if { $dataobj != $_first } { 2527 set settings(-opacity) 1 2528 } 1975 2529 array set settings $style 1976 2530 SendCmd "streamlines add $tag" 1977 SendCmd "streamlines seed visible off "2531 SendCmd "streamlines seed visible off $tag" 1978 2532 set seeds [$dataobj hints seeds] 1979 2533 if { $seeds != "" && ![info exists _seeds($dataobj)] } { 1980 2534 set length [string length $seeds] 1981 set stag $dataobj-seeds 1982 SendCmd "dataset add $stag data follows $length" 2535 SendCmd "streamlines seed fmesh 200 data follows $length $tag" 1983 2536 SendCmd "$seeds" 1984 SendCmd "dataset visible 0 $stag"1985 SendCmd "streamlines seed random 1000 $stag"1986 2537 set _seeds($dataobj) 1 1987 2538 } 2539 SendCmd "cutplane add $tag" 2540 SendCmd "cutplane edges 0 $tag" 2541 SendCmd "cutplane wireframe 0 $tag" 2542 SendCmd "cutplane lighting 1 $tag" 2543 SendCmd "cutplane linewidth 1 $tag" 2544 #SendCmd "cutplane linecolor 1 1 1 $tag" 2545 #SendCmd "cutplane visible $tag" 2546 foreach axis { x y z } { 2547 SendCmd "cutplane slice $axis 1.0 $tag" 2548 SendCmd "cutplane axis $axis 0 $tag" 2549 } 2550 1988 2551 SendCmd "polydata add $tag" 1989 2552 SendCmd "polydata edges $settings(-edges) $tag" 1990 set _ volume(edges) $settings(-edges)2553 set _settings(volume-edges) $settings(-edges) 1991 2554 SendCmd "polydata color [Color2RGB $settings(-color)] $tag" 1992 2555 SendCmd "polydata lighting $settings(-lighting) $tag" 1993 set _ volume(lighting) $settings(-lighting)2556 set _settings(volume-lighting) $settings(-lighting) 1994 2557 SendCmd "polydata linecolor [Color2RGB $settings(-edgecolor)] $tag" 1995 2558 SendCmd "polydata linewidth $settings(-linewidth) $tag" 1996 2559 SendCmd "polydata opacity $settings(-opacity) $tag" 1997 set _ volume(opacity) $settings(-opacity)2560 set _settings(volume-opacity) $settings(-opacity) 1998 2561 SendCmd "polydata wireframe $settings(-wireframe) $tag" 1999 set _ volume(wireframe) $settings(-wireframe)2000 set _ volume(opacity) [expr $settings(-opacity) * 100.0]2562 set _settings(volume-wireframe) $settings(-wireframe) 2563 set _settings(volume-opacity) [expr $settings(-opacity) * 100.0] 2001 2564 SetColormap $dataobj $comp 2002 2565 } … … 2017 2580 # ---------------------------------------------------------------------- 2018 2581 itcl::body Rappture::VtkStreamlinesViewer::ReceiveLegend { colormap title vmin vmax size } { 2019 #puts stderr "ReceiveLegend colormap=$colormap title=$title range=$vmin,$vmax size=$size" 2582 set _legendPending 0 2583 puts stderr "ReceiveLegend colormap=$colormap title=$title range=$vmin,$vmax size=$size" 2020 2584 set _limits(vmin) $vmin 2021 2585 set _limits(vmax) $vmax 2022 2586 set _title $title 2587 regsub {\(mag\)} $title "" _title 2023 2588 if { [IsConnected] } { 2024 2589 set bytes [ReceiveBytes $size] … … 2028 2593 $_image(legend) configure -data $bytes 2029 2594 #puts stderr "read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>" 2030 DrawLegend 2595 if { [catch {DrawLegend $_title} errs] != 0 } { 2596 puts stderr errs=$errs 2597 } 2031 2598 } 2032 2599 } … … 2038 2605 # of the contour plot area. 2039 2606 # 2040 itcl::body Rappture::VtkStreamlinesViewer::DrawLegend { } {2607 itcl::body Rappture::VtkStreamlinesViewer::DrawLegend { name } { 2041 2608 set c $itk_component(view) 2042 2609 set w [winfo width $c] … … 2045 2612 set lineht [font metrics $font -linespace] 2046 2613 2047 if { $_settings(legend) } { 2614 if { [info exists _fields($name)] } { 2615 foreach { title units } $_fields($name) break 2616 if { $units != "" } { 2617 set title [format "%s (%s)" $title $units] 2618 } 2619 } else { 2620 set title $name 2621 } 2622 if { $_settings(legend-visible) } { 2048 2623 set x [expr $w - 2] 2049 2624 if { [$c find withtag "legend"] == "" } { 2050 $c create image $x [expr {$lineht+2}] \ 2625 set y 2 2626 $c create text $x $y \ 2051 2627 -anchor ne \ 2052 -image $_image(legend) -tags "colormap legend" 2053 $c create text $x 2 \ 2628 -fill $itk_option(-plotforeground) -tags "title legend" \ 2629 -font $font 2630 incr y $lineht 2631 $c create text $x $y \ 2054 2632 -anchor ne \ 2055 2633 -fill $itk_option(-plotforeground) -tags "vmax legend" \ 2056 2634 -font $font 2635 incr y $lineht 2636 $c create image $x $y \ 2637 -anchor ne \ 2638 -image $_image(legend) -tags "colormap legend" 2057 2639 $c create text $x [expr {$h-2}] \ 2058 2640 -anchor se \ … … 2063 2645 $c bind colormap <Motion> [itcl::code $this MotionLegend %x %y] 2064 2646 } 2647 $c bind title <ButtonPress> [itcl::code $this Combo post] 2648 $c bind title <Enter> [itcl::code $this Combo activate] 2649 $c bind title <Leave> [itcl::code $this Combo deactivate] 2065 2650 # Reset the item coordinates according the current size of the plot. 2066 $c coords colormap $x [expr {$lineht+2}]2651 $c itemconfigure title -text $title 2067 2652 if { $_limits(vmin) != "" } { 2068 2653 $c itemconfigure vmin -text [format %g $_limits(vmin)] … … 2071 2656 $c itemconfigure vmax -text [format %g $_limits(vmax)] 2072 2657 } 2073 $c coords vmin $x [expr {$h-2}] 2074 $c coords vmax $x 2 2658 set y 2 2659 $c coords title $x $y 2660 incr y $lineht 2661 $c coords vmax $x $y 2662 incr y $lineht 2663 $c coords colormap $x $y 2664 $c coords vmin $x [expr {$h - 2}] 2075 2665 } 2076 2666 } … … 2113 2703 set coords [$c coords colormap] 2114 2704 set imgX [expr $w - [image width $_image(legend)] - 2] 2115 set imgY [expr $y - $lineht - 2] 2116 2705 set imgY [expr $y - 2 * ($lineht + 2)] 2706 2707 if { [info exists _fields($_title)] } { 2708 foreach { title units } $_fields($_title) break 2709 if { $units != "" } { 2710 set title [format "%s (%s)" $title $units] 2711 } 2712 } else { 2713 set title $_title 2714 } 2117 2715 # Make a swatch of the selected color 2118 2716 if { [catch { $_image(legend) get 10 $imgY } pixel] != 0 } { … … 2129 2727 2130 2728 # Compute the value of the point 2131 set t [expr 1.0 - (double($imgY) / double($imgHeight-1))] 2132 #puts stderr "t=$t x=$x y=$y imgY=$imgY" 2133 set value [expr $t * ($_limits(vmax) - $_limits(vmin)) + $_limits(vmin)] 2729 if { [info exists _limits(vmax)] && [info exists _limits(vmin)] } { 2730 set t [expr 1.0 - (double($imgY) / double($imgHeight-1))] 2731 set value [expr $t * ($_limits(vmax) - $_limits(vmin)) + $_limits(vmin)] 2732 } else { 2733 set value 0.0 2734 } 2134 2735 set tipx [expr $x + 15] 2135 2736 set tipy [expr $y - 5] 2136 #puts stderr "tipx=$tipx tipy=$tipy x=$x y=$y" 2137 Rappture::Tooltip::text $c "$_title $value" 2737 Rappture::Tooltip::text $c "$title $value" 2138 2738 Rappture::Tooltip::tooltip show $c +$tipx,+$tipy 2139 2739 } … … 2152 2752 "move" { 2153 2753 set axis [lindex $args 0] 2154 set oldval $_ axis(${axis}position)2754 set oldval $_settings(axis-${axis}position) 2155 2755 set newval [lindex $args 1] 2156 2756 if {[llength $args] != 2} { … … 2158 2758 } 2159 2759 set newpos [expr {0.01*$newval}] 2160 SendCmd " renderer clipplane $axis $newpos -1"2760 SendCmd "cutplane slice $axis $newpos" 2161 2761 } 2162 2762 "tooltip" { … … 2170 2770 } 2171 2771 } 2772 2773 2774 # ---------------------------------------------------------------------- 2775 # USAGE: _dropdown post 2776 # USAGE: _dropdown unpost 2777 # USAGE: _dropdown select 2778 # 2779 # Used internally to handle the dropdown list for this combobox. The 2780 # post/unpost options are invoked when the list is posted or unposted 2781 # to manage the relief of the controlling button. The select option 2782 # is invoked whenever there is a selection from the list, to assign 2783 # the value back to the gauge. 2784 # ---------------------------------------------------------------------- 2785 itcl::body Rappture::VtkStreamlinesViewer::Combo {option} { 2786 set c $itk_component(view) 2787 switch -- $option { 2788 post { 2789 foreach { x1 y1 x2 y2 } [$c bbox title] break 2790 set x1 [expr [winfo width $itk_component(view)] - [winfo reqwidth $itk_component(fieldmenu)]] 2791 set x [expr $x1 + [winfo rootx $itk_component(view)]] 2792 set y [expr $y2 + [winfo rooty $itk_component(view)]] 2793 puts stderr "combo x=$x y=$y" 2794 tk_popup $itk_component(fieldmenu) $x $y 2795 } 2796 activate { 2797 $c itemconfigure title -fill red 2798 } 2799 deactivate { 2800 $c itemconfigure title -fill white 2801 } 2802 invoke { 2803 $itk_component(field) value $_currentField 2804 AdjustSetting streamlines-field 2805 } 2806 default { 2807 error "bad option \"$option\": should be post, unpost, select" 2808 } 2809 } 2810 } -
branches/blt4/gui/scripts/vtkviewer.tcl
r2591 r2742 153 153 # ---------------------------------------------------------------------- 154 154 itcl::body Rappture::VtkViewer::constructor {hostlist args} { 155 set _serverType "vtkvis" 155 156 package require vtk 157 156 158 # Rebuild event 157 159 $_dispatcher register !rebuild … … 1385 1387 set tmpfile file[pid].vtk 1386 1388 set f [open "$tmpfile" "w"] 1389 fconfigure $f -translation binary -encoding binary 1387 1390 puts $f $data 1388 1391 close $f 1389 1392 set reader [vtkDataSetReader $tag-xvtkDataSetReader] 1390 1393 $reader SetFileName $tmpfile 1391 $reader ReadFromInputStringOn1392 1394 $reader ReadAllNormalsOn 1393 1395 $reader ReadAllScalarsOn … … 1416 1418 rename $output "" 1417 1419 rename $reader "" 1418 rename $arr ""1419 1420 file delete $tmpfile 1420 1421 } … … 1885 1886 SendCmd "glyphs wireframe $settings(-wireframe) $tag" 1886 1887 #SendCmd "glyphs ccolor [Color2RGB $settings(-color)] $tag" 1887 #SendCmd "glyphs colormode ccolor $tag"1888 SendCmd "glyphs smode vcomp $tag"1888 #SendCmd "glyphs colormode ccolor {} $tag" 1889 SendCmd "glyphs smode vcomp {} $tag" 1889 1890 SendCmd "glyphs opacity $settings(-opacity) $tag" 1890 1891 SendCmd "glyphs visible $settings(-visible) $tag" -
branches/blt4/gui/scripts/xylegend.tcl
r1923 r2742 68 68 private variable _unmapHidden 0 69 69 70 constructor { args} { graph}70 constructor {graph args} {} 71 71 destructor {} 72 72 -
branches/blt4/gui/scripts/xyprint.tcl
r2692 r2742 38 38 private variable _preview ""; # Preview image. 39 39 private variable _savedSettings; # Array of settings. 40 private variable _legendFontFamily ""41 private variable _legendFontSize ""42 private variable _tickFontFamily ""43 private variable _titleFontFamily ""44 private variable _tickFontSize ""45 private variable _titleFontSize ""46 private variable _format ""47 private variable _axis ""48 private variable _style ""49 private variable _position ""50 40 51 41 private common _oldSettingsFile "~/.rpsettings" … … 92 82 # Same dialog may be used for different graphs 93 83 private common _settings 94 private common _fonts95 84 private common _wait 96 85 } … … 119 108 label $itk_interior.preview \ 120 109 -highlightthickness 0 -bd 0 -image $_preview -width 2.5i \ 121 -height 2. 25i -background grey -padx 10 -pady 10110 -height 2.5i -background grey 122 111 } { 123 112 ignore -background … … 165 154 set _clone "" 166 155 set _graph "" 167 foreach font [array names _fonts] {168 font delete $font169 }170 array unset _fonts171 156 } 172 157 … … 420 405 -majorticks {} -minorticks {} 421 406 $_clone axis configure $axis \ 422 -tickfont $ _fonts($axis-ticks)\423 -titlefont $ _fonts($axis-title)407 -tickfont $tickfont \ 408 -titlefont $titlefont 424 409 } 425 410 set count 0 … … 491 476 set w [Inches2Pixels $_settings($this-layout-width) 3.4] 492 477 set h [Inches2Pixels $_settings($this-layout-height) 3.4] 478 $_clone snap $img -width $w -height $h 479 493 480 set pixelsPerInch [winfo pixels . 1i] 494 481 set cw [winfo width $itk_component(preview)] … … 507 494 set sy [expr double($maxheight)/$h] 508 495 set s [expr min($sx,$sy)] 509 $_clone snap $img -width $w -height $h510 496 511 497 set pw [expr int(round($s * $w))] … … 544 530 545 531 itcl::body Rappture::XyPrint::GetAxisType { axis } { 546 return [$_clone axis type $axis] 532 foreach type { x y x2 y2 } { 533 set axes [$_clone ${type}axis use] 534 if { [lsearch $axes $axis] >= 0 } { 535 return [string range $type 0 0] 536 } 537 } 538 return "" 547 539 } 548 540 549 541 itcl::body Rappture::XyPrint::GetAxis {} { 550 set axis $_settings($this-axis-selected)551 foreach option { - grid -min -max -loose -title -stepsize -subdivisions } {542 set axis [$itk_component(axis_combo) current] 543 foreach option { -min -max -loose -title -stepsize -subdivisions } { 552 544 set _settings($this-axis$option) [$_clone axis cget $axis $option] 553 545 } 546 foreach attr { fontfamily fontsize fontweight fontslant } { 547 set specific $this-$axis-ticks 548 set general $this-axis-ticks 549 set _settings(${general}-${attr}) $_settings(${specific}-${attr}) 550 set specific $this-$axis-title 551 set general $this-axis-title 552 set _settings(${general}-${attr}) $_settings(${specific}-${attr}) 553 } 554 554 set type [GetAxisType $axis] 555 if { $type != "" } { 556 set _settings($this-axis-plotpad${type}) \ 557 [Pixels2Inches [$_clone cget -plotpad${type}]] 558 set _settings($this-axis-zero) [$_clone marker cget ${type}-zero -hide] 559 } 555 if { [$_clone grid cget -map${type}] == $axis } { 556 set _settings($this-axis-grid) 1 557 } else { 558 set _settings($this-axis-grid) 0 559 } 560 set _settings($this-axis-plotpad${type}) \ 561 [Pixels2Inches [$_clone cget -plotpad${type}]] 562 set _settings($this-axis-zero) [$_clone marker cget ${type}-zero -hide] 560 563 } 561 564 … … 745 748 set _settings($this-legend-anchor) [$page.anchor current] 746 749 if { $_clone != "" } { 747 font configure $_fonts(legend) \ 748 -family $_settings($this-legend-font-family) \ 749 -size $_settings($this-legend-font-size) \ 750 -weight $_settings($this-legend-font-weight) \ 751 -slant $_settings($this-legend-font-slant) 750 lappend font $_settings($this-legend-fontfamily) 751 lappend font $_settings($this-legend-fontsize) 752 lappend font $_settings($this-legend-fontweight) 753 lappend font $_settings($this-legend-fontslant) 752 754 foreach option { -hide -position -anchor -borderwidth } { 753 755 SetComponentOption legend $option 754 756 } 755 $_clone legend configure -font fixed -font $ _fonts(legend)757 $_clone legend configure -font fixed -font $font 756 758 } 757 759 ApplyElementSettings … … 952 954 -onvalue "bold" -offvalue "normal" \ 953 955 -command [itcl::code $this ApplyLegendSettings] \ 954 -variable [itcl::scope _settings($this-legend-font -weight)]956 -variable [itcl::scope _settings($this-legend-fontweight)] 955 957 Rappture::Tooltip::for $page.fontweight \ 956 958 "Use the bold version of the font." … … 962 964 -onvalue "italic" -offvalue "roman" \ 963 965 -command [itcl::code $this ApplyLegendSettings] \ 964 -variable [itcl::scope _settings($this-legend-font -slant)]966 -variable [itcl::scope _settings($this-legend-fontslant)] 965 967 Rappture::Tooltip::for $page.fontslant \ 966 968 "Use the italic version of the font." … … 982 984 5,1 $page.label -fill x -cspan 5 \ 983 985 6,0 $page.color_l -anchor e \ 984 6,1 $page.color -fill x 985 986 987 988 7,1 $page.dashes -fill x 986 6,1 $page.color -fill x \ 987 6,2 $page.symbol_l -anchor e \ 988 6,3 $page.symbol -fill both -cspan 3 \ 989 7,0 $page.dashes_l -anchor e \ 990 7,1 $page.dashes -fill x \ 989 991 990 992 blt::table configure $page r* -resize none -pady { 0 2 } 993 blt::table configure $page c3 c4 -resize none 991 994 blt::table configure $page r8 -resize both 992 995 … … 1026 1029 "Set the title of the current axis." 1027 1030 1028 label $page.min_l -text "min" 1031 label $page.min_l -text "min" 1029 1032 entry $page.min -width 10 \ 1030 1033 -textvariable [itcl::scope _settings($this-axis-min)] … … 1033 1036 "Set the minimum limit for the current axis. If empty, the minimum is automatically determined." 1034 1037 1035 label $page.max_l -text "max" 1038 label $page.max_l -text "max" 1036 1039 entry $page.max -width 10 \ 1037 1040 -textvariable [itcl::scope _settings($this-axis-max)] … … 1040 1043 "Set the maximum limit for the current axis. If empty, the maximum is automatically determined." 1041 1044 1042 label $page.subdivisions_l -text "subdivisions" 1045 label $page.subdivisions_l -text "subdivisions" 1043 1046 entry $page.subdivisions \ 1044 1047 -textvariable [itcl::scope _settings($this-axis-subdivisions)] … … 1048 1051 "Set the number of subdivisions (minor ticks) for the current axis." 1049 1052 1050 label $page.stepsize_l -text "step size" 1053 label $page.stepsize_l -text "step size" 1051 1054 entry $page.stepsize \ 1052 1055 -textvariable [itcl::scope _settings($this-axis-stepsize)] … … 1144 1147 -onvalue "bold" -offvalue "normal" \ 1145 1148 -command [itcl::code $this ApplyAxisSettings] \ 1146 -variable [itcl::scope _settings($this-axis-tick font-weight)]1149 -variable [itcl::scope _settings($this-axis-ticks-fontweight)] 1147 1150 Rappture::Tooltip::for $page.tickfontweight \ 1148 1151 "Use the bold version of the tick font." … … 1154 1157 -onvalue "italic" -offvalue "roman" \ 1155 1158 -command [itcl::code $this ApplyAxisSettings] \ 1156 -variable [itcl::scope _settings($this-axis-tick font-slant)]1159 -variable [itcl::scope _settings($this-axis-ticks-fontslant)] 1157 1160 Rappture::Tooltip::for $page.tickfontslant \ 1158 1161 "Use the italic version of the tick font." … … 1220 1223 -onvalue "bold" -offvalue "normal" \ 1221 1224 -command [itcl::code $this ApplyAxisSettings] \ 1222 -variable [itcl::scope _settings($this-axis-title font-weight)]1225 -variable [itcl::scope _settings($this-axis-title-fontweight)] 1223 1226 Rappture::Tooltip::for $page.titlefontweight \ 1224 1227 "Use the bold version of the title font." … … 1230 1233 -onvalue "italic" -offvalue "roman" \ 1231 1234 -command [itcl::code $this ApplyAxisSettings] \ 1232 -variable [itcl::scope _settings($this-axis-title font-slant)]1235 -variable [itcl::scope _settings($this-axis-title-fontslant)] 1233 1236 Rappture::Tooltip::for $page.titlefontslant \ 1234 1237 "Use the italic version of the title font." … … 1263 1266 8,4 $page.plotpad -fill both -cspan 3 1264 1267 1265 blt::table configure $page c0 c 7 c8 -resize none1268 blt::table configure $page c0 c4 c5 c6 c7 c8 -resize none 1266 1269 } 1267 1270 … … 1272 1275 1273 1276 itcl::body Rappture::XyPrint::ApplyAxisSettings {} { 1274 if { $_clone == "" } { 1275 return 1276 } 1277 set axis $_settings($this-axis-selected) 1277 set axis [$itk_component(axis_combo) current] 1278 1278 set type [GetAxisType $axis] 1279 1279 set page $itk_component(axis_page) … … 1282 1282 SetNamedComponentOption axis $axis $option 1283 1283 } 1284 set _settings($this-axis-ticks-fontfamily) [$page.tickfontfamily value] 1285 set _settings($this-axis-ticks-fontsize) [$page.tickfontsize value] 1286 set _settings($this-axis-title-fontfamily) [$page.titlefontfamily value] 1287 set _settings($this-axis-title-fontsize) [$page.titlefontsize value] 1288 1289 set tickfont {} 1290 set titlefont {} 1291 1292 foreach attr { fontfamily fontsize fontweight fontslant } { 1293 set specific $this-$axis-ticks 1294 set general $this-axis-ticks 1295 set _settings(${specific}-${attr}) $_settings(${general}-${attr}) 1296 lappend tickfont $_settings(${general}-${attr}) 1297 set specific $this-$axis-title 1298 set general $this-axis-title 1299 set _settings(${specific}-${attr}) $_settings(${general}-${attr}) 1300 lappend titlefont $_settings(${general}-${attr}) 1301 } 1302 $_clone axis configure $axis -tickfont $tickfont -titlefont $titlefont 1284 1303 $_clone marker configure ${type}-zero -hide $_settings($this-axis-zero) 1285 font configure $axis-title \1286 -family $_settings($this-axis-titlefont-family) \1287 -size $_settings($this-axis-titlefont-size) \1288 -weight $_settings($this-axis-titlefont-weight) \1289 -slant $_settings($this-axis-titlefont-slant)1290 font configure $axis-ticks \1291 -family $_settings($this-axis-tickfont-family) \1292 -size $_settings($this-axis-tickfont-size) \1293 -weight $_settings($this-axis-tickfont-weight) \1294 -slant $_settings($this-axis-tickfont-slant)1295 $_clone axis configure $axis -tickfont fixed -titlefont fixed1296 $_clone axis configure $axis -tickfont $axis-ticks -titlefont $axis-title1297 1304 GetAxis 1298 1305 RegeneratePreview … … 1346 1353 # Always set to "ps" "ieee" 1347 1354 set _settings($this-general-format) ps 1348 set _settings($this-general-style) 1355 set _settings($this-general-style) ieee 1349 1356 set _settings($this-general-remember) 0 1350 1357 set page $itk_component(graph_page) 1358 $page.format value [$page.format label $_settings($this-general-format)] 1359 $page.style value [$page.style label $_settings($this-general-style)] 1351 1360 1352 1361 # Layout settings … … 1375 1384 set _settings($this-legend-borderwidth) 0 1376 1385 1377 array unset info 1378 array set info [font configure legend] 1379 set _settings($this-legend-font-family) $info(-family) 1380 set _settings($this-legend-font-size) $info(-size) 1381 set _settings($this-legend-font-weight) $info(-weight) 1382 set _settings($this-legend-font-slant) $info(-slant) 1383 if { $info(-weight) == "bold" } { 1386 $page.fontfamily value $_settings($this-legend-fontfamily) 1387 $page.fontsize value $_settings($this-legend-fontsize) 1388 if { $_settings($this-legend-fontweight) == "bold" } { 1384 1389 set _settings($this-legend-font-bold) 1 1385 1390 } … … 1387 1392 set _settings($this-legend-position) [$_clone legend cget -position] 1388 1393 set _settings($this-legend-anchor) [$_clone legend cget -anchor] 1394 $page.position value \ 1395 [$page.position label $_settings($this-legend-position)] 1389 1396 $page.anchor value [$page.anchor label $_settings($this-legend-anchor)] 1390 1397 GetElement … … 1408 1415 1409 1416 array set info [font configure $axis-title] 1410 set _settings($this-axis-title font-family) $info(-family)1411 set _settings($this-axis-title font-size) $info(-size)1412 set _settings($this-axis-title font-weight) $info(-weight)1413 set _settings($this-axis-title font-slant) $info(-slant)1417 set _settings($this-axis-title-fontfamily) $info(-family) 1418 set _settings($this-axis-title-fontsize) $info(-size) 1419 set _settings($this-axis-title-fontweight) $info(-weight) 1420 set _settings($this-axis-title-fontslant) $info(-slant) 1414 1421 1415 1422 array set info [font configure $axis-ticks] 1416 set _settings($this-axis-tick font-family) $info(-family)1417 set _settings($this-axis-tick font-size) $info(-size)1418 set _settings($this-axis-tick font-weight) $info(-weight)1419 set _settings($this-axis-tick font-slant) $info(-slant)1423 set _settings($this-axis-tick-fontfamily) $info(-family) 1424 set _settings($this-axis-tick-fontsize) $info(-size) 1425 set _settings($this-axis-tick-fontweight) $info(-weight) 1426 set _settings($this-axis-tick-fontslant) $info(-slant) 1420 1427 1421 1428 # Always hide the zero line. … … 1446 1453 set parser [interp create -safe] 1447 1454 $parser alias xyprint [itcl::code $this restore] 1448 $parser alias font font1449 1455 set f [open $_settingsFile "r"] 1450 1456 set code [read $f] … … 1459 1465 $parser eval $_savedSettings($key) 1460 1466 } 1461 foreach {name value} [$parser eval "array get general"] { 1462 set _settings($this-graph-$name) $value 1467 # Restore settings to this instance 1468 foreach {name value} [$parser eval "array get settings"] { 1469 set _settings($this-$name) $value 1463 1470 } 1464 1471 interp delete $parser … … 1500 1507 # Create stanza associated with tool and plot title. 1501 1508 # General settings 1502 append out " set general(format) $_settings($this-general-format)\n" 1503 append out " set general(style) $_settings($this-general-style)\n" 1504 1505 foreach font [array names _fonts] { 1506 append out " font configure $font" 1507 array unset info 1508 array set info [font configure $font] 1509 foreach opt { -family -size -weight -slant } { 1510 set value [list $info($opt)] 1511 append out " $opt $value" 1512 } 1513 append out "\n" 1514 } 1509 set length [string length "${this}-"] 1510 append out " array set settings {\n" 1511 foreach item [array names _settings ${this}-*] { 1512 set field [string range $item $length end] 1513 if { [regexp {^element-[0-9]+$} $field] } { 1514 continue 1515 } 1516 set value $_settings($item) 1517 append out " [list $field] [list $value]\n" 1518 } 1519 append out " }\n" 1520 # Legend font 1521 lappend legendfont $_settings($this-legend-fontfamily) 1522 lappend legendfont $_settings($this-legend-fontsize) 1523 lappend legendfont $_settings($this-legend-fontweight) 1524 lappend legendfont $_settings($this-legend-fontslant) 1525 # Axis tick font 1526 lappend axistickfont $_settings($this-axis-ticks-fontfamily) 1527 lappend axistickfont $_settings($this-axis-ticks-fontsize) 1528 lappend axistickfont $_settings($this-axis-ticks-fontweight) 1529 lappend axistickfont $_settings($this-axis-ticks-fontslant) 1530 # Axis title font 1531 lappend axistitlefont $_settings($this-axis-title-fontfamily) 1532 lappend axistitlefont $_settings($this-axis-title-fontsize) 1533 lappend axistitlefont $_settings($this-axis-title-fontweight) 1534 lappend axistitlefont $_settings($this-axis-title-fontslant) 1515 1535 append out "\n" 1516 1536 … … 1530 1550 append out " $opt $value" 1531 1551 } 1532 append out " -font legend\n"1552 append out " -font \"$legendfont\"\n" 1533 1553 1534 1554 # Element settings … … 1559 1579 append out " if \{ \[preview axis names \"$axis\"\] == \"$axis\" \} \{\n" 1560 1580 append out " preview axis configure \"$axis\"" 1561 foreach opt { - hide -min -max -loose -title -stepsize -subdivisions } {1581 foreach opt { -grid -hide -min -max -loose -title -stepsize -subdivisions } { 1562 1582 set value [list [$_clone axis cget $axis $opt]] 1563 1583 append out " $opt $value" 1564 1584 } 1565 append out " -tickfont \"$axis -ticks\""1566 append out " -titlefont \"$axis -title\"\n"1585 append out " -tickfont \"$axistickfont\"" 1586 append out " -titlefont \"$axistitlefont\"\n" 1567 1587 set hide [$_clone marker cget ${axis}-zero -hide] 1568 1588 append out " preview marker configure \"${axis}-zero\" -hide $hide\n" -
branches/blt4/gui/scripts/xyresult.tcl
r2692 r2742 173 173 174 174 # Add bindings so you can mouse over points to see values: 175 bind $itk_component(plot) <Motion> \ 175 # 176 $itk_component(plot) element bind all <Enter> \ 176 177 [itcl::code $this Hilite at %x %y] 177 bind $itk_component(plot) <Leave> \ 178 $itk_component(plot) element bind all <Motion> \ 179 [itcl::code $this Hilite at %x %y] 180 $itk_component(plot) element bind all <Leave> \ 178 181 [itcl::code $this Hilite off %x %y] 179 182 -
branches/blt4/gui/src/Makefile.in
r2706 r2742 52 52 RapptureGUI_Init.o \ 53 53 RpCanvPlacard.o \ 54 RpDiffview.o 54 RpDiffview.o \ 55 RpConvertDxToVtk.o 55 56 56 57 name = RapptureGUI$(version) -
branches/blt4/gui/src/RapptureGUI_Init.c
r2170 r2742 45 45 return TCL_ERROR; 46 46 } 47 if (RpConvertDxToVtk_Init(interp) != TCL_OK) { 48 return TCL_ERROR; 49 } 47 50 return TCL_OK; 48 51 } -
branches/blt4/lang/Makefile.in
r2307 r2742 20 20 PYTHON = @PYTHON_DISTUTILS@ 21 21 MEX = @MEX@ 22 OCTAVE = @OCTAVE_VERSION@ 23 JAVAC = @JAVAC@ 22 OCTAVE = @OCTAVE_VERSION@ 23 JAVAC = @JAVAC@ 24 R = @R@ 24 25 25 26 # Rappture requires it. We always build a Tcl language API. … … 44 45 LANGS += java 45 46 endif 47 ifneq ($(R),) 48 LANGS += R 49 endif 46 50 47 .PHONY: tcl octave matlab perl python ruby java 51 .PHONY: tcl octave matlab perl python ruby java R 48 52 49 53 all: -
branches/blt4/lang/tcl/scripts/Makefile.in
r2274 r2742 56 56 note \ 57 57 number \ 58 periodicelement \ 58 59 phase \ 59 60 string … … 80 81 81 82 tclIndex: install-objects install-types install-validations $(FILES) 82 $(TCLSH) $(srcdir)/../ tclconfig/mkindex.tcl --srcdir $(srcdir) \83 $(TCLSH) $(srcdir)/../cf/mkindex.tcl --srcdir $(srcdir) \ 83 84 --outfile tclIndex 84 $(TCLSH) $(srcdir)/../ tclconfig/mkobjects.tcl --srcdir $(srcdir) \85 $(TCLSH) $(srcdir)/../cf/mkobjects.tcl --srcdir $(srcdir) \ 85 86 $(OBJECTS) 86 87 -
branches/blt4/lang/tcl/src/Makefile.in
r2705 r2742 51 51 LIBS = \ 52 52 -L../../../src/core -lrappture \ 53 $(TCL_LIB_SPEC) -l expat -lz -lm -lstdc++53 $(TCL_LIB_SPEC) -lncurses -lexpat -lz -lm -lstdc++ 54 54 55 55 OBJS = \ 56 56 Rappture_Init.o \ 57 RpCurses.o \ 57 58 RpDaemon.o \ 58 59 RpEncodeTclInterface.o \ -
branches/blt4/packages/vizservers/configure
r2681 r2742 8529 8529 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 8530 8530 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " 8531 #define SIZEOF_LONG ${ac_cv_sizeof_long} 8532 #if SIZEOF_LONG == 8 8533 # define INT64_C(c) c ## L 8534 # define UINT64_C(c) c ## UL 8535 #else 8536 # define INT64_C(c) c ## LL 8537 # define UINT64_C(c) c ## ULL 8538 #endif 8531 #define __STDC_CONSTANT_MACROS 1 8539 8532 8540 8533 " … … 8549 8542 8550 8543 CPPFLAGS=$save_CPPFLAGS 8544 8545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavcodec" >&5 8546 $as_echo_n "checking for main in -lavcodec... " >&6; } 8547 if ${ac_cv_lib_avcodec_main+:} false; then : 8548 $as_echo_n "(cached) " >&6 8549 else 8550 ac_check_lib_save_LIBS=$LIBS 8551 LIBS="-lavcodec $LIBS" 8552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8553 /* end confdefs.h. */ 8554 8555 8556 int 8557 main () 8558 { 8559 return main (); 8560 ; 8561 return 0; 8562 } 8563 _ACEOF 8564 if ac_fn_cxx_try_link "$LINENO"; then : 8565 ac_cv_lib_avcodec_main=yes 8566 else 8567 ac_cv_lib_avcodec_main=no 8568 fi 8569 rm -f core conftest.err conftest.$ac_objext \ 8570 conftest$ac_exeext conftest.$ac_ext 8571 LIBS=$ac_check_lib_save_LIBS 8572 fi 8573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avcodec_main" >&5 8574 $as_echo "$ac_cv_lib_avcodec_main" >&6; } 8575 if test "x$ac_cv_lib_avcodec_main" = xyes; then : 8576 cat >>confdefs.h <<_ACEOF 8577 #define HAVE_LIBAVCODEC 1 8578 _ACEOF 8579 8580 LIBS="-lavcodec $LIBS" 8581 8582 else 8583 as_fn_error $? "requires libavcodec" "$LINENO" 5 8584 fi 8585 8586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavutil" >&5 8587 $as_echo_n "checking for main in -lavutil... " >&6; } 8588 if ${ac_cv_lib_avutil_main+:} false; then : 8589 $as_echo_n "(cached) " >&6 8590 else 8591 ac_check_lib_save_LIBS=$LIBS 8592 LIBS="-lavutil $LIBS" 8593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8594 /* end confdefs.h. */ 8595 8596 8597 int 8598 main () 8599 { 8600 return main (); 8601 ; 8602 return 0; 8603 } 8604 _ACEOF 8605 if ac_fn_cxx_try_link "$LINENO"; then : 8606 ac_cv_lib_avutil_main=yes 8607 else 8608 ac_cv_lib_avutil_main=no 8609 fi 8610 rm -f core conftest.err conftest.$ac_objext \ 8611 conftest$ac_exeext conftest.$ac_ext 8612 LIBS=$ac_check_lib_save_LIBS 8613 fi 8614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avutil_main" >&5 8615 $as_echo "$ac_cv_lib_avutil_main" >&6; } 8616 if test "x$ac_cv_lib_avutil_main" = xyes; then : 8617 cat >>confdefs.h <<_ACEOF 8618 #define HAVE_LIBAVUTIL 1 8619 _ACEOF 8620 8621 LIBS="-lavutil $LIBS" 8622 8623 else 8624 as_fn_error $? "requires libavutil" "$LINENO" 5 8625 fi 8626 8627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lavformat" >&5 8628 $as_echo_n "checking for main in -lavformat... " >&6; } 8629 if ${ac_cv_lib_avformat_main+:} false; then : 8630 $as_echo_n "(cached) " >&6 8631 else 8632 ac_check_lib_save_LIBS=$LIBS 8633 LIBS="-lavformat $LIBS" 8634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8635 /* end confdefs.h. */ 8636 8637 8638 int 8639 main () 8640 { 8641 return main (); 8642 ; 8643 return 0; 8644 } 8645 _ACEOF 8646 if ac_fn_cxx_try_link "$LINENO"; then : 8647 ac_cv_lib_avformat_main=yes 8648 else 8649 ac_cv_lib_avformat_main=no 8650 fi 8651 rm -f core conftest.err conftest.$ac_objext \ 8652 conftest$ac_exeext conftest.$ac_ext 8653 LIBS=$ac_check_lib_save_LIBS 8654 fi 8655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avformat_main" >&5 8656 $as_echo "$ac_cv_lib_avformat_main" >&6; } 8657 if test "x$ac_cv_lib_avformat_main" = xyes; then : 8658 cat >>confdefs.h <<_ACEOF 8659 #define HAVE_LIBAVFORMAT 1 8660 _ACEOF 8661 8662 LIBS="-lavformat $LIBS" 8663 8664 else 8665 as_fn_error $? "requires libavformat" "$LINENO" 5 8666 fi 8667 8668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lswscale" >&5 8669 $as_echo_n "checking for main in -lswscale... " >&6; } 8670 if ${ac_cv_lib_swscale_main+:} false; then : 8671 $as_echo_n "(cached) " >&6 8672 else 8673 ac_check_lib_save_LIBS=$LIBS 8674 LIBS="-lswscale $LIBS" 8675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8676 /* end confdefs.h. */ 8677 8678 8679 int 8680 main () 8681 { 8682 return main (); 8683 ; 8684 return 0; 8685 } 8686 _ACEOF 8687 if ac_fn_cxx_try_link "$LINENO"; then : 8688 ac_cv_lib_swscale_main=yes 8689 else 8690 ac_cv_lib_swscale_main=no 8691 fi 8692 rm -f core conftest.err conftest.$ac_objext \ 8693 conftest$ac_exeext conftest.$ac_ext 8694 LIBS=$ac_check_lib_save_LIBS 8695 fi 8696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_swscale_main" >&5 8697 $as_echo "$ac_cv_lib_swscale_main" >&6; } 8698 if test "x$ac_cv_lib_swscale_main" = xyes; then : 8699 cat >>confdefs.h <<_ACEOF 8700 #define HAVE_LIBSWSCALE 1 8701 _ACEOF 8702 8703 LIBS="-lswscale $LIBS" 8704 8705 fi 8706 8707 for ac_func in avcodec_decode_video2 8708 do : 8709 ac_fn_cxx_check_func "$LINENO" "avcodec_decode_video2" "ac_cv_func_avcodec_decode_video2" 8710 if test "x$ac_cv_func_avcodec_decode_video2" = xyes; then : 8711 cat >>confdefs.h <<_ACEOF 8712 #define HAVE_AVCODEC_DECODE_VIDEO2 1 8713 _ACEOF 8714 8715 fi 8716 done 8717 8718 for ac_func in avcodec_decode_video 8719 do : 8720 ac_fn_cxx_check_func "$LINENO" "avcodec_decode_video" "ac_cv_func_avcodec_decode_video" 8721 if test "x$ac_cv_func_avcodec_decode_video" = xyes; then : 8722 cat >>confdefs.h <<_ACEOF 8723 #define HAVE_AVCODEC_DECODE_VIDEO 1 8724 _ACEOF 8725 8726 fi 8727 done 8728 8729 for ac_func in avformat_open_input 8730 do : 8731 ac_fn_cxx_check_func "$LINENO" "avformat_open_input" "ac_cv_func_avformat_open_input" 8732 if test "x$ac_cv_func_avformat_open_input" = xyes; then : 8733 cat >>confdefs.h <<_ACEOF 8734 #define HAVE_AVFORMAT_OPEN_INPUT 1 8735 _ACEOF 8736 8737 fi 8738 done 8739 8740 for ac_func in av_open_input_file 8741 do : 8742 ac_fn_cxx_check_func "$LINENO" "av_open_input_file" "ac_cv_func_av_open_input_file" 8743 if test "x$ac_cv_func_av_open_input_file" = xyes; then : 8744 cat >>confdefs.h <<_ACEOF 8745 #define HAVE_AV_OPEN_INPUT_FILE 1 8746 _ACEOF 8747 8748 fi 8749 done 8750 8751 for ac_func in av_guess_format 8752 do : 8753 ac_fn_cxx_check_func "$LINENO" "av_guess_format" "ac_cv_func_av_guess_format" 8754 if test "x$ac_cv_func_av_guess_format" = xyes; then : 8755 cat >>confdefs.h <<_ACEOF 8756 #define HAVE_AV_GUESS_FORMAT 1 8757 _ACEOF 8758 8759 fi 8760 done 8761 8762 for ac_func in guess_format 8763 do : 8764 ac_fn_cxx_check_func "$LINENO" "guess_format" "ac_cv_func_guess_format" 8765 if test "x$ac_cv_func_guess_format" = xyes; then : 8766 cat >>confdefs.h <<_ACEOF 8767 #define HAVE_GUESS_FORMAT 1 8768 _ACEOF 8769 8770 fi 8771 done 8772 8773 for ac_func in av_dump_format 8774 do : 8775 ac_fn_cxx_check_func "$LINENO" "av_dump_format" "ac_cv_func_av_dump_format" 8776 if test "x$ac_cv_func_av_dump_format" = xyes; then : 8777 cat >>confdefs.h <<_ACEOF 8778 #define HAVE_AV_DUMP_FORMAT 1 8779 _ACEOF 8780 8781 fi 8782 done 8783 8784 for ac_func in dump_format 8785 do : 8786 ac_fn_cxx_check_func "$LINENO" "dump_format" "ac_cv_func_dump_format" 8787 if test "x$ac_cv_func_dump_format" = xyes; then : 8788 cat >>confdefs.h <<_ACEOF 8789 #define HAVE_DUMP_FORMAT 1 8790 _ACEOF 8791 8792 fi 8793 done 8794 8795 for ac_func in avio_open 8796 do : 8797 ac_fn_cxx_check_func "$LINENO" "avio_open" "ac_cv_func_avio_open" 8798 if test "x$ac_cv_func_avio_open" = xyes; then : 8799 cat >>confdefs.h <<_ACEOF 8800 #define HAVE_AVIO_OPEN 1 8801 _ACEOF 8802 8803 fi 8804 done 8805 8806 for ac_func in url_fopen 8807 do : 8808 ac_fn_cxx_check_func "$LINENO" "url_fopen" "ac_cv_func_url_fopen" 8809 if test "x$ac_cv_func_url_fopen" = xyes; then : 8810 cat >>confdefs.h <<_ACEOF 8811 #define HAVE_URL_FOPEN 1 8812 _ACEOF 8813 8814 fi 8815 done 8816 8817 for ac_func in avio_close 8818 do : 8819 ac_fn_cxx_check_func "$LINENO" "avio_close" "ac_cv_func_avio_close" 8820 if test "x$ac_cv_func_avio_close" = xyes; then : 8821 cat >>confdefs.h <<_ACEOF 8822 #define HAVE_AVIO_CLOSE 1 8823 _ACEOF 8824 8825 fi 8826 done 8827 8828 for ac_func in url_fclose 8829 do : 8830 ac_fn_cxx_check_func "$LINENO" "url_fclose" "ac_cv_func_url_fclose" 8831 if test "x$ac_cv_func_url_fclose" = xyes; then : 8832 cat >>confdefs.h <<_ACEOF 8833 #define HAVE_URL_FCLOSE 1 8834 _ACEOF 8835 8836 fi 8837 done 8838 8839 for ac_func in avformat_alloc_context 8840 do : 8841 ac_fn_cxx_check_func "$LINENO" "avformat_alloc_context" "ac_cv_func_avformat_alloc_context" 8842 if test "x$ac_cv_func_avformat_alloc_context" = xyes; then : 8843 cat >>confdefs.h <<_ACEOF 8844 #define HAVE_AVFORMAT_ALLOC_CONTEXT 1 8845 _ACEOF 8846 8847 fi 8848 done 8849 8850 for ac_func in av_alloc_format_context 8851 do : 8852 ac_fn_cxx_check_func "$LINENO" "av_alloc_format_context" "ac_cv_func_av_alloc_format_context" 8853 if test "x$ac_cv_func_av_alloc_format_context" = xyes; then : 8854 cat >>confdefs.h <<_ACEOF 8855 #define HAVE_AV_ALLOC_FORMAT_CONTEXT 1 8856 _ACEOF 8857 8858 fi 8859 done 8860 8861 for ac_func in av_set_parameters 8862 do : 8863 ac_fn_cxx_check_func "$LINENO" "av_set_parameters" "ac_cv_func_av_set_parameters" 8864 if test "x$ac_cv_func_av_set_parameters" = xyes; then : 8865 cat >>confdefs.h <<_ACEOF 8866 #define HAVE_AV_SET_PARAMETERS 1 8867 _ACEOF 8868 8869 fi 8870 done 8871 8872 for ac_func in avformat_write_header 8873 do : 8874 ac_fn_cxx_check_func "$LINENO" "avformat_write_header" "ac_cv_func_avformat_write_header" 8875 if test "x$ac_cv_func_avformat_write_header" = xyes; then : 8876 cat >>confdefs.h <<_ACEOF 8877 #define HAVE_AVFORMAT_WRITE_HEADER 1 8878 _ACEOF 8879 8880 fi 8881 done 8882 8883 for ac_func in av_write_header 8884 do : 8885 ac_fn_cxx_check_func "$LINENO" "av_write_header" "ac_cv_func_av_write_header" 8886 if test "x$ac_cv_func_av_write_header" = xyes; then : 8887 cat >>confdefs.h <<_ACEOF 8888 #define HAVE_AV_WRITE_HEADER 1 8889 _ACEOF 8890 8891 fi 8892 done 8893 8894 ac_fn_cxx_check_func "$LINENO" "av_write_trailer" "ac_cv_func_av_write_trailer" 8895 if test "x$ac_cv_func_av_write_trailer" = xyes; then : 8896 8897 else 8898 as_fn_error $? "oops! no av_write_trailer?!?" "$LINENO" 5 8899 fi 8900 8901 ac_fn_cxx_check_func "$LINENO" "av_freep" "ac_cv_func_av_freep" 8902 if test "x$ac_cv_func_av_freep" = xyes; then : 8903 8904 else 8905 as_fn_error $? "oops! no av_freep ?!?" "$LINENO" 5 8906 fi 8907 8908 ac_fn_cxx_check_func "$LINENO" "av_free" "ac_cv_func_av_free" 8909 if test "x$ac_cv_func_av_free" = xyes; then : 8910 8911 else 8912 as_fn_error $? "oops! no av_free ?!?" "$LINENO" 5 8913 fi 8914 8915 ac_fn_cxx_check_func "$LINENO" "av_new_stream" "ac_cv_func_av_new_stream" 8916 if test "x$ac_cv_func_av_new_stream" = xyes; then : 8917 8918 else 8919 as_fn_error $? "oops! av_new_stream ?!?" "$LINENO" 5 8920 fi 8921 8922 ac_fn_cxx_check_func "$LINENO" "av_malloc" "ac_cv_func_av_malloc" 8923 if test "x$ac_cv_func_av_malloc" = xyes; then : 8924 8925 else 8926 as_fn_error $? "oops! no av_malloc ?!?" "$LINENO" 5 8927 fi 8928 8929 ac_fn_cxx_check_func "$LINENO" "av_init_packet" "ac_cv_func_av_init_packet" 8930 if test "x$ac_cv_func_av_init_packet" = xyes; then : 8931 8932 else 8933 as_fn_error $? "oops! no av_init_packet ?!?" "$LINENO" 5 8934 fi 8935 8936 ac_fn_cxx_check_func "$LINENO" "av_rescale_q" "ac_cv_func_av_rescale_q" 8937 if test "x$ac_cv_func_av_rescale_q" = xyes; then : 8938 8939 else 8940 as_fn_error $? "oops! no av_rescale_q ?!?" "$LINENO" 5 8941 fi 8942 8943 ac_fn_cxx_check_func "$LINENO" "av_write_frame" "ac_cv_func_av_write_frame" 8944 if test "x$ac_cv_func_av_write_frame" = xyes; then : 8945 8946 else 8947 as_fn_error $? "oops! av_write_frame ?!?" "$LINENO" 5 8948 fi 8949 8950 ac_fn_cxx_check_func "$LINENO" "avformat_alloc_context" "ac_cv_func_avformat_alloc_context" 8951 if test "x$ac_cv_func_avformat_alloc_context" = xyes; then : 8952 8953 else 8954 as_fn_error $? "oops! avformat_alloc_context ?!?" "$LINENO" 5 8955 fi 8956 8957 for ac_func in img_convert 8958 do : 8959 ac_fn_cxx_check_func "$LINENO" "img_convert" "ac_cv_func_img_convert" 8960 if test "x$ac_cv_func_img_convert" = xyes; then : 8961 cat >>confdefs.h <<_ACEOF 8962 #define HAVE_IMG_CONVERT 1 8963 _ACEOF 8964 8965 fi 8966 done 8967 8968 for ac_func in sws_scale 8969 do : 8970 ac_fn_cxx_check_func "$LINENO" "sws_scale" "ac_cv_func_sws_scale" 8971 if test "x$ac_cv_func_sws_scale" = xyes; then : 8972 cat >>confdefs.h <<_ACEOF 8973 #define HAVE_SWS_SCALE 1 8974 _ACEOF 8975 8976 fi 8977 done 8978 8979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8980 /* end confdefs.h. */ 8981 8982 #define __STDC_CONSTANT_MACROS 1 8983 #include <stdlib.h> 8984 #ifdef HAVE_FFMPEG_AVCODEC_H 8985 # include <ffmpeg/avcodec.h> 8986 #endif 8987 #ifdef HAVE_LIBAVCODEC_AVCODEC_H 8988 # include <libavcodec/avcodec.h> 8989 #endif 8990 int x = AVMEDIA_TYPE_VIDEO; 8991 8992 int 8993 main () 8994 { 8995 8996 ; 8997 return 0; 8998 } 8999 _ACEOF 9000 if ac_fn_cxx_try_compile "$LINENO"; then : 9001 ac_avmedia_type_video="yes" 9002 else 9003 ac_avmedia_type_video="no" 9004 fi 9005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9006 if test "$ac_avmedia_type_video" == "yes" ; then 9007 9008 $as_echo "#define HAVE_AVMEDIA_TYPE_VIDEO 1" >>confdefs.h 9009 9010 fi 8551 9011 8552 9012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avcodec_alloc_frame in -lavcodec" >&5 … … 8689 9149 8690 9150 fi 8691 8692 for ac_func in avformat_alloc_context8693 do :8694 ac_fn_cxx_check_func "$LINENO" "avformat_alloc_context" "ac_cv_func_avformat_alloc_context"8695 if test "x$ac_cv_func_avformat_alloc_context" = xyes; then :8696 cat >>confdefs.h <<_ACEOF8697 #define HAVE_AVFORMAT_ALLOC_CONTEXT 18698 _ACEOF8699 8700 fi8701 done8702 8703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for av_free in -lavutil" >&58704 $as_echo_n "checking for av_free in -lavutil... " >&6; }8705 if ${ac_cv_lib_avutil_av_free+:} false; then :8706 $as_echo_n "(cached) " >&68707 else8708 ac_check_lib_save_LIBS=$LIBS8709 LIBS="-lavutil $LIBS"8710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext8711 /* end confdefs.h. */8712 8713 /* Override any GCC internal prototype to avoid an error.8714 Use char because int might match the return type of a GCC8715 builtin and then its argument prototype would still apply. */8716 #ifdef __cplusplus8717 extern "C"8718 #endif8719 char av_free ();8720 int8721 main ()8722 {8723 return av_free ();8724 ;8725 return 0;8726 }8727 _ACEOF8728 if ac_fn_cxx_try_link "$LINENO"; then :8729 ac_cv_lib_avutil_av_free=yes8730 else8731 ac_cv_lib_avutil_av_free=no8732 fi8733 rm -f core conftest.err conftest.$ac_objext \8734 conftest$ac_exeext conftest.$ac_ext8735 LIBS=$ac_check_lib_save_LIBS8736 fi8737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avutil_av_free" >&58738 $as_echo "$ac_cv_lib_avutil_av_free" >&6; }8739 if test "x$ac_cv_lib_avutil_av_free" = xyes; then :8740 cat >>confdefs.h <<_ACEOF8741 #define HAVE_LIBAVUTIL 18742 _ACEOF8743 8744 LIBS="-lavutil $LIBS"8745 8746 fi8747 8748 for ac_func in img_convert8749 do :8750 ac_fn_cxx_check_func "$LINENO" "img_convert" "ac_cv_func_img_convert"8751 if test "x$ac_cv_func_img_convert" = xyes; then :8752 cat >>confdefs.h <<_ACEOF8753 #define HAVE_IMG_CONVERT 18754 _ACEOF8755 8756 fi8757 done8758 9151 8759 9152 -
branches/blt4/packages/vizservers/configure.in
r2674 r2742 275 275 276 276 AC_CHECK_HEADERS([ffmpeg/avcodec.h libavcodec/avcodec.h ffmpeg/avformat.h libavformat/avformat.h ffmpeg/avutil.h libavutil/avutil.h],,,[ 277 #define SIZEOF_LONG ${ac_cv_sizeof_long} 278 #if SIZEOF_LONG == 8 279 # define INT64_C(c) c ## L 280 # define UINT64_C(c) c ## UL 281 #else 282 # define INT64_C(c) c ## LL 283 # define UINT64_C(c) c ## ULL 284 #endif 277 #define __STDC_CONSTANT_MACROS 1 285 278 ]) 286 279 CPPFLAGS=$save_CPPFLAGS 280 281 AC_CHECK_LIB(avcodec, main,,AC_MSG_ERROR(requires libavcodec)) 282 AC_CHECK_LIB(avutil, main,,AC_MSG_ERROR(requires libavutil)) 283 AC_CHECK_LIB(avformat, main,,AC_MSG_ERROR(requires libavformat)) 284 AC_CHECK_LIB(swscale, main) 285 AC_CHECK_FUNCS(avcodec_decode_video2) 286 AC_CHECK_FUNCS(avcodec_decode_video) 287 AC_CHECK_FUNCS(avformat_open_input) 288 AC_CHECK_FUNCS(av_open_input_file) 289 AC_CHECK_FUNCS(av_guess_format) 290 AC_CHECK_FUNCS(guess_format) 291 AC_CHECK_FUNCS(av_dump_format) 292 AC_CHECK_FUNCS(dump_format) 293 AC_CHECK_FUNCS(avio_open) 294 AC_CHECK_FUNCS(url_fopen) 295 AC_CHECK_FUNCS(avio_close) 296 AC_CHECK_FUNCS(url_fclose) 297 AC_CHECK_FUNCS(avformat_alloc_context) 298 AC_CHECK_FUNCS(av_alloc_format_context) 299 AC_CHECK_FUNCS(av_set_parameters) 300 AC_CHECK_FUNCS(avformat_write_header) 301 AC_CHECK_FUNCS(av_write_header) 302 AC_CHECK_FUNC(av_write_trailer,, 303 AC_MSG_ERROR(oops! no av_write_trailer?!?)) 304 AC_CHECK_FUNC(av_freep,, AC_MSG_ERROR(oops! no av_freep ?!?)) 305 AC_CHECK_FUNC(av_free,,AC_MSG_ERROR(oops! no av_free ?!?)) 306 AC_CHECK_FUNC(av_new_stream,,AC_MSG_ERROR(oops! av_new_stream ?!?)) 307 AC_CHECK_FUNC(av_malloc,, AC_MSG_ERROR(oops! no av_malloc ?!?)) 308 AC_CHECK_FUNC(av_init_packet,,AC_MSG_ERROR(oops! no av_init_packet ?!?)) 309 AC_CHECK_FUNC(av_rescale_q,,AC_MSG_ERROR(oops! no av_rescale_q ?!?)) 310 AC_CHECK_FUNC(av_write_frame,,AC_MSG_ERROR(oops! av_write_frame ?!?)) 311 AC_CHECK_FUNC(avformat_alloc_context,, 312 AC_MSG_ERROR(oops! avformat_alloc_context ?!?)) 313 AC_CHECK_FUNCS(img_convert) 314 AC_CHECK_FUNCS(sws_scale) 315 AC_TRY_COMPILE([ 316 #define __STDC_CONSTANT_MACROS 1 317 #include <stdlib.h> 318 #ifdef HAVE_FFMPEG_AVCODEC_H 319 # include <ffmpeg/avcodec.h> 320 #endif 321 #ifdef HAVE_LIBAVCODEC_AVCODEC_H 322 # include <libavcodec/avcodec.h> 323 #endif 324 int x = AVMEDIA_TYPE_VIDEO; 325 ],, ac_avmedia_type_video="yes", ac_avmedia_type_video="no") 326 if test "$ac_avmedia_type_video" == "yes" ; then 327 AC_DEFINE(HAVE_AVMEDIA_TYPE_VIDEO,1,[Define if AVMEDIA_TYPE_VIDEO enum exists. ]) 328 fi 287 329 288 330 AC_CHECK_LIB([avcodec], [avcodec_alloc_frame]) … … 291 333 AC_CHECK_LIB([avformat], [av_alloc_format_context], [], 292 334 [AC_MSG_WARN([libavformat not usable])])) 293 AC_CHECK_FUNCS([avformat_alloc_context])294 AC_CHECK_LIB([avutil], [av_free])295 AC_CHECK_FUNCS([img_convert])296 335 297 336 -
branches/blt4/packages/vizservers/nanovis/Command.cpp
r2681 r2742 1215 1215 #endif /*__TEST_CODE__*/ 1216 1216 } else { 1217 if ((nBytes > 5) && (strncmp(bytes, "<ODX>", 5) == 0)) { 1218 bytes += 5; 1219 nBytes -= 5; 1220 } 1217 1221 TRACE("DX loading...\n"); 1218 1222 std::stringstream fdata; -
branches/blt4/packages/vizservers/nanovis/RpAVTranslate.cpp
r2409 r2742 34 34 35 35 #include "RpAVTranslate.h" 36 37 #ifndef HAVE_AVMEDIA_TYPE_VIDEO 38 #define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO 39 #endif /* HAVE_AVMEDIA_TYPE_VIDEO */ 40 41 #ifndef AV_PKT_FLAG_KEY 42 #define AV_PKT_FLAG_KEY PKT_FLAG_KEY 43 #endif 44 45 #ifndef HAVE_AV_GUESS_FORMAT 46 #define av_guess_format guess_format 47 #endif /*HAVE_AV_GUESS_FORMAT*/ 48 49 #ifndef HAVE_AV_DUMP_FORMAT 50 #define av_dump_format dump_format 51 #endif /*HAVE_AV_DUMP_FORMAT*/ 52 53 #ifndef HAVE_AVIO_OPEN 54 #define avio_open url_fopen 55 #endif /*HAVE_AVIO_OPEN*/ 56 57 #ifndef HAVE_AVIO_CLOSE 58 #define avio_close url_fclose 59 #endif /*HAVE_AVIO_CLOSE*/ 36 60 37 61 #ifndef M_PI … … 101 125 102 126 /* Auto detect the output format from the name. default is mpeg. */ 103 _fmtPtr = guess_format(NULL, filename, NULL);127 _fmtPtr = av_guess_format(NULL, filename, NULL); 104 128 if (_fmtPtr == NULL) { 105 129 /* … … 107 131 "file extension: using MPEG.\n"); 108 132 */ 109 _fmtPtr = guess_format("mpeg", NULL, NULL);133 _fmtPtr = av_guess_format("mpeg", NULL, NULL); 110 134 } 111 135 if (_fmtPtr == NULL) { … … 136 160 } 137 161 162 #if defined(HAVE_AV_SET_PARAMETERS) && !defined(HAVE_AVFORMAT_WRITE_HEADER) 138 163 /* Set the output parameters (must be done even if no parameters). */ 139 164 if (av_set_parameters(_ocPtr, NULL) < 0) { … … 141 166 return false; 142 167 } 143 144 dump_format(_ocPtr, 0, filename, 1);168 #endif 169 av_dump_format(_ocPtr, 0, filename, 1); 145 170 146 171 /* Now that all the parameters are set, we can open the video codec and … … 154 179 /* Open the output file, if needed. */ 155 180 if (!(_fmtPtr->flags & AVFMT_NOFILE)) { 156 if ( url_fopen(&_ocPtr->pb, filename, URL_WRONLY) < 0) {181 if (avio_open(&_ocPtr->pb, filename, URL_WRONLY) < 0) { 157 182 status.addError("Could not open '%s'", filename); 158 183 return false; … … 161 186 162 187 /* write the stream header, if any */ 188 #ifdef HAVE_AVFORMAT_WRITE_HEADER 189 avformat_write_header(_ocPtr, NULL); 190 #else 163 191 av_write_header(_ocPtr); 192 #endif 164 193 return true; 165 194 } … … 226 255 if (!(_fmtPtr->flags & AVFMT_NOFILE)) { 227 256 /* close the output file */ 228 url_fclose(_ocPtr->pb);257 avio_close(_ocPtr->pb); 229 258 } 230 259 … … 257 286 codecPtr = streamPtr->codec; 258 287 codecPtr->codec_id = codec_id; 259 codecPtr->codec_type = CODEC_TYPE_VIDEO;288 codecPtr->codec_type = AVMEDIA_TYPE_VIDEO; 260 289 261 290 /* Put sample parameters */ … … 393 422 _avStreamPtr->time_base); 394 423 if (codecPtr->coded_frame->key_frame) { 395 pkt.flags |= PKT_FLAG_KEY;424 pkt.flags |= AV_PKT_FLAG_KEY; 396 425 } 397 426 pkt.stream_index = _avStreamPtr->index; -
branches/blt4/packages/vizservers/nanovis/config.h
r1431 r2742 45 45 * runtime if mesh decimation is required] 46 46 */ 47 #define ISO_TEST 147 #define ISO_TEST 0 48 48 49 49 /* -
branches/blt4/packages/vizservers/nanovis/nanovis.cpp
r2409 r2742 754 754 755 755 if(lastError) { 756 const char *listing = cgGetLastListing(g_context);757 756 TRACE("\n---------------------------------------------------\n"); 758 757 TRACE("%s\n\n", cgGetErrorString(lastError)); 759 TRACE("%s\n", listing);758 TRACE("%s\n", cgGetLastListing(g_context)); 760 759 TRACE("-----------------------------------------------------\n"); 761 760 TRACE("Cg error, exiting...\n"); … … 2249 2248 char *newPath; 2250 2249 struct timeval tv; 2251 int n, i;2252 2250 newPath = NULL; 2253 2251 path = NULL; -
branches/blt4/packages/vizservers/nanovis/nvconf.h.in
r2681 r2742 10 10 #undef HAVE_ARPA_INET_H 11 11 12 /* Define to 1 if you have the `avcodec_decode_video' function. */ 13 #undef HAVE_AVCODEC_DECODE_VIDEO 14 15 /* Define to 1 if you have the `avcodec_decode_video2' function. */ 16 #undef HAVE_AVCODEC_DECODE_VIDEO2 17 12 18 /* Define to 1 if you have the `avformat_alloc_context' function. */ 13 19 #undef HAVE_AVFORMAT_ALLOC_CONTEXT 14 20 21 /* Define to 1 if you have the `avformat_open_input' function. */ 22 #undef HAVE_AVFORMAT_OPEN_INPUT 23 24 /* Define to 1 if you have the `avformat_write_header' function. */ 25 #undef HAVE_AVFORMAT_WRITE_HEADER 26 27 /* Define to 1 if you have the `avio_close' function. */ 28 #undef HAVE_AVIO_CLOSE 29 30 /* Define to 1 if you have the `avio_open' function. */ 31 #undef HAVE_AVIO_OPEN 32 33 /* Define if AVMEDIA_TYPE_VIDEO enum exists. */ 34 #undef HAVE_AVMEDIA_TYPE_VIDEO 35 36 /* Define to 1 if you have the `av_alloc_format_context' function. */ 37 #undef HAVE_AV_ALLOC_FORMAT_CONTEXT 38 39 /* Define to 1 if you have the `av_dump_format' function. */ 40 #undef HAVE_AV_DUMP_FORMAT 41 42 /* Define to 1 if you have the `av_guess_format' function. */ 43 #undef HAVE_AV_GUESS_FORMAT 44 45 /* Define to 1 if you have the `av_open_input_file' function. */ 46 #undef HAVE_AV_OPEN_INPUT_FILE 47 48 /* Define to 1 if you have the `av_set_parameters' function. */ 49 #undef HAVE_AV_SET_PARAMETERS 50 51 /* Define to 1 if you have the `av_write_header' function. */ 52 #undef HAVE_AV_WRITE_HEADER 53 15 54 /* Define to 1 if you have the <Cg/cgGL.h> header file. */ 16 55 #undef HAVE_CG_CGGL_H 17 56 57 /* Define to 1 if you have the `dump_format' function. */ 58 #undef HAVE_DUMP_FORMAT 59 18 60 /* Define to 1 if you have the <dx/dx.h> header file. */ 19 61 #undef HAVE_DX_DX_H … … 28 70 #undef HAVE_FFMPEG_AVUTIL_H 29 71 72 /* Define to 1 if you have the `guess_format' function. */ 73 #undef HAVE_GUESS_FORMAT 74 30 75 /* Define to 1 if you have the `img_convert' function. */ 31 76 #undef HAVE_IMG_CONVERT … … 55 100 #undef HAVE_LIBHIGHGUI 56 101 102 /* Define to 1 if you have the `swscale' library (-lswscale). */ 103 #undef HAVE_LIBSWSCALE 104 57 105 /* Define to 1 if you have the <memory.h> header file. */ 58 106 #undef HAVE_MEMORY_H … … 88 136 #undef HAVE_STRING_H 89 137 138 /* Define to 1 if you have the `sws_scale' function. */ 139 #undef HAVE_SWS_SCALE 140 90 141 /* Define to 1 if you have the <sys/socket.h> header file. */ 91 142 #undef HAVE_SYS_SOCKET_H … … 102 153 /* Define to 1 if you have the <unistd.h> header file. */ 103 154 #undef HAVE_UNISTD_H 155 156 /* Define to 1 if you have the `url_fclose' function. */ 157 #undef HAVE_URL_FCLOSE 158 159 /* Define to 1 if you have the `url_fopen' function. */ 160 #undef HAVE_URL_FOPEN 104 161 105 162 /* Define to 1 if you have the <vtkSmartPointer.h> header file. */ -
branches/blt4/packages/vizservers/vtkvis/RpVtkRenderer.cpp
r2681 r2742 1100 1100 double range[2], 1101 1101 int width, int height, 1102 bool opaque, 1102 1103 int numLabels, 1103 1104 vtkUnsignedCharArray *imgData) … … 1110 1111 NULL, 1111 1112 DataSet::POINT_DATA, 1112 title, range, width, height, numLabels, imgData);1113 title, range, width, height, opaque, numLabels, imgData); 1113 1114 } else { 1114 1115 dataSet = _dataSets.begin()->second; … … 1126 1127 dataSet->getActiveScalarsName(), 1127 1128 dataSet->getActiveScalarsType(), 1128 title, range, width, height, numLabels, imgData);1129 title, range, width, height, opaque, numLabels, imgData); 1129 1130 } else { 1130 1131 return renderColorMap(id, dataSetID, legendType, 1131 1132 dataSet->getActiveVectorsName(), 1132 1133 dataSet->getActiveVectorsType(), 1133 title, range, width, height, numLabels, imgData);1134 title, range, width, height, opaque, numLabels, imgData); 1134 1135 } 1135 1136 } … … 1166 1167 double range[2], 1167 1168 int width, int height, 1169 bool opaque, 1168 1170 int numLabels, 1169 1171 vtkUnsignedCharArray *imgData) … … 1176 1178 NULL, 1177 1179 DataSet::POINT_DATA, 1178 title, range, width, height, numLabels, imgData);1180 title, range, width, height, opaque, numLabels, imgData); 1179 1181 } else { 1180 1182 dataSet = _dataSets.begin()->second; … … 1196 1198 fieldName, 1197 1199 attrType, 1198 title, range, width, height, numLabels, imgData);1200 title, range, width, height, opaque, numLabels, imgData); 1199 1201 } 1200 1202 … … 1229 1231 double range[2], 1230 1232 int width, int height, 1233 bool opaque, 1231 1234 int numLabels, 1232 1235 vtkUnsignedCharArray *imgData) … … 1259 1262 if (_scalarBarActor == NULL) { 1260 1263 _scalarBarActor = vtkSmartPointer<vtkScalarBarActor>::New(); 1264 _legendRenderer->AddViewProp(_scalarBarActor); 1265 } 1266 1267 if (opaque) { 1268 _scalarBarActor->UseOpacityOff(); 1269 } else { 1261 1270 _scalarBarActor->UseOpacityOn(); 1262 _legendRenderer->AddViewProp(_scalarBarActor);1263 1271 } 1264 1272 -
branches/blt4/packages/vizservers/vtkvis/RpVtkRenderer.h
r2681 r2742 269 269 double range[2], 270 270 int width, int height, 271 bool opaque, 271 272 int numLabels, 272 273 vtkUnsignedCharArray *imgData); … … 279 280 double range[2], 280 281 int width, int height, 282 bool opaque, 281 283 int numLabels, 282 284 vtkUnsignedCharArray *imgData); … … 288 290 double range[2], 289 291 int width, int height, 292 bool opaque, 290 293 int numLabels, 291 294 vtkUnsignedCharArray *imgData); -
branches/blt4/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp
r2681 r2742 3075 3075 const char *dataSetName = Tcl_GetString(objv[8]); 3076 3076 if (!g_renderer->renderColorMap(colorMapName, dataSetName, legendType, fieldName, title, 3077 range, width, height, numLabels, imgData)) {3077 range, width, height, true, numLabels, imgData)) { 3078 3078 Tcl_AppendResult(interp, "Color map \"", 3079 3079 colorMapName, "\" or dataset \"", … … 3083 3083 } else { 3084 3084 if (!g_renderer->renderColorMap(colorMapName, "all", legendType, fieldName, title, 3085 range, width, height, numLabels, imgData)) {3085 range, width, height, true, numLabels, imgData)) { 3086 3086 Tcl_AppendResult(interp, "Color map \"", 3087 3087 colorMapName, "\" was not found", (char*)NULL); -
branches/blt4/src/core/config.h.in
r2705 r2742 13 13 #undef HAVE_ASSERT_H 14 14 15 /* Define to 1 if you have the `avcodec_decode_video' function. */ 16 #undef HAVE_AVCODEC_DECODE_VIDEO 17 18 /* Define to 1 if you have the `avcodec_decode_video2' function. */ 19 #undef HAVE_AVCODEC_DECODE_VIDEO2 20 21 /* Define to 1 if you have the `avformat_open_input' function. */ 22 #undef HAVE_AVFORMAT_OPEN_INPUT 23 24 /* Define to 1 if you have the `avio_close' function. */ 25 #undef HAVE_AVIO_CLOSE 26 27 /* Define if AVMEDIA_TYPE_VIDEO enum exists. */ 28 #undef HAVE_AVMEDIA_TYPE_VIDEO 29 30 /* Define to 1 if you have the `av_open_input_file' function. */ 31 #undef HAVE_AV_OPEN_INPUT_FILE 32 15 33 /* Define to 1 if you have the <cctype> header file. */ 16 34 #undef HAVE_CCTYPE … … 46 64 #undef HAVE_FFMPEG_AVUTIL_H 47 65 48 /* Define to 1 if you have the <ffmpeg/swscale.h> header file. */49 #undef HAVE_FFMPEG_SWSCALE_H50 51 66 /* Define to 1 if you have the <float.h> header file. */ 52 67 #undef HAVE_FLOAT_H … … 67 82 #undef HAVE_ITERATOR 68 83 84 /* Define to 1 if you have the `avcodec' library (-lavcodec). */ 85 #undef HAVE_LIBAVCODEC 86 69 87 /* Define to 1 if you have the <libavcodec/avcodec.h> header file. */ 70 88 #undef HAVE_LIBAVCODEC_AVCODEC_H 71 89 90 /* Define to 1 if you have the `avformat' library (-lavformat). */ 91 #undef HAVE_LIBAVFORMAT 92 72 93 /* Define to 1 if you have the <libavformat/avformat.h> header file. */ 73 94 #undef HAVE_LIBAVFORMAT_AVFORMAT_H 74 95 96 /* Define to 1 if you have the `avutil' library (-lavutil). */ 97 #undef HAVE_LIBAVUTIL 98 75 99 /* Define to 1 if you have the <libavutil/avutil.h> header file. */ 76 100 #undef HAVE_LIBAVUTIL_AVUTIL_H … … 85 109 #undef HAVE_LIBSTDC__ 86 110 87 /* Define to 1 if you have the <libswscale/swscale.h> header file. */88 #undef HAVE_LIBSWSCALE _SWSCALE_H111 /* Define to 1 if you have the `swscale' library (-lswscale). */ 112 #undef HAVE_LIBSWSCALE 89 113 90 114 /* Define to 1 if you have the <limits.h> header file. */ … … 133 157 #undef HAVE_STRING_H 134 158 159 /* Define to 1 if you have the `sws_getCachedContext' function. */ 160 #undef HAVE_SWS_GETCACHEDCONTEXT 161 135 162 /* Define to 1 if you have the `sws_scale' function. */ 136 163 #undef HAVE_SWS_SCALE … … 150 177 /* Define to 1 if you have the <unistd.h> header file. */ 151 178 #undef HAVE_UNISTD_H 179 180 /* Define to 1 if you have the `url_close' function. */ 181 #undef HAVE_URL_CLOSE 152 182 153 183 /* Define to 1 if you have the <vector> header file. */ -
branches/blt4/src/objects/RpVideo.c
r2713 r2742 55 55 #include "RpVideo.h" 56 56 57 #if LIBAVUTIL_VERSION_MAJOR < 5157 #ifndef HAVE_AVMEDIA_TYPE_VIDEO 58 58 #define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO 59 #endif /* HAVE_AVMEDIA_TYPE_VIDEO */ 60 61 #ifndef AV_PKT_FLAG_KEY 59 62 #define AV_PKT_FLAG_KEY PKT_FLAG_KEY 60 #endif /* LIBAVUTIL_VERSION_MAJOR */ 61 63 #endif 64 65 #ifndef HAVE_AVIO_CLOSE 66 #define avio_close url_fclose 67 #endif 62 68 63 69 /* … … 341 347 * Open the video stream from that file. 342 348 */ 349 #ifdef HAVE_AVFORMAT_OPEN_INPUT 350 if (avformat_open_input(&vidPtr->pFormatCtx, vidPtr->fileName, NULL, 351 NULL) != 0) { 352 return -3; 353 } 354 #else 343 355 if (av_open_input_file(&vidPtr->pFormatCtx, vidPtr->fileName, 344 356 NULL, 0, NULL) != 0) { 345 // Tcl_AppendResult(interp, "couldn't open file \"",346 // fileName, "\"", (char*)NULL);347 // return TCL_ERROR;348 349 // couldn't open file350 357 return -3; 351 358 } 359 #endif 352 360 if (av_find_stream_info(vidPtr->pFormatCtx) < 0) { 353 361 // Tcl_AppendResult(interp, "couldn't find streams in file \"", … … 711 719 global_video_pkt_pts = packet.pts; 712 720 713 #ifdef FFMPEG_AVCODEC_H 721 #ifdef HAVE_AVCODEC_DECODE_VIDEO2 722 // new avcodec decode video function 723 avcodec_decode_video2(vcodecCtx, vidPtr->pFrameYUV, 724 &frameFinished, &packet); 725 #else 714 726 // old avcodec decode video function 715 727 avcodec_decode_video(vcodecCtx, vidPtr->pFrameYUV, 716 728 &frameFinished, packet.data, packet.size); 717 #else718 // new avcodec decode video function719 avcodec_decode_video2(vcodecCtx, vidPtr->pFrameYUV,720 &frameFinished, &packet);721 729 #endif 722 723 730 if (packet.dts == AV_NOPTS_VALUE 724 731 && vidPtr->pFrameYUV->opaque … … 1668 1675 1669 1676 if (vidPtr->outFormatCtx->pb) { 1670 url_fclose(vidPtr->outFormatCtx->pb);1677 avio_close(vidPtr->outFormatCtx->pb); 1671 1678 } 1672 1679
Note: See TracChangeset
for help on using the changeset viewer.