- Timestamp:
- Dec 1, 2008 12:50:26 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/nanovisviewer.tcl
r1248 r1249 862 862 set outbuf_ "" 863 863 864 $_dispatcher event -idle !legend 864 #_fixLegend 865 #$_dispatcher event -idle !legend 865 866 } 866 867 … … 926 927 # "_rebuild", "add", etc. 927 928 # 928 itcl::body Rappture::NanovisViewer::_ReceiveLegend { ivolvmin vmax size } {929 itcl::body Rappture::NanovisViewer::_ReceiveLegend { tf vmin vmax size } { 929 930 if { ![isconnected] } { 930 931 return … … 937 938 set w [winfo width $c] 938 939 set h [winfo height $c] 939 foreach { dataobj comp } $_id2obj($ivol) break940 #foreach { dataobj comp } $_id2obj($ivol) break 940 941 set lx 10 941 942 set ly [expr {$h - 1}] … … 952 953 } 953 954 # Display the markers used by the active transfer function. 954 set tf $activeTf_955 #set tf $activeTf_ 955 956 956 957 array set limits [GetLimits $tf] -
trunk/packages/vizservers/nanovis/nanovis.cpp
r1248 r1249 2167 2167 2168 2168 int status = TCL_OK; 2169 int npass = 0;2170 2169 2171 2170 // 2172 2171 // Read and execute as many commands as we can from stdin... 2173 2172 // 2173 bool isComplete = false; 2174 2174 while (status == TCL_OK) { 2175 2175 // … … 2190 2190 char ch; 2191 2191 if (c <= 0) { 2192 if (npass == 0) { 2193 DoExit(0); 2194 } else { 2192 if (errno == EWOULDBLOCK) { 2195 2193 break; 2196 } 2194 } 2195 DoExit(0); 2197 2196 } 2198 2197 ch = (char)c; 2199 2198 Tcl_DStringAppend(&cmdbuffer, &ch, 1); 2200 if (ch=='\n' && Tcl_CommandComplete(Tcl_DStringValue(&cmdbuffer))) { 2201 break; 2199 if (ch == '\n') { 2200 isComplete = Tcl_CommandComplete(Tcl_DStringValue(&cmdbuffer)); 2201 if (isComplete) { 2202 break; 2203 } 2202 2204 } 2203 2205 } … … 2207 2209 } 2208 2210 2209 // back to original flags during command evaluation... 2210 fcntl(0, F_SETFL, flags & ~O_NONBLOCK); 2211 status = ExecuteCommand(interp, &cmdbuffer); 2212 // non-blocking for next read -- we might not get anything 2213 fcntl(0, F_SETFL, flags | O_NONBLOCK); 2214 npass++; 2211 if (isComplete) { 2212 // back to original flags during command evaluation... 2213 fcntl(0, F_SETFL, flags & ~O_NONBLOCK); 2214 status = ExecuteCommand(interp, &cmdbuffer); 2215 // non-blocking for next read -- we might not get anything 2216 fcntl(0, F_SETFL, flags | O_NONBLOCK); 2217 isComplete = false; 2218 } 2215 2219 } 2216 2220 fcntl(0, F_SETFL, flags);
Note: See TracChangeset
for help on using the changeset viewer.