Newsgroups: comp.parallel.pvm
From: Jan Nijtmans <nijtmans@nici.kun.nl>
Subject: Re: XPVM under TCL7.5/Tk4.1
Organization: NICI (Nijmegen Institute of Cognition and Informatics)
Date: Mon, 28 Oct 1996 10:14:21 +0100
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <3274796D.78A3@nici.kun.nl>

Christian Wurll wrote:
> I have installed TCL7.5 and TK4.1 on an Pentium-PC under
> Linux (Kernel 2.0).
> Both works well.
> 
> Then i have installed xpvm1.1.1.
> The compiling has procuded no errors, but
> if I want to start xpvm I receive the message:
> 
>         application-specific initialization failed: this isn't a Tk application
> 
> What do I wrong? Can anyone helps me?
> Thanks in advance

You are not doing anything wrong. The problem is that in
Tk 4.1 and later the function Tk_MainWindow() MUST be called
after Tk_Init(). This is because the initialization of the
main window is moved from Tk_Main() to Tk_Init(). See patch
below. In xpmv 1.1.1, this function is called before Tk_Init(),
and then the main window is not initialized yet. That's what
results in your error-message.

Still, there is one more thing. In the code you will find
many times that the "else" keyword is preceded by an
empty line. This is not allowed any more in Tcl7.5 and
later. Remove these empty lines or replace it with a single
backshash.

I already posted these necessary changes to James Arthur Kohl,
but until now he didn't release xpvm 1.1.2 yet. It think it
is high time for that, because both Tk4.1 and Tk4.2 are
already in their final releases.

Well James.... How about releasing xpvm 1.1.2 ???????? It
would finallay enable xpmv to be used with Tk4.1 and Tk4.2...

	Jan Nijtmans
	NICI (Nijmegen Institute of Cognition and Information)
	email: nijtmans@nici.kun.nl
	url:   http://www.cogsci.kun.nl/~nijtmans/

*** src/xpvm.c.orig	Mon Feb 19 12:11:29 1996
--- src/xpvm.c	Mon Feb 19 12:13:03 1996
***************
*** 112,126 ****
  
  	interp = itp;
  
- 	/* Get Main Window */
- 
- 	Top = Tk_MainWindow( interp );
- 
- 	if ( Top == NULL )
- 		return( TCL_ERROR );
- 
- 	Disp = Tk_Display( Top );
- 
  	/* Initialize Program Constants */
  
  	if ( read_args() == TCL_ERROR )
--- 112,117 ----
***************
*** 136,141 ****
--- 127,141 ----
  	if ( tcl_init() == TCL_ERROR )
  		return( TCL_ERROR );
  
+ 	/* Get Main Window */
+ 
+ 	Top = Tk_MainWindow( interp );
+ 
+ 	if ( Top == NULL )
+ 		return( TCL_ERROR );
+ 
+ 	Disp = Tk_Display( Top );
+ 
  	if ( pvm_init() == TCL_ERROR )
  		return( TCL_ERROR );
  
*** src/procs.tcl.orig	Thu Jul 27 16:49:18 1995
--- src/procs.tcl	Tue Jan  9 09:02:25 1996
***************
*** 73,79 ****
  		set prim_help_enter $st_help_enter
  		set prim_help_zoom $st_help_zoom
  	} \
- 
  	elseif { $view == "UT" } \
  	{
  		global ut_xview
--- 73,78 ----
***************
*** 135,141 ****
  
  		setTmpMsg "Help" $st_help_query
  	} \
- 
  	elseif { $action == "query_motion" } \
  	{
  		if { $x >= 0 && $x < $st_cwidth \
--- 134,139 ----
***************
*** 151,163 ****
  
  			st_query_info $id $tindex1 $tindex2 0
  		} \
- 
  		else \
  		{
  			st_query_info -1 -1 -1 0
  		}
  	} \
- 
  	elseif { $action == "query_release" } \
  	{
  		st_query_info -1 -1 -1 0
--- 149,159 ----
***************
*** 182,188 ****
  			set st_timeid $prim_timeid
  			set ut_timeid $alt_timeid
  		} \
- 
  		elseif { $view == "UT" } \
  		{
  			set ut_timeid $prim_timeid
--- 178,183 ----
***************
*** 194,200 ****
  
  		setTmpMsg "Help" $prim_help_enter
  	} \
- 
  	elseif { $action == "enter" } \
  	{
  		if { $prim_timeid != -1 } \
--- 189,194 ----
***************
*** 214,220 ****
  			set st_timeid $prim_timeid
  			set ut_timeid $alt_timeid
  		} \
- 
  		elseif { $view == "UT" } \
  		{
  			set ut_timeid $prim_timeid
--- 208,213 ----
***************
*** 226,232 ****
  
  		setTmpMsg "Help" $prim_help_enter
  	} \
- 
  	elseif { $action == "time" } \
  	{
  		if { $prim_timeid != -1 } \
--- 219,224 ----
***************
*** 234,240 ****
  			$PRIM_C coords $prim_timeid $canvx 0 $canvx $prim_height
  			$PRIM_C raise $prim_timeid
  		} \
- 
  		else \
  		{
  			set prim_timeid [ $PRIM_C create line \
--- 226,231 ----
***************
*** 242,248 ****
  
  			if { $view == "ST" } \
  				{ set st_timeid $prim_timeid } \
- 
  			elseif { $view == "UT" } \
  				{ set ut_timeid $prim_timeid }
  		}
--- 233,238 ----
***************
*** 252,258 ****
  			$ALT_C coords $alt_timeid $canvx 0 $canvx $alt_height
  			$ALT_C raise $alt_timeid
  		} \
- 
  		else \
  		{
  			set alt_timeid [ $ALT_C create line \
--- 242,247 ----
***************
*** 260,266 ****
  
  			if { $view == "ST" } \
  				{ set ut_timeid $alt_timeid } \
- 
  			elseif { $view == "UT" } \
  				{ set st_timeid $alt_timeid }
  		}
--- 249,254 ----
***************
*** 271,277 ****
  		if { $prim_help_enter != [ topMsg ] } \
  			{ setTmpMsg "Help" $prim_help_enter }
  	} \
- 
  	elseif { $action == "leave" } \
  	{
  		if { $prim_timeid != -1 } \
--- 259,264 ----
***************
*** 296,302 ****
  
  		popMsgs
  	} \
- 
  	elseif { $action == "zoom_press" } \
  	{
  		set zoom_x1 $canvx
--- 283,288 ----
***************
*** 310,316 ****
  
  			$PRIM_C lower $zoomid
  		} \
- 
  		else \
  		{
  			set zoomid [ $PRIM_C create rectangle \
--- 296,301 ----
***************
*** 321,327 ****
  
  		setTmpMsg "Help" $prim_help_zoom
  	} \
- 
  	elseif { $action == "zoom_motion" } \
  	{
  		set zoom_x2 $canvx
--- 306,311 ----
***************
*** 331,337 ****
  			set x1 $zoom_x1
  			set x2 $zoom_x2
  		} \
- 
  		else \
  		{
  			set x1 $zoom_x2
--- 315,320 ----
***************
*** 340,346 ****
  
  		$PRIM_C coords $zoomid $x1 0 $x2 $prim_height
  	} \
- 
  	elseif { $action == "zoom_release" } \
  	{
  		$PRIM_C delete $zoomid
--- 323,328 ----
***************
*** 356,362 ****
  				set x1 $zoom_x1
  				set x2 $zoom_x2
  			} \
- 
  			else \
  			{
  				set x1 $zoom_x2
--- 338,343 ----
***************
*** 376,382 ****
  
  					return
  				} \
- 
  				else \
  				{
  					set new_scale 1
--- 357,362 ----
***************
*** 393,399 ****
  
  			if { $view == "ST" } \
  				{ set newx [ expr $x + $st_xview ] } \
- 
  			elseif { $view == "UT" } \
  				{ set newx [ expr $x + $ut_xview ] }
  
--- 373,378 ----
***************
*** 407,413 ****
  
  			setMsg "Zooming Done."
  		} \
- 
  		else \
  		{
  			setMsg "Error - Infinite Zoom"
--- 386,391 ----
***************
*** 415,421 ****
  
  		popMsgs
  	} \
- 
  	elseif { $action == "unzoom" } \
  	{
  		setMsg "Unzooming..."
--- 393,398 ----
***************
*** 426,432 ****
  		{
  			set scale_stack [ lreplace $scale_stack 0 0 ]
  		} \
- 
  		else \
  		{
  			set new_scale [ expr 2 * $scale ]
--- 403,408 ----
***************
*** 453,459 ****
  
  		if { $view == "ST" } \
  			{ set newx [ expr $x + $st_xview ] } \
- 
  		elseif { $view == "UT" } \
  			{ set newx [ expr $x + $ut_xview ] }
  
--- 429,434 ----
***************
*** 469,481 ****
  
  		setMsg "Unzooming Done."
  	} \
- 
  	elseif { $action == "label_enter" } \
  	{
  		if { $st_help_label_query != [ topMsg ] } \
  			{ setTmpMsg "Help" $st_help_label }
  	} \
- 
  	elseif { $action == "label_press" } \
  	{
  		set tindex [ expr ( $lcanvy - $border_space ) / $st_label_ht ]
--- 444,454 ----
***************
*** 505,511 ****
  			place .xpvm.st_label_query -x $lx -y $ly -anchor w
  		}
  	} \
- 
  	elseif { $action == "label_motion" } \
  	{
  		if { $y >= 0 && $y < $st_cheight \
--- 478,483 ----
***************
*** 522,528 ****
  
  				if { $upck == 1 } \
  					{ .xpvm.st_label_query configure -text $str } \
- 
  				else \
  				{
  					label .xpvm.st_label_query -text $str \
--- 494,499 ----
***************
*** 541,547 ****
  
  				place .xpvm.st_label_query -x $lx -y $ly -anchor w
  			} \
- 
  			else \
  			{
  				set upck [ winfo exists .xpvm.st_label_query ]
--- 512,517 ----
***************
*** 550,556 ****
  					{ destroy .xpvm.st_label_query }
  			}
  		} \
- 
  		else \
  		{
  			set upck [ winfo exists .xpvm.st_label_query ]
--- 520,525 ----
***************
*** 561,567 ****
  
  		setTmpMsg Help $st_help_label_query
  	} \
- 
  	elseif { $action == "label_release" } \
  	{
  		set upck [ winfo exists .xpvm.st_label_query ]
--- 530,535 ----
***************
*** 571,577 ****
  
  		setTmpMsg "Help" $st_help_label
  	} \
- 
  	elseif { $action == "label_leave" } \
  	{
  		set upck [ winfo exists .xpvm.st_label_query ]
--- 539,544 ----
***************
*** 578,584 ****
  
  		if { $upck == 0 } \
  			{ popMsgs } \
- 		
  		else \
  			{ setTmpMsg "Help" $st_help_label_query }
  	}
--- 545,550 ----
***************
*** 624,634 ****
  
  		if { $id == $st_highlight_id && $dblclk == "1" } \
  			{ set st_query_keep TRUE } \
- 
  		else \
  			{ set st_query_keep FALSE }
  	} \
- 
  	else \
  	{
  		if { $id != $st_highlight_id } \
--- 590,598 ----
***************
*** 685,691 ****
  	{
  		$ST.canvas itemconfigure $st_highlight_id -width 1
  	} \
- 
  	elseif { $st_highlight_type == "comm" } \
  	{
  		$ST.canvas itemconfigure $st_highlight_id -arrow none -width 1
--- 649,654 ----
***************
*** 714,720 ****
  
  	if { $event == "enter" } \
  		{ set st_query_text_index $x } \
- 
  	elseif { $event == "motion" } \
  	{
  		if { $st_query_text_index == -1 } \
--- 677,682 ----
***************
*** 741,747 ****
  
  			$ST.query_frame.query configure -text "View Info:   $str"
  		} \
- 
  		elseif { $delta > 0 } \
  		{
  			#
--- 703,708 ----
***************
*** 778,787 ****
  			}
  		}
  	} \
- 
  	elseif { $event == "leave" } \
  		{ set st_query_text_index -1 } \
- 
  	else \
  		{ puts "Error in st_info_scroll{}:  unknown event \"$event\"" }
  
--- 739,746 ----
***************
*** 850,860 ****
  		{
  			if { $x1 > $maxvalue } \
  				{ set x1 $maxvalue } \
- 
  			elseif { $x1 < 0 } \
  				{ set x1 0 }
  		} \
- 
  		else \
  			{ set x1 0 }
  
--- 809,817 ----
***************
*** 874,880 ****
  				- ( $x1 * ( $ut_cwidth - $st_cwidth ) \
  					/ ( $timex - $st_cwidth ) ) ]
  		} \
- 
  		else \
  		{
  			set utx1 [ expr $x1 \
--- 831,836 ----
***************
*** 887,893 ****
  
  		scrollSet $UT_SBH $timex $ut_cwidth 1 $utx1
  	} \
- 
  	elseif { $view == "UT" } \
  	{
  		set maxvalue [ expr $timex - $ut_cwidth + (2 * $frame_border) \
--- 843,848 ----
***************
*** 897,907 ****
  		{
  			if { $x1 > $maxvalue } \
  				{ set x1 $maxvalue } \
- 
  			elseif { $x1 < 0 } \
  				{ set x1 0 }
  		} \
- 
  		else \
  			{ set x1 0 }
  
--- 852,860 ----
***************
*** 921,927 ****
  				+ ( $x1 * ( $ut_cwidth - $st_cwidth) \
  					/ ( $timex - $ut_cwidth ) ) ]
  		} \
- 
  		else \
  		{
  			set stx1 [ expr $x1 \
--- 874,879 ----
***************
*** 971,977 ****
  				{ setTmpMsg "Network View Info" $str }
  		}
  	} \
- 
  	elseif { $action == "query_motion" } \
  	{
  		if { $y >= 0 && $y < $net_cheight \
--- 923,928 ----
***************
*** 986,1000 ****
  				if { $str != [ topMsg ] } \
  					{ setTmpMsg "Network View Info" $str }
  			} \
- 
  			else \
  				{ setTmpMsg "Help" $net_help_enter }
  		} \
- 
  		else \
  			{ setTmpMsg "Help" $net_help_enter }
  	} \
- 
  	elseif { $action == "query_release" } \
  	{
  		if { $y >= 0 && $y < $net_cheight \
--- 937,948 ----
***************
*** 1002,1015 ****
  		{
  			setTmpMsg "Help" $net_help_enter
  		} \
- 
  		else \
  			{ popMsgs }
  	} \
- 
  	elseif { $action == "enter" } \
  		{ setTmpMsg "Help" $net_help_enter } \
- 
  	elseif { $action == "leave" } \
  		{ popMsgs }
  
--- 950,960 ----
***************
*** 1052,1058 ****
  
  		if { $id == $mq_query_index && $dblclk == "1" } \
  			{ set mq_query_keep TRUE } \
- 
  		else \
  			{ set mq_query_keep FALSE }
  
--- 997,1002 ----
***************
*** 1065,1071 ****
  
  		setTmpMsg "Help" $mq_help_query
  	} \
- 
  	elseif { $action == "query_motion" } \
  	{
  		set ret [ mqQuery query $canvx $y ]
--- 1009,1014 ----
***************
*** 1080,1086 ****
  
  		mq_highlight
  	} \
- 
  	elseif { $action == "query_release" } \
  	{
  		if { $mq_query_keep == "TRUE" } \
--- 1023,1028 ----
***************
*** 1087,1093 ****
  		{
  			if { $mq_query_index != 0 } \
  				{ return } \
- 
  			else \
  				{ set mq_query_keep FALSE }
  		}
--- 1029,1034 ----
***************
*** 1104,1114 ****
  		{
  			setTmpMsg "Help" $mq_help_enter
  		} \
- 
  		else \
  			{ popMsgs }
  	} \
- 
  	elseif { $action == "enter" } \
  	{
  		if { $mq_query_keep == "TRUE" } \
--- 1045,1053 ----
***************
*** 1121,1127 ****
  
  		setTmpMsg "Help" $mq_help_enter
  	} \
- 
  	elseif { $action == "move" } \
  	{
  		if { $mq_query_keep == "TRUE" } \
--- 1060,1065 ----
***************
*** 1132,1138 ****
  		set id	[ lindex $ret 0 ]
  		set str	[ lindex $ret 1 ]
  	} \
- 
  	elseif { $action == "leave" } \
  	{
  		if { $mq_query_keep == "TRUE" } \
--- 1070,1075 ----
***************
*** 1200,1206 ****
  
  	if { $event == "enter" } \
  		{ set mq_query_text_index $x } \
- 
  	elseif { $event == "motion" } \
  	{
  		if { $mq_query_text_index == -1 } \
--- 1137,1142 ----
***************
*** 1227,1233 ****
  
  			$MQ.query_frame.query configure -text "View Info:   $str"
  		} \
- 
  		elseif { $delta > 0 } \
  		{
  			#
--- 1163,1168 ----
***************
*** 1264,1273 ****
  			}
  		}
  	} \
- 
  	elseif { $event == "leave" } \
  		{ set mq_query_text_index -1 } \
- 
  	else \
  		{ puts "Error in mq_info_scroll{}:  unknown event \"$event\"" }
  
--- 1199,1206 ----
***************
*** 1312,1318 ****
  			set ct_query_index $tindex
  		}
  	} \
- 
  	elseif { $action == "query_motion" } \
  	{
  		set tindex [ expr ( $canvy - $border_space ) / $st_label_ht ]
--- 1245,1250 ----
***************
*** 1328,1334 ****
  
  				set ct_query_index $tindex
  			} \
- 
  			else \
  			{
  				$CT.query configure -text ""
--- 1260,1265 ----
***************
*** 1336,1342 ****
  				set ct_query_index -1
  			}
  		} \
- 
  		else \
  		{
  			$CT.query configure -text ""
--- 1267,1272 ----
***************
*** 1344,1350 ****
  			set ct_query_index -1
  		}
  	} \
- 
  	elseif { $action == "query_release" } \
  	{
  		$CT.query configure -text ""
--- 1274,1279 ----
***************
*** 1351,1363 ****
  
  		set ct_query_index -1
  	} \
- 
  	elseif { $action == "enter" } \
  		{ setTmpMsg "Help" $ct_help_enter } \
- 
  	elseif { $action == "leave" } \
  		{ popMsgs } \
- 
  	elseif { $action == "label_press" } \
  	{
  		set tindex [ expr ( $canvy - $border_space ) / $st_label_ht ]
--- 1280,1289 ----
***************
*** 1389,1395 ****
  
  		setTmpMsg "Help" $ct_help_label_query
  	} \
- 
  	elseif { $action == "label_motion" } \
  	{
  		if { $y >= 0 && $y < $ct_cheight \
--- 1315,1320 ----
***************
*** 1406,1412 ****
  
  				if { $upck == 1 } \
  					{ .call_trace.label_query configure -text $str } \
- 
  				else \
  				{
  					label .call_trace.label_query -text $str \
--- 1331,1336 ----
***************
*** 1425,1431 ****
  
  				place .call_trace.label_query -x $lx -y $ly -anchor w
  			} \
- 
  			else \
  			{
  				set upck [ winfo exists .call_trace.label_query ]
--- 1349,1354 ----
***************
*** 1434,1440 ****
  					{ destroy .call_trace.label_query }
  			}
  		} \
- 
  		else \
  		{
  			set upck [ winfo exists .call_trace.label_query ]
--- 1357,1362 ----
***************
*** 1443,1449 ****
  				{ destroy .call_trace.label_query }
  		}
  	} \
- 
  	elseif { $action == "label_release" } \
  	{
  		set upck [ winfo exists .call_trace.label_query ]
--- 1365,1370 ----
***************
*** 1453,1465 ****
  
  		setTmpMsg "Help" $ct_help_label
  	} \
- 
  	elseif { $action == "label_enter" } \
  	{
  		if { $ct_help_label_query != [ topMsg ] } \
  			{ setTmpMsg "Help" $ct_help_label }
  	} \
- 
  	elseif { $action == "label_leave" } \
  	{
  		set upck [ winfo exists .call_trace.label_query ]
--- 1374,1384 ----
***************
*** 1532,1538 ****
  				$to_lasty $to_cheight $row_height $to_yview
  		}
  	} \
- 
  	else \
  		{ lappend to_saveout $str }
  
--- 1451,1456 ----
***************
*** 1678,1691 ****
  	{
  		if { $spawn_where == "Host" } \
  			{ set where "host $loc" } \
- 
  		elseif { $spawn_where == "Arch" } \
  			{ set where "arch $loc" } \
- 
  		else \
  			{ set where "" }
  	} \
- 
  	else \
  		{ set where "" }
  
--- 1596,1606 ----
***************
*** 1705,1711 ****
  
  	if { $init == "again" } \
  		{ set init $spawn_init_save } \
- 
  	else \
  		{ set spawn_init_save $init }
  
--- 1620,1625 ----
***************
*** 1732,1738 ****
  
  	if { $last_spawn_where == "Host" } \
  		{ set spawn_host_string $str } \
- 
  	elseif { $last_spawn_where == "Arch" } \
  		{ set spawn_arch_string $str }
  
--- 1646,1651 ----
***************
*** 1740,1746 ****
  
  	if { $spawn_where == "Host" } \
  		{ $SP.loc_entry insert 0 $spawn_host_string } \
- 
  	elseif { $spawn_where == "Arch" } \
  		{ $SP.loc_entry insert 0 $spawn_arch_string }
  
--- 1653,1658 ----
***************
*** 1797,1803 ****
  
  		$OTF.trace_mask configure -command $cmd
  	} \
- 
  	elseif { $tfmt == "3.4" } \
  	{
  		set menu .xpvm.trace_mask_menu
--- 1709,1714 ----
***************
*** 1812,1818 ****
  
  		$OTF.trace_mask configure -command $cmd
  	} \
- 
  	else \
  		{ puts "Error: Unknown Tracing Format" }
  
--- 1723,1728 ----
***************
*** 1842,1851 ****
  
  	if { $trace_format == "3.3" } \
  		{ set prefix "trace33_mask" } \
- 
  	elseif { $trace_format == "3.4" } \
  		{ set prefix "trace_mask" } \
- 
  	else \
  	{
  		puts "Error: Unknown Tracing Format"
--- 1752,1759 ----
***************
*** 1880,1886 ****
  
  	if { $index == "refresh" } \
  		{ refresh_tasks otf } \
- 
  	elseif { $index == "all" } \
  	{
  		pvm_tasks otf 0 $tracing_status
--- 1788,1793 ----
***************
*** 1887,1893 ****
  
  		refresh_tasks otf
  	} \
- 
  	else \
  	{
  		if { $index > 0 && $index < $otf_lasty } \
--- 1794,1799 ----
***************
*** 1921,1927 ****
  
  	if { $index == "refresh" } \
  		{ refresh_tasks kill } \
- 
  	elseif { $index == "all" } \
  	{
  		pvm_tasks kill 0 all
--- 1827,1832 ----
***************
*** 1928,1934 ****
  
  		refresh_tasks kill
  	} \
- 
  	else \
  	{
  		if { $index > 0 && $index < $kill_lasty } \
--- 1833,1838 ----
***************
*** 1963,1969 ****
  
  	if { $index == "refresh" } \
  		{ refresh_tasks signal } \
- 
  	elseif { $index == "all" } \
  	{
  		pvm_tasks signal 0 $signal_selected
--- 1867,1872 ----
***************
*** 1970,1976 ****
  
  		refresh_tasks signal
  	} \
- 
  	else \
  	{
  		if { $index > 0 && $index < $signal_lasty } \
--- 1873,1878 ----
***************
*** 2011,2023 ****
  
  	if { $index == "pvm" } \
  		{ reset_pvm } \
- 
  	elseif { $index == "views" } \
  		{ reset_views } \
- 
  	elseif { $index == "trace_file" } \
  		{ reset_trace_file } \
- 
  	elseif { $index == "all" } \
  	{
  		#
--- 1913,1922 ----
***************
*** 2096,2102 ****
  
  	if { $lwt > $fwt } \
  		{ set wt $lwt } \
- 
  	else \
  		{ set wt $fwt }
  
--- 1995,2000 ----
***************
*** 2294,2300 ****
  
  			pvm_hosts $index
  		} \
- 
  		elseif { $label == "Other Hosts..." } \
  		{
  			#
--- 2192,2197 ----
***************
*** 2319,2330 ****
  
  				focus .xpvm.otherhost.host_entry
  			} \
- 
  			else \
  				{ place forget .xpvm.otherhost }
  		}
  	} \
- 
  	else \
  	{
  		#
--- 2216,2225 ----
***************
*** 2343,2349 ****
  
  				set state OFF
  			} \
- 
  			else \
  			{
  				set $menuvar ON
--- 2238,2243 ----
***************
*** 2493,2499 ****
  
  	if { $net_hheight < $net_cheight } \
  		{ set yview 0 } \
- 	
  	else \
  	{
  		set yview [ expr $net_yview \
--- 2387,2392 ----
***************
*** 2505,2511 ****
  
  	if { $net_hwidth < $net_cwidth } \
  		{ set xview 0 } \
- 	
  	else \
  	{
  		set xview [ expr $net_xview \
--- 2398,2403 ----
***************
*** 2566,2572 ****
  
  			set state OFF
  		} \
- 
  		else \
  		{
  			set $menuvar ON
--- 2458,2463 ----
***************
*** 2603,2613 ****
  					set st_height $min_st_height
  				}
  			} \
- 
  			else \
  				{ set net_height $height_left }
  		} \
- 
  		else \
  		{
  			set net_active FALSE
--- 2494,2502 ----
***************
*** 2625,2631 ****
  
  		wm minsize .xpvm $min_main_width $min_main_height
  	} \
- 
  	elseif { $view == "space_time" } \
  	{
  		if { $state == "ON" } \
--- 2514,2519 ----
***************
*** 2654,2664 ****
  					set st_height $min_st_height
  				}
  			} \
- 
  			else \
  				{ set st_height $height_left }
  		} \
- 
  		else \
  		{
  			set st_active FALSE
--- 2542,2550 ----
***************
*** 2676,2682 ****
  
  		wm minsize .xpvm $min_main_width $min_main_height
  	} \
- 
  	elseif { $view == "utilization" } \
  	{
  		if { $state == "ON" } \
--- 2562,2567 ----
***************
*** 2687,2693 ****
  
  			utToggle 1
  		} \
- 
  		else \
  		{
  			wm withdraw .utilization
--- 2572,2577 ----
***************
*** 2697,2703 ****
  			utToggle 0
  		}
  	} \
- 
  	elseif { $view == "msgq" } \
  	{
  		if { $state == "ON" } \
--- 2581,2586 ----
***************
*** 2708,2714 ****
  
  			mqUpdate
  		} \
- 
  		else \
  		{
  			wm withdraw .msgq
--- 2591,2596 ----
***************
*** 2716,2722 ****
  			set mq_active FALSE
  		}
  	} \
- 
  	elseif { $view == "call_trace" } \
  	{
  		if { $state == "ON" } \
--- 2598,2603 ----
***************
*** 2727,2733 ****
  
  			taskCTUpdate
  		} \
- 
  		else \
  		{
  			wm withdraw .call_trace
--- 2608,2613 ----
***************
*** 2735,2741 ****
  			set ct_active FALSE
  		}
  	} \
- 
  	elseif { $view == "task_output" } \
  	{
  		if { $state == "ON" } \
--- 2615,2620 ----
***************
*** 2746,2752 ****
  
  			updateTaskOutput
  		} \
- 
  		else \
  		{
  			wm withdraw .task_output
--- 2625,2630 ----
***************
*** 2816,2827 ****
  
  		set adjust_y $y
  	} \
- 
  	elseif { $action == "release" } \
  	{
  		$ADJ configure -state normal -relief raised
  	} \
- 
  	elseif { $action == "motion" } \
  	{
  		if { $hold_motion == 0 } \
--- 2694,2703 ----
***************
*** 2834,2840 ****
  			{
  				if { $first == 1 } \
  					{ set first 0 } \
- 
  				else \
  				{
  					set ry $nest_y
--- 2710,2715 ----
***************
*** 2887,2893 ****
  
  			set hold_motion 0
  		} \
- 
  		else \
  		{
  			set rooty [ winfo rooty $ADJ ]
--- 2762,2767 ----
***************
*** 2919,2925 ****
  
  			set st_rect_ht [ expr ( 8 * $st_label_ht ) / 20 ]
  		} \
- 
  		else \
  		{
  			setMsg "Growing Task Height..."
--- 2793,2798 ----
***************
*** 3028,3034 ****
  			if { $net_height < $min_net_height } \
  				{ set net_height $min_net_height }
  		} \
- 
  		else \
  			{ set net_height 2 }
  
--- 2901,2906 ----
***************
*** 3044,3050 ****
  				set st_height $min_st_height
  			}
  		} \
- 
  		else \
  			{ set st_height 0 }
  
--- 2916,2921 ----
***************
*** 3108,3114 ****
  
  		setNetworkView
  	} \
- 
  	else \
  		{ place forget .xpvm.network }
  
--- 2979,2984 ----
***************
*** 3149,3155 ****
  
  		setSpaceTimeView
  	} \
- 
  	else \
  		{ place forget .xpvm.space_time }
  
--- 3019,3024 ----
***************
*** 3246,3252 ****
  
  	if { $net_hheight < $net_cheight } \
  		{ set yview 0 } \
- 	
  	else \
  	{
  		set yview [ expr $net_yview \
--- 3115,3120 ----
***************
*** 3270,3276 ****
  
  	if { $net_hheight < $net_cheight } \
  		{ set xview 0 } \
- 	
  	else \
  	{
  		set xview [ expr $net_xview \
--- 3138,3143 ----
***************
*** 3490,3496 ****
  
  			place $SP.trace_mask -anchor nw -x $tx -y $try
  		} \
- 
  		elseif { $trace_format == "3.4" } \
  		{
  			set tx [ expr [ right $SP.flags_trace ] \
--- 3357,3362 ----
***************
*** 3512,3518 ****
  				-y [ below $SP.buf_entry ]
  		}
  	} \
- 
  	else \
  	{
  		place forget $SP.buf
--- 3378,3383 ----
***************
*** 3556,3562 ****
  
  		set ny [ below $SP.loc_entry ]
  	} \
- 
  	else \
  	{
  		place forget $SP.loc
--- 3421,3426 ----
***************
*** 3657,3663 ****
  		place $OTF.trace_mask -anchor ne \
  			-x $tx -y [ expr [ below $OTF.trace_off ] + $border_space ]
  	} \
- 
  	else \
  		{ place forget $OTF.trace_mask }
  
--- 3521,3526 ----
***************
*** 3693,3699 ****
  
  	if { $x1 < $x2 } \
  		{ set lx $x1 } \
- 	
  	else \
  		{ set lx $x2 }
  
--- 3556,3561 ----
*** src/util.tcl.orig	Thu Jul 27 16:49:26 1995
--- src/util.tcl	Tue Jan  9 08:58:20 1996
***************
*** 22,28 ****
  
  		set scroll_view 0
  	} \
- 
  	elseif { $loc == "center" } \
  	{
  		set view [ scrollCenterValue $max_size $win_size $incr ]
--- 22,27 ----
***************
*** 29,35 ****
  
  		if { $canvas_size < $win_size } \
  			{ set scroll_view 0 } \
- 
  		else \
  		{
  			set scroll_view [ expr $view \
--- 28,33 ----
***************
*** 36,42 ****
  				- [ scrollCenterValue $max_size $canvas_size $incr ] ]
  		}
  	} \
- 
  	elseif { $loc == "high" } \
  	{
  		set view [ expr ( $max_size - $win_size ) / $incr ]
--- 34,39 ----
***************
*** 43,49 ****
  
  		if { $canvas_size < $win_size } \
  			{ set scroll_view 0 } \
- 
  		else \
  			{ set scroll_view $view }
  	}
--- 40,45 ----
***************
*** 56,62 ****
  
  		set $vvar $view
  	} \
- 
  	else \
  	{
  		do_yview $canvas $view
--- 52,57 ----
***************
*** 128,134 ****
  				HORIZ low $incr $utxv
  		}
  	} \
- 
  	elseif { $view == "UT" } \
  	{
  		scrollCanvas $UT_C $UT_SBH -1 tmp_csize ut_cwidth ut_xview \
--- 123,128 ----
***************
*** 171,177 ****
  
  		if { $value >= $maxvalue1 } \
  			{ set value2 [ expr ( $maxvalue1 * $incr1 ) / $incr2 ] } \
- 
  		else \
  			{ set value2 [ expr ( $value * $incr1 ) / $incr2 ] }
  
--- 165,170 ----
***************
*** 189,195 ****
  			set fix_csize 1
  		}
  	} \
- 
  	else \
  		{ set value2 $value }
  
--- 182,187 ----
***************
*** 236,242 ****
  			set value [ expr $value \
  				+ [ scrollCenterValue $max_size $csize $incr ] ]
  		} \
- 
  		elseif { $loc == "high" } \
  		{
  			set value [ expr ( ( $max_size - $wsize ) / $incr ) \
--- 228,233 ----
***************
*** 243,257 ****
  				- $value ]
  		}
  	} \
- 
  	else \
  	{
  		if { $loc == "low" } \
  			{ set value 0 } \
- 	
  		elseif { $loc == "center" } \
  			{ set value [ scrollCenterValue $max_size $wsize $incr ] } \
- 	
  		elseif { $loc == "high" } \
  			{ set value [ expr ( $max_size - $wsize ) / $incr ] }
  	
--- 234,245 ----
***************
*** 275,281 ****
  
  		set $vvar $value
  	} \
- 
  	else \
  	{
  		do_yview $canvas $value
--- 263,268 ----
***************
*** 356,362 ****
  
  			if { $state == "ON" } \
  				{ set $menuvar ON } \
- 
  			else \
  				{ set $menuvar OFF }
  
--- 343,348 ----
***************
*** 377,383 ****
  
  			restrict_bindings $NAME ""
  		} \
- 
  		elseif { $type == "command" } \
  		{
  			set help	[ lindex $i 3 ]
--- 363,368 ----
***************
*** 393,399 ****
  
  			restrict_bindings $NAME ""
  		} \
- 
  		elseif { $type == "submenu" } \
  		{
  			set focus_entry [ lindex $i 3 ]
--- 378,383 ----
***************
*** 412,418 ****
  
  			restrict_bindings $NAME ""
  		} \
- 
  		elseif { $type == "exchange" } \
  		{
  			set button	[ lindex $i 3 ]
--- 396,401 ----
***************
*** 432,438 ****
  
  			restrict_bindings $NAME ""
  		} \
- 
  		elseif { $type == "exchangeIndirect" } \
  		{
  			set bname	[ lindex $i 3 ]
--- 415,420 ----
***************
*** 452,458 ****
  
  			restrict_bindings $NAME ""
  		} \
- 
  		else \
  		{
  			set NAME "$name.label_$fix_label"
--- 434,439 ----
***************
*** 469,475 ****
  
  		if { $LAST != "none" } \
  			{ set mby [ below $LAST ] } \
- 
  		else \
  			{ set mby $frame_border }
  
--- 450,455 ----
***************
*** 503,509 ****
  
  	if { "$close" == "lower" } \
  		{ set cmd "lowerMenu $name" } \
- 
  	else \
  		{ set cmd "$close" }
  
--- 483,488 ----
***************
*** 516,522 ****
  
  	if { $LAST != "none" } \
  		{ set dy [ below $LAST ] } \
- 
  	else \
  		{ set dy $frame_border }
  
--- 495,500 ----
***************
*** 636,642 ****
  
  		if { $LAST != "none" } \
  			{ set mby [ below $LAST ] } \
- 
  		else \
  			{ set mby $frame_border }
  
--- 614,619 ----
***************
*** 703,709 ****
  
  		set cnt 0
  	} \
- 
  	else \
  	{
  		set scrolling "FALSE"
--- 680,685 ----
***************
*** 743,749 ****
  
  		if { $state == "ON" } \
  			{ set $menuvar ON } \
- 
  		else \
  			{ set $menuvar OFF }
  
--- 719,724 ----
***************
*** 774,780 ****
  
  		if { $LAST != "none" } \
  			{ set mby [ below $LAST ] } \
- 
  		else \
  			{ set mby $frame_border }
  
--- 749,754 ----
***************
*** 825,831 ****
  
  	if { "$close" == "lower" } \
  		{ set cmd "lowerMenu $name" } \
- 
  	else \
  		{ set cmd "$close" }
  
--- 799,804 ----
***************
*** 844,855 ****
  		set dy [ expr $$root\_scroll_cheight + $ycutoff \
  			+ (5 * $frame_border) - $fo ]
  	} \
- 	
  	else \
  	{
  		if { $LAST != "none" } \
  			{ set dy [ below $LAST ] } \
- 	
  		else \
  			{ set dy $frame_border }
  	}
--- 817,826 ----
***************
*** 880,886 ****
  		set swidth [ expr $hwidth + $scroll_width \
  			+ (4 * $frame_border) + (2 * $fo) ]
  	} \
- 
  	else \
  		{ set swidth $hwidth }
  
--- 851,856 ----
***************
*** 897,907 ****
  			set hwidth [ expr $width - $scroll_width \
  				- (4 * $frame_border) - (2 * $fo) ]
  		} \
- 
  		else \
  			{ set hwidth $cwidth }
  	} \
- 
  	else \
  		{ set width $swidth }
  
--- 867,875 ----
***************
*** 1010,1016 ****
  
  	if { $ckm == 1 } \
  		{ place forget $name } \
- 
  	else \
  		{ placeMenu $name $button $parent }
  
--- 978,983 ----
***************
*** 1030,1036 ****
  
  	if { $ckm == 1 } \
  		{ place forget $name } \
- 
  	else \
  	{
  		set $bname $button
--- 997,1002 ----
***************
*** 1089,1095 ****
  
  	if { $ckup == 1 } \
  		{ place forget $submenu } \
- 
  	else \
  		{ placeSubMenu $submenu $menu $button $focus_entry }
  
--- 1055,1060 ----
***************
*** 1146,1152 ****
  
  		raiseMenu $menu $button $parent $subs
  	} \
- 
  	else \
  	{
  		place forget $menu
--- 1111,1116 ----
***************
*** 1171,1177 ****
  
  		raiseMenu $menu [ expr $$bname ] $parent $subs
  	} \
- 
  	else \
  	{
  		place forget $menu
--- 1135,1140 ----
***************
*** 1416,1422 ****
  
  	if { $toptype == 0 } \
  		{ return [ lindex $top 1 ] } \
- 	
  	else \
  		{ return [ lindex $top 2 ] }
  
--- 1379,1384 ----
***************
*** 1548,1554 ****
  
  			if { $vis == "VisibilityUnobscured" } \
  				{ wm withdraw $WIN } \
- 			
  			else \
  			{
  				set $index\_visibility "VisibilityUnobscured"
--- 1510,1515 ----
***************
*** 1556,1562 ****
  				raise $WIN
  			}
  		} \
- 		
  		else \
  			{ wm deiconify $WIN }
  
--- 1517,1522 ----
***************
*** 1727,1733 ****
  
  	if { $type == "button" } \
  		{ bind $butt <ButtonPress> "$butt invoke" } \
- 	
  	elseif { $type == "close" } \
  		{ bind $butt <ButtonPress> "popMsgs ; $butt invoke" }
  
--- 1687,1692 ----
***************
*** 1751,1757 ****
  
  		if { $type == "button" } \
  			{ $butt configure -state active } \
- 
  		elseif { $type == "close" } \
  			{ $butt configure -state active }
  
--- 1710,1715 ----
***************
*** 1758,1764 ****
  		if { $msg != [ topMsg ] } \
  			{ setTmpMsg "Help" $msg }
  	} \
- 
  	elseif { $cmd == "OUT" } \
  	{
  		popMsgs
--- 1716,1721 ----
***************
*** 1772,1778 ****
  
  		if { $type == "button" } \
  			{ $butt configure -state normal } \
- 
  		elseif { $type == "close" } \
  			{ $butt configure -state normal }
  	}
--- 1729,1734 ----
***************
*** 1901,1907 ****
  
  		set tw [ winfo containing $x2 $y2 ]
  	} \
- 
  	elseif { $x1 <= $x2 + $wt2 && $x2 + $wt2 <= $x1 + $wt1 \
  		&& $y1 <= $y2 && $y2 <= $y1 + $ht1 } \
  	{
--- 1857,1862 ----
***************
*** 1911,1917 ****
  
  		set tw [ winfo containing [ expr $x2 + $wt2 ] $y2 ]
  	} \
- 
  	elseif { $x1 <= $x2 && $x2 <= $x1 + $wt1 \
  		&& $y1 <= $y2 + $ht2 && $y2 + $ht2 <= $y1 + $ht1 } \
  	{
--- 1866,1871 ----
***************
*** 1921,1927 ****
  
  		set tw [ winfo containing $x2 [ expr $y2 + $ht2 ] ]
  	} \
- 
  	elseif { $x1 <= $x2 + $wt2 && $x2 + $wt2 <= $x1 + $wt1 \
  		&& $y1 <= $y2 + $ht2 && $y2 + $ht2 <= $y1 + $ht1 } \
  	{
--- 1875,1880 ----
***************
*** 1932,1938 ****
  		set tw [ winfo containing \
  			[ expr $x2 + $wt2 ] [ expr $y2 + $ht2 ] ]
  	} \
- 
  	else \
  		{ set tw "" }
  
--- 1885,1890 ----

