Changeset 2692 for branches/blt4
- Timestamp:
- Nov 17, 2011, 2:11:25 PM (13 years ago)
- Location:
- branches/blt4
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blt4/Makefile.in
r2413 r2692 45 45 done 46 46 test: 47 #$(MAKE) -C test all47 $(MAKE) -C test all 48 48 49 49 install: … … 53 53 54 54 clean: 55 $(RM) config.status config.log *~56 55 for i in $(TARGETS) ; do \ 57 56 $(MAKE) -C $$i clean || exit 1 ;\ -
branches/blt4/gui/scripts/molvisviewer.tcl
r2690 r2692 110 110 set _getimage $value 111 111 } 112 private method WaitFor Image {} {112 private method WaitForResponse {} { 113 113 tkwait variable [itcl::scope _getimage] 114 114 return $_getimage … … 120 120 protected method SendCmd { string } 121 121 protected method Unmap {} 122 protected method Update { args }123 122 protected method Vmouse {option b m x y} 124 123 protected method Vmouse2 {option b m x y} … … 137 136 # do nothing 138 137 } 138 139 private method UpdateState { args } 140 139 141 public method snap { w h } 140 142 private method Opacity {option} … … 172 174 $_dispatcher dispatch $this !resize "[itcl::code $this DoResize]; list" 173 175 174 # Update event176 # Update state event 175 177 $_dispatcher register !update 176 178 $_dispatcher dispatch $this !update "[itcl::code $this DoUpdate]; list" … … 571 573 set inner [$popup component inner] 572 574 label $inner.summary -text "" -anchor w 573 pack $inner.summary -side top574 575 radiobutton $inner.pdb \ 575 576 -text "PDB Protein Data Bank Format File" \ … … 577 578 -font "Arial 10 " \ 578 579 -value pdb 579 pack $inner.pdb -anchor w580 580 Rappture::Tooltip::for $inner.pdb \ 581 581 "Save as PDB Protein Data Bank format file." … … 586 586 Rappture::Tooltip::for $inner.image \ 587 587 "Save as image." 588 pack $inner.image -anchor w 589 button $inner.go -text [Rappture::filexfer::label download] \ 590 -command [lindex $args 0] 591 pack $inner.go -side bottom -pady 4 588 set f [frame $inner.frame] 589 button $f.ok -text "Save" \ 590 -highlightthickness 0 -pady 3 -padx 3 \ 591 -command [lindex $args 0] \ 592 -compound left \ 593 -image [Rappture::icon download] 594 button $f.cancel -text "Cancel" \ 595 -highlightthickness 0 -pady 3 -padx 3 \ 596 -command [list $popup deactivate] \ 597 -compound left \ 598 -image [Rappture::icon cancel] 599 blt::table $f \ 600 0,0 $f.ok \ 601 0,1 $f.cancel 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 592 606 $inner.pdb select 593 607 } else { … … 619 633 [itcl::code $this SetWaitVariable 0] 620 634 set inner [$popup component inner] 635 # Add image controls to the ballon popup 621 636 AddImageControls $inner [lindex $args 0] 622 637 } else { … … 628 643 SetWaitVariable 0 629 644 $popup activate $widget left 630 set bool [WaitFor Image]645 set bool [WaitForResponse] 631 646 $popup deactivate 632 647 if { $bool } { … … 750 765 set data [ReceiveBytes $size] 751 766 #debug "success: reading $size bytes from proxy\n" 752 if { $cacheid == "print"} {767 if { [string match "print*" $cacheid] } { 753 768 # $frame is the token that we sent to the proxy. 754 set _hardcopy($this-$frame) $data 769 set _hardcopy($this-$cacheid) $data 770 puts stderr "setting _hardcopy($this-$cacheid)" 755 771 } else { 756 772 set _imagecache($tag) $data … … 781 797 -font "Arial 9" 782 798 783 label $inner.pict -image $_settings($this-modelimg) 784 785 radiobutton $inner.bstick -text "balls and sticks" \ 786 -command [itcl::code $this Representation ballnstick] \ 787 -variable Rappture::MolvisViewer::_settings($this-model) \ 788 -value ballnstick -font "Arial 9" -pady 0 789 Rappture::Tooltip::for $inner.bstick \ 790 "Display atoms (balls) and connections (sticks) " 791 792 radiobutton $inner.spheres -text "spheres" \ 793 -command [itcl::code $this Representation spheres] \ 794 -variable Rappture::MolvisViewer::_settings($this-model) \ 795 -value spheres -font "Arial 9" -pady 0 796 Rappture::Tooltip::for $inner.spheres \ 797 "Display atoms as spheres. Do not display bonds." 798 799 radiobutton $inner.sticks -text "sticks" \ 800 -command [itcl::code $this Representation sticks] \ 801 -variable Rappture::MolvisViewer::_settings($this-model) \ 802 -value sticks -font "Arial 9" -pady 0 803 Rappture::Tooltip::for $inner.sticks \ 804 "Display bonds as sticks. Do not display atoms." 805 806 radiobutton $inner.lines -text "lines" \ 807 -command [itcl::code $this Representation lines] \ 808 -variable [itcl::scope _settings($this-model)] \ 809 -value lines -font "Arial 9" -pady 0 810 Rappture::Tooltip::for $inner.lines \ 811 "Display bonds as lines. Do not display atoms." 812 813 radiobutton $inner.cartoon -text "cartoon" \ 814 -command [itcl::code $this Representation cartoon] \ 815 -variable [itcl::scope _settings($this-model)] \ 816 -value cartoon -font "Arial 9" -pady 0 817 Rappture::Tooltip::for $inner.cartoon \ 818 "Display cartoon representation of bonds (sticks)." 799 itk_component add representation { 800 Rappture::Combobox $inner.rep -width 20 -editable no 801 } 802 $inner.rep choices insert end \ 803 "ballnstick" "ball and stick" \ 804 "spheres" "spheres" \ 805 "sticks" "sticks" \ 806 "lines" "lines" \ 807 "cartoon" "cartoon" 808 809 bind $inner.rep <<Value>> [itcl::code $this Representation] 810 $inner.rep value "ball and stick" 819 811 820 812 scale $inner.spherescale -width 10 -font "Arial 9" \ … … 871 863 label $inner.spacer 872 864 blt::table $inner \ 873 0,0 $inner.drawinglabel -anchor w -columnspan 4 \ 874 1,1 $inner.pict -anchor w -rowspan 5 \ 875 1,2 $inner.bstick -anchor w -columnspan 2 \ 876 2,2 $inner.spheres -anchor w -columnspan 2 \ 877 3,2 $inner.sticks -anchor w -columnspan 2 \ 878 4,2 $inner.lines -anchor w -columnspan 2 \ 879 5,2 $inner.cartoon -anchor w -columnspan 2 \ 880 6,0 $inner.labels -anchor w -columnspan 4 -pady {1 0} \ 881 7,0 $inner.rock -anchor w -columnspan 4 -pady {1 0} \ 882 8,0 $inner.ortho -anchor w -columnspan 4 -pady {1 0} \ 883 9,0 $inner.cartoontrace -anchor w -columnspan 4 -pady {1 0} \ 884 10,0 $inner.cell -anchor w -columnspan 4 -pady {1 0} \ 885 11,1 $inner.spherescale -fill x -columnspan 4 -pady {1 0} \ 886 12,1 $inner.stickradius -fill x -columnspan 4 -pady {1 0} \ 887 888 blt::table configure $inner c0 -resize expand -width 2 889 blt::table configure $inner c1 c2 -resize none 890 blt::table configure $inner c3 -resize expand 865 0,0 $inner.labels -anchor w -pady {1 0} \ 866 1,0 $inner.rock -anchor w -pady {1 0} \ 867 2,0 $inner.ortho -anchor w -pady {1 0} \ 868 3,0 $inner.cartoontrace -anchor w -pady {1 0} \ 869 4,0 $inner.cell -anchor w -pady {1 0} \ 870 5,0 $inner.rep_l -anchor w -pady { 2 0 } \ 871 6,0 $inner.rep -anchor w \ 872 7,0 $inner.spherescale -fill x -pady {3 0} \ 873 8,0 $inner.stickradius -fill x -pady {1 0} \ 874 891 875 blt::table configure $inner r* -resize none 892 blt::table configure $inner r1 3-resize expand876 blt::table configure $inner r10 -resize expand 893 877 } 894 878 … … 1116 1100 } else { 1117 1101 set _state(client) $state 1118 Update 1102 UpdateState 1119 1103 set flush 0 1120 1104 } … … 1216 1200 itcl::body Rappture::MolvisViewer::DoRotate {} { 1217 1201 SendCmd "rotate $_view(a) $_view(b) $_view(c)" 1202 array unset _imagecache 1218 1203 set _rotatePending 0 1219 1204 } … … 1230 1215 1231 1216 itcl::body Rappture::MolvisViewer::DoUpdate { } { 1232 set scale $_settings($this-spherescale) 1233 set radius $_settings($this-stickradius) 1234 set overridescale [expr $scale * 0.8] 1235 set overrideradius [expr $radius * 0.8] 1236 SendCmd "spherescale -model all $overridescale" 1237 SendCmd "stickradius -model all $overrideradius" 1217 array unset _imagecache 1238 1218 set models [array names _mlist] 1239 foreach model $models { 1240 if { [info exists _active($model)] } { 1241 SendCmd "spherescale -model $model $scale" 1242 SendCmd "stickradius -model $model $radius" 1243 } 1244 } 1219 SphereScale $_settings($this-spherescale) $models 1220 StickRadius $_settings($this-stickradius) $models 1245 1221 set _updatePending 0 1246 1222 } … … 1267 1243 set _view(x) [expr $_view(x) + $dx] 1268 1244 set _view(y) [expr $_view(y) + $dy] 1245 array unset _imagecache 1269 1246 SendCmd "pan $dx $dy" 1270 1247 return … … 1281 1258 set _view(x) [expr $_view(x) + $dx] 1282 1259 set _view(y) [expr $_view(y) + $dy] 1260 array unset _imagecache 1283 1261 SendCmd "pan $dx $dy" 1284 1262 } … … 1313 1291 } 1314 1292 } 1315 } 1316 1317 itcl::body Rappture::MolvisViewer::Update { args } { 1293 array unset _imagecache 1294 } 1295 1296 itcl::body Rappture::MolvisViewer::UpdateState { args } { 1318 1297 set tag "$_state(client),$_rocker(client)" 1319 1298 if { $_image(id) != "$tag" } { … … 1354 1333 SendCmd "rock $_rocker(client)" 1355 1334 } 1356 Update 1335 UpdateState 1357 1336 } 1358 1337 if { $_rocker(on) && $option != "pause" } { … … 1577 1556 set option $_settings($this-model) 1578 1557 } 1558 array unset _imagecache 1579 1559 if { $option == "sticks" } { 1580 1560 set _settings($this-modelimg) [Rappture::icon lines] … … 1590 1570 set _settings($this-model) $option 1591 1571 set _mrep $option 1592 1593 1572 1594 1573 foreach model [array names _mlist] { … … 1616 1595 # ---------------------------------------------------------------------- 1617 1596 itcl::body Rappture::MolvisViewer::OrthoProjection {option} { 1597 array unset _imagecache 1618 1598 switch -- $option { 1619 1599 "orthoscopic" { … … 1677 1657 return 1678 1658 } 1659 array unset _imagecache 1679 1660 if { $cell } { 1680 1661 Rappture::Tooltip::for $itk_component(ortho) \ … … 1748 1729 set controls $_downloadPopup(image_controls) 1749 1730 set combo $controls.size 1750 puts stderr combo=$combo1751 1731 set size [$combo translate [$combo value]] 1752 1732 switch -- $size { … … 1816 1796 if { $_hardcopy($this-$token) != "" } { 1817 1797 set combo $controls.format 1818 set type[$combo translate [$combo value]]1819 switch -- $ type{1798 set fmt [$combo translate [$combo value]] 1799 switch -- $fmt { 1820 1800 "jpg" { 1821 1801 set img [image create picture -data $_hardcopy($this-$token)] … … 1920 1900 1921 1901 itcl::body Rappture::MolvisViewer::Opacity { option } { 1902 array unset _imagecache 1922 1903 if { $option == "update" } { 1923 1904 set opacity $_settings($this-opacity) … … 1960 1941 error "bad option \"$option\"" 1961 1942 } 1943 # Clear the image cache 1944 array unset _imagecache 1962 1945 set _settings($this-showlabels) $showlabels 1963 1946 if { $models == "all" } { … … 1983 1966 # ---------------------------------------------------------------------- 1984 1967 itcl::body Rappture::MolvisViewer::CartoonTrace {option {models "all"}} { 1968 array unset _imagecache 1985 1969 set trace $_settings($this-cartoontrace) 1986 1970 if { $option == "update" } { … … 2011 1995 set img $_image(plot) 2012 1996 set res "[image width $img]x[image height $img]" 2013 puts stderr combo=$inner.size2014 1997 Rappture::Combobox $inner.size -width 30 -editable no 2015 1998 $inner.size choices insert end \ … … 2032 2015 "gif" "GIF (GIF Graphics Interchange Format)" 2033 2016 2034 button $inner.go -text [Rappture::filexfer::label download] \ 2035 -command [itcl::code $this SetWaitVariable 1] 2017 set f [frame $inner.frame] 2018 button $f.ok -text "Save" \ 2019 -highlightthickness 0 -pady 3 -padx 3 \ 2020 -command [itcl::code $this SetWaitVariable 1] \ 2021 -compound left \ 2022 -image [Rappture::icon download 2023 ] 2024 button $f.cancel -text "Cancel" \ 2025 -highlightthickness 0 -pady 3 -padx 3 \ 2026 -command [itcl::code $this SetWaitVariable 0] \ 2027 -compound left \ 2028 -image [Rappture::icon cancel] 2029 blt::table $f \ 2030 0,0 $f.ok \ 2031 0,1 $f.cancel 2036 2032 2037 2033 blt::table $inner \ … … 2042 2038 2,0 $inner.bgcolor_l -anchor e \ 2043 2039 2,1 $inner.bgcolor -anchor w -fill x \ 2044 6,0 $inner.go -cspan 2 -pady 5 2040 3,0 $f -cspan 2 -fill x 2041 blt::table configure $inner r0 r1 r2 r3 -pady { 4 0 } 2042 blt::table configure $inner r3 -pady { 4 4 } 2045 2043 $inner.bgcolor value "Black" 2046 2044 $inner.size value "Draft (400x400)" -
branches/blt4/gui/scripts/xyprint.tcl
r2315 r2692 89 89 private method GetAxisType { axis } 90 90 private method restore { toolName plotName data } 91 92 # Same dialog may be used for different graphs 91 93 private common _settings 92 94 private common _fonts … … 378 380 set _settings($this-layout-width) [Pixels2Inches [$_clone cget -width]] 379 381 set _settings($this-layout-height) [Pixels2Inches [$_clone cget -height]] 380 set _fonts(legend) [font create legend \ 381 -family helvetica -size 10 -weight normal] 382 update 382 383 set _settings($this-legend-fontfamily) helvetica 384 set _settings($this-legend-fontsize) 10 385 set _settings($this-legend-fontweight) normal 386 set _settings($this-legend-fontslant) roman 387 set font "helvetica 10 normal roman" 383 388 $_clone legend configure \ 384 389 -position right \ 385 -font $ _fonts(legend)\390 -font $font \ 386 391 -hide yes -borderwidth 0 -background white -relief solid \ 387 392 -anchor nw -activeborderwidth 0 388 393 # 394 set _settings($this-axis-ticks-fontfamily) helvetica 395 set _settings($this-axis-ticks-fontsize) 10 396 set _settings($this-axis-ticks-fontweight) normal 397 set _settings($this-axis-ticks-fontslant) roman 398 set _settings($this-axis-title-fontfamily) helvetica 399 set _settings($this-axis-title-fontsize) 10 400 set _settings($this-axis-title-fontweight) normal 401 set _settings($this-axis-title-fontslant) roman 389 402 foreach axis [$_clone axis names] { 390 403 if { $axis == "z" } { … … 394 407 continue 395 408 } 396 set _fonts($axis-ticks) [font create $axis-ticks \ 397 -family helvetica -size 10 \ 398 -weight normal -slant roman] 399 set _fonts($axis-title) [font create $axis-title \ 400 -family helvetica -size 10 \ 401 -weight normal -slant roman] 402 update 409 set _settings($this-$axis-ticks-fontfamily) helvetica 410 set _settings($this-$axis-ticks-fontsize) 10 411 set _settings($this-$axis-ticks-fontweight) normal 412 set _settings($this-$axis-ticks-fontslant) roman 413 set _settings($this-$axis-title-fontfamily) helvetica 414 set _settings($this-$axis-title-fontsize) 10 415 set _settings($this-$axis-title-fontweight) normal 416 set _settings($this-$axis-title-fontslant) roman 417 set tickfont "helvetica 10 normal roman" 418 set titlefont "helvetica 10 normal roman" 403 419 $_clone axis configure $axis -ticklength 5 \ 404 420 -majorticks {} -minorticks {} … … 432 448 433 449 itcl::body Rappture::XyPrint::SetOption { opt } { 434 set new $_settings($this -graph$opt)450 set new $_settings($this$opt) 435 451 set old [$_clone cget $opt] 436 452 set code [catch [list $_clone configure $opt $new] err] … … 439 455 global errorInfo 440 456 puts stderr "$err: $errorInfo" 441 set _settings($this -graph$opt) $old457 set _settings($this$opt) $old 442 458 $_clone configure $opt $old 443 459 } … … 476 492 set h [Inches2Pixels $_settings($this-layout-height) 3.4] 477 493 set pixelsPerInch [winfo pixels . 1i] 478 set sx [expr 2.5*$pixelsPerInch/$w] 479 set sy [expr 2.0*$pixelsPerInch/$h] 494 set cw [winfo width $itk_component(preview)] 495 set ch [winfo height $itk_component(preview)] 496 set rw [expr 2.5*$pixelsPerInch] 497 set rh [expr 2.5*$pixelsPerInch] 498 set maxwidth $rw 499 set maxheight $rh 500 if { $maxwidth > $cw } { 501 set maxwidth $cw 502 } 503 if { $maxheight > $ch } { 504 set maxheight $ch 505 } 506 set sx [expr double($maxwidth)/$w] 507 set sy [expr double($maxheight)/$h] 480 508 set s [expr min($sx,$sy)] 481 509 $_clone snap $img -width $w -height $h 482 510 483 if 0 {484 if { ![winfo exists .labeltest] } {485 toplevel .labeltest -bg red486 label .labeltest.label -image $img487 pack .labeltest.label -fill both488 }489 }490 511 set pw [expr int(round($s * $w))] 491 512 set ph [expr int(round($s * $h))] -
branches/blt4/gui/scripts/xyresult.tcl
r2315 r2692 110 110 private variable _limits ;# axis limits: x-min, x-max, etc. 111 111 private variable _autoColorI 0 ;# index for next "-color auto" 112 113 112 private variable _hilite ;# info for element currently highlighted 114 113 private variable _axis ;# info for axis manipulations … … 657 656 set color $_dataobj2color($dataobj) 658 657 } else { 659 set color black 658 set color [$dataobj hints color] 659 if {"" == $color} { 660 set color black 661 } 660 662 } 661 663 if {[info exists _dataobj2width($dataobj)]} { … … 697 699 foreach elem $label2elem($label) { 698 700 set dataobj $_elem2dataobj($elem) 699 scan [$dataobj hints xmlobj] "::libraryObj%d"suffix701 regexp {^::curve(?:Value)?([0-9]+)$} $dataobj match suffix 700 702 incr suffix 701 703 set elabel [format "%s \#%d" $label $suffix] … … 875 877 876 878 # Some elements are generated dynamically and therefore will 877 # not have a data objobject associated with them.879 # not have a data object associated with them. 878 880 set mapx [$g element cget $elem -mapx] 879 881 set mapy [$g element cget $elem -mapy] … … 1492 1494 # rebuild if needed, so we know about the axes 1493 1495 if 0 { 1494 if {[$_dispatcher ispending !rebuild]} { 1495 $_dispatcher cancel !rebuild 1496 $_dispatcher event -now !rebuild 1497 } 1496 # Don't do this. Given dataobj may be deleted in the rebuild 1497 1498 # rebuild if needed, so we know about the axes 1499 if {[$_dispatcher ispending !rebuild]} { 1500 $_dispatcher cancel !rebuild 1501 $_dispatcher event -now !rebuild 1502 } 1498 1503 } 1499 1504 # what is the x axis? x? x2? x3? ... -
branches/blt4/packages/vizservers/pymolproxy/pymolproxy2.c
r2680 r2692 94 94 static FILE *frecord; 95 95 static int recording = FALSE; 96 static int pymolIsAlive = TRUE; 96 97 97 98 #define WANT_DEBUG 0 … … 723 724 { 724 725 PymolProxy *p = clientData; 725 int i, push, defer, state, size;726 int i, push, defer, bool, size; 726 727 const char *model; 727 728 … … 729 730 model = "all"; 730 731 size = 14; 731 state= TRUE;732 bool = TRUE; 732 733 push = defer = FALSE; 733 734 for(i = 1; i < argc; i++) { … … 744 745 size = atoi(argv[i]); 745 746 } 746 } else if (Tcl_GetBoolean(interp, argv[i], & state) != TCL_OK) {747 } else if (Tcl_GetBoolean(interp, argv[i], &bool) != TCL_OK) { 747 748 return TCL_ERROR; 748 749 } … … 757 758 SendCmd(p, "set label_color,white,%s\nset label_size,%d,%s\n", 758 759 model, size, model); 759 if ( state) {760 if (bool) { 760 761 SendCmd(p, "label %s,\"%%s%%s\" %% (ID,name)\n", model); 761 762 } else { … … 843 844 p->flags |= FORCE_UPDATE; 844 845 } 846 p->cacheId = state; 845 847 846 848 /* Does not invalidate cache? */ … … 984 986 /* Force pymol to update the current scene. */ 985 987 SendCmd(p, "refresh\n"); 986 #ifdef notdef 987 SendCmd(p, "png \"- %d %d %d\"\n", p->frame, p->cacheId, p->rockOffset); 988 #endif 989 SendCmd(p, "png -\n"); 988 /* This is a hack. We're encoding the filename to pass extra information 989 * to the MyPNGWrite routine inside of pymol. Ideally these would be 990 * parameters of a new "molvispng" command that would be passed all the 991 * way through to MyPNGWrite. 992 * 993 * The extra information is contained in the token we get from the 994 * molvisviewer client, the frame number, and rock offset. */ 995 SendCmd(p, "png -:%d:%d:%d\n", p->cacheId, p->frame, p->rockOffset); 990 996 return p->status; 991 997 } … … 1001 1007 /* Force pymol to update the current scene. */ 1002 1008 SendCmd(p, "refresh\n"); 1003 #ifdef notdef 1004 SendCmd(p, "png \"- %d %d %d\",format=1\n", p->frame, p->cacheId, 1009 /* This is a hack. We're encoding the filename to pass extra information 1010 * to the MyPNGWrite routine inside of pymol. Ideally these would be 1011 * parameters of a new "molvispng" command that would be passed all the 1012 * way through to MyPNGWrite. 1013 * 1014 * The extra information is contained in the token we get from the 1015 * molvisviewer client, the frame number, and rock offset. */ 1016 SendCmd(p, "png -:%d:%d:%d,format=1\n", p->cacheId, p->frame, 1005 1017 p->rockOffset); 1006 #endif1007 SendCmd(p, "png -,format=1\n");1008 1018 p->flags &= ~(UPDATE_PENDING|FORCE_UPDATE); 1009 1019 return p->status; … … 1042 1052 SendCmd(p, "bg_color %s\nrefresh\n", bgcolor); 1043 1053 } 1044 SendCmd(p, "ray %d,%d\n", width, height); 1045 #ifdef notdef 1046 SendCmd(p, "png \"- print 0 0\",dpi=300\nbg_color black\n"); 1047 #endif 1048 SendCmd(p, "png -,dpi=300\nbg_color black\n"); 1054 /* This is a hack. We're encoding the filename to pass extra information 1055 * to the MyPNGWrite routine inside of pymol. Ideally these would be 1056 * parameters of a new "molvispng" command that would be passed all the 1057 * way through to MyPNGWrite. 1058 * 1059 * The extra information is contained in the token we get from the 1060 * molvisviewer client, the frame number, and rock offset. 1061 */ 1062 SendCmd(p, "png -:%s:0:0,width=%d,height=%d,ray=1,dpi=300\n", 1063 token, width, height); 1064 SendCmd(p, "bg_color black\n"); 1049 1065 return p->status; 1050 1066 } … … 1891 1907 { 1892 1908 ERROR("pymol (%d) died unexpectedly", stats.pid); 1909 pymolIsAlive = FALSE; 1893 1910 /*DoExit(1);*/ 1894 1911 } … … 1987 2004 exit(-1); 1988 2005 } else { 2006 pymolIsAlive = TRUE; 1989 2007 signal(SIGCHLD, ChildHandler); 1990 2008 } … … 2104 2122 #endif 2105 2123 Tcl_DStringInit(&command); 2106 for (;;) {2124 while (pymolIsAlive) { 2107 2125 tvPtr = NULL; 2108 2126 #if READ_DEBUG 2109 2127 DEBUG("Start I/O set"); 2110 2128 #endif 2111 while ( WaitForNextLine(&p->client, tvPtr)) {2129 while ((pymolIsAlive) && (WaitForNextLine(&p->client, tvPtr))) { 2112 2130 size_t numBytes; 2113 2131 const char *line; … … 2182 2200 #endif 2183 2201 list.headPtr = list.tailPtr = NULL; 2184 for (;;) {2202 while (pymolIsAlive) { 2185 2203 while (WaitForNextLine(bp, NULL)) { 2186 2204 Image *imgPtr; … … 2200 2218 return NULL; 2201 2219 } 2202 if (strncmp(line, "ppm image follows: ", 16) != 0) { 2220 #if WRITE_DEBUG 2221 DEBUG("Writer: line found is %s\n", line); 2222 #endif 2223 if (strncmp(line, "image follows: ", 15) != 0) { 2203 2224 continue; 2204 2225 } 2205 #ifdef notdef2206 2226 if (sscanf(line, "image follows: %d %s %d %d\n", &numBytes, cacheId, 2207 2227 &frameNum, &rockOffset) != 4) { … … 2210 2230 return NULL; 2211 2231 } 2212 #endif2213 if (sscanf(line, "ppm image follows: %d\n", &numBytes) != 1) {2214 ERROR("can't get # bytes from \"%s\"", line);2215 DEBUG("Leaving Writer thread");2216 return NULL;2217 }2218 2232 #if WRITE_DEBUG 2219 2233 DEBUG("found image line \"%.*s\"", numBytes, line); 2220 2234 #endif 2221 strcpy(cacheId, "0"); 2222 frameNum = 0; 2223 rockOffset = 0; 2224 sprintf(header, "nv>image %d %s %d %d\n", numBytes, cacheId, frameNum, 2225 rockOffset); 2235 sprintf(header, "nv>image %d %s %d %d\n", numBytes, cacheId, 2236 frameNum, rockOffset); 2226 2237 hdrLength = strlen(header); 2227 2238 #if WRITE_DEBUG 2228 DEBUG("Queueing image numBytes=%d frameNum=%d, rockOffset=%d size=%d\n", numBytes, frameNum, rockOffset, numBytes + hdrLength);2239 DEBUG("Queueing image numBytes=%d cacheId=%s, frameNum=%d, rockOffset=%d size=%d\n", numBytes, cacheId, frameNum, rockOffset, numBytes + hdrLength); 2229 2240 #endif 2230 2241 imgPtr = NewImage(&list, numBytes + hdrLength); -
branches/blt4/tester/scripts/Makefile.in
r2168 r2692 37 37 38 38 tclIndex: $(FILES) 39 $(TCLSH) $(srcdir)/../../gui/ tclconfig/mkindex.tcl --srcdir $(srcdir) \39 $(TCLSH) $(srcdir)/../../gui/cf/mkindex.tcl --srcdir $(srcdir) \ 40 40 --outfile tclIndex 41 41
Note: See TracChangeset
for help on using the changeset viewer.