[Sumover-dev] [svn commit] r3776 - in vic/trunk: . net tcl

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Thu Aug 3 16:16:16 BST 2006


Author: ucacsva
Date: Thu Aug  3 16:15:55 2006
New Revision: 3776

Modified:
   vic/trunk/Makefile.in
   vic/trunk/net/cbAppInit.c
   vic/trunk/net/communicator.cpp
   vic/trunk/net/group-ipc.cpp
   vic/trunk/render/ppm.cpp
   vic/trunk/tcl/cf-confbus.tcl
   vic/trunk/tcl/cf-tm.tcl
   vic/trunk/tcl/tkerror.tcl
   vic/trunk/title-maker

Log:
Recommitting file from Linux to resolve newline character conflict.

Modified: vic/trunk/Makefile.in
==============================================================================
--- vic/trunk/Makefile.in	(original)
+++ vic/trunk/Makefile.in	Thu Aug  3 16:15:55 2006
@@ -180,9 +180,10 @@
 	ui-jpeg_play.o tk.o random.o
 
 LIB_CB = @V_LIB_TK@ @V_LIB_TCL@ @V_LIB_X11@ @V_LIB@ -lm
-OBJ_CB = cbAppInit.o cb.o confbus.o group-ipc.o iohandler.o \
-	net.o net-ip.o crypt.o crypt-dull.o $(OBJ_CRYPT) net/communicator.o \
-	ppm.o Tcl.o Tcl2.o inet.o md5c.o
+OBJ_CB = net/cbAppInit.o net/cb.o net/confbus.o net/group-ipc.o iohandler.o \
+	render/ppm.cpp \
+	net/net.o net/net-ip.o net/net-addr.o net/crypt.o net/crypt-dull.o $(OBJ_CRYPT) net/communicator.o \
+	Tcl.o Tcl2.o net/inet.o md5c.o
 
 OBJ_H261DUMP = h261_dump.o p64/p64.o p64/p64dump.o huffcode.o dct.o bv.o
 

Modified: vic/trunk/net/cbAppInit.c
==============================================================================
--- vic/trunk/net/cbAppInit.c	(original)
+++ vic/trunk/net/cbAppInit.c	Thu Aug  3 16:15:55 2006
@@ -12,7 +12,7 @@
  */
 
 #ifndef lint
-static char sccsid[] = "@(#) tkAppInit.c 1.15 95/06/28 13:14:28";
+static const char sccsid[] = "@(#) tkAppInit.c 1.15 95/06/28 13:14:28";
 #endif /* not lint */
 
 #include "tk.h"
@@ -22,9 +22,9 @@
  * Sun shared libraries to be used for Tcl.
  */
 
-extern int matherr();
-int *tclDummyMathPtr = (int *) matherr;
-
+//extern int matherr();
+//int *tclDummyMathPtr = (int *) matherr;
+
 /*
  *----------------------------------------------------------------------
  *
@@ -50,7 +50,7 @@
     Tk_Main(argc, argv, Tcl_AppInit);
     return 0;			/* Needed only to prevent compiler warning. */
 }
-
+
 /*
  *----------------------------------------------------------------------
  *
@@ -107,6 +107,7 @@
      * then no user-specific startup file will be run under any conditions.
      */
 
-    tcl_RcFileName = "~/.cbrc";
+    /*tcl_RcFileName = "~/.cbrc";*/
+    Tcl_SetVar(interp, "tcl_RcFileName", "~/.cbrc", TCL_GLOBAL_ONLY);
     return TCL_OK;
 }

Modified: vic/trunk/net/communicator.cpp
==============================================================================
--- vic/trunk/net/communicator.cpp	(original)
+++ vic/trunk/net/communicator.cpp	Thu Aug  3 16:15:55 2006
@@ -32,8 +32,7 @@
  */
 
 #ifndef lint
-static char rcsid[] =
-    "@(#) $Header$ (LBL)";
+static const char rcsid[] = "@(#) $Header$ (LBL)";
 #endif
 
 #include <ctype.h>
@@ -51,8 +50,8 @@
 	virtual void dispatch(int mask);
 protected:
 	void send(const char* s);
-	Network* net_;
 	char* callback_;
+	Network* net_;
 	u_int16_t seqno_;
 	u_char* pktbuf_;
 };

Modified: vic/trunk/net/group-ipc.cpp
==============================================================================
--- vic/trunk/net/group-ipc.cpp	(original)
+++ vic/trunk/net/group-ipc.cpp	Thu Aug  3 16:15:55 2006
@@ -210,6 +210,7 @@
 void GroupIPC::send(int type, const char* msg)
 {
 	strcpy((char*)buffer(), msg);
+	fprintf(stderr, "debug net goup-ipc.cpp: GroupIPC::send()msg=%s\n", msg);
 	/* include null terminator */
 	send(type, strlen(msg) + 1);
 }

Modified: vic/trunk/render/ppm.cpp
==============================================================================
--- vic/trunk/render/ppm.cpp	(original)
+++ vic/trunk/render/ppm.cpp	Thu Aug  3 16:15:55 2006
@@ -32,8 +32,7 @@
  */
 
 #ifndef lint
-static char rcsid[] =
-    "@(#) $Header$ (LBL)";
+static const char rcsid[] = "@(#) $Header$ (LBL)";
 #endif
 
 #include <tk.h>
@@ -87,7 +86,7 @@
 		if (strcmp(argv[1], "load") == 0) {
 			FILE* f;
 			if (Tcl_GetOpenFile(tcl.interp(), (char*)argv[2],
-					    0, 1, &f) != TCL_OK ||
+					    0, 1, (void **)&f) != TCL_OK ||
 			    load(f) < 0)
 				tcl.result("0");
 			else
@@ -97,7 +96,7 @@
 		if (strcmp(argv[1], "dump-yuv") == 0) {
 			FILE* f;
 			if (Tcl_GetOpenFile(tcl.interp(), (char*)argv[2],
-					    1, 1, &f) != TCL_OK ||
+					    1, 1, (void **)&f) != TCL_OK ||
 			    dump(f) < 0)
 				tcl.result("0");
 			else
@@ -153,6 +152,8 @@
 		double r = getc(f);
 		double g = getc(f);
 		double b = getc(f);
+
+		printf("%d:\t%d %d %d\n", k, int(r), int(g), int(b));
 		
 		/* can't have overflow in this direction */
 		double y0 = 0.299 * r + 0.587 * g + 0.114 * b;
@@ -163,8 +164,12 @@
 		g = getc(f);
 		b = getc(f);
 
+		printf("%d:\t%d %d %d\n", k, int(r), int(g), int(b));
+
 		double y1 = 0.299 * r + 0.587 * g + 0.114 * b;
 
+	//	printf("%d:\t%d %d %d\n", k, int(r), int(g), int(b));
+
 		p[0] = int(y0);
 		p[1] = int(u + 128);
 		p[2] = int(y1);

Modified: vic/trunk/tcl/cf-confbus.tcl
==============================================================================
--- vic/trunk/tcl/cf-confbus.tcl	(original)
+++ vic/trunk/tcl/cf-confbus.tcl	Thu Aug  3 16:15:55 2006
@@ -51,11 +51,22 @@
 	#	debug "confbus arg mismatch: $class ($formals)/($actuals)"
 	#	return		
 	#}
-	$proc $actuals
+
+	debug "\nproc=$proc, actuals=$actuals, formals=$formals, cb_dispatch=$cb_dispatch($class), msg=$msg"
+
+        if [catch "$proc $actuals"] {
+                debug "$V(app): something wrong while executing \"proc actuals\""
+                exit 1
+        }
+
+	#debug "DEBUG confbusHandler: after proc actuals"
 }
 
 proc init_confbus {} {
 	set channel [resource confBusChannel]
+
+	debug "DEBUG init_confbus{}: initialising confBus"
+
 	if { $channel != 0 } {
 		global V
 		set V(cb) [new confbus $channel]

Modified: vic/trunk/tcl/cf-tm.tcl
==============================================================================
--- vic/trunk/tcl/cf-tm.tcl	(original)
+++ vic/trunk/tcl/cf-tm.tcl	Thu Aug  3 16:15:55 2006
@@ -38,10 +38,13 @@
 
 proc tm_bootstrap {} {
 	global tm411 tm422
+	debug "******************* DEBUG tm_bootstrap: entering ************************"
 	if ![info exists tm411] {
 		set tm411 [new module compositor/411]
 		set tm422 [new module compositor/422]
+		debug "DEBUG tm_bootstrap: in !\"info exists tm411\""
 	}
+	debug "******************* DEBUG tm_bootstrap: leaving ************************\n"
 }
 
 proc tm_init { grabber encoder } {
@@ -67,33 +70,47 @@
 
 proc tm_enable {} {
 	global tmEnable V
+	debug "********************* DEBUG tm_enable: entering tm_enable ************************"
+
 	if [info exists tmEnable] {
+		debug "DEBUG tm_enable: in \"info exists tmEnable\""
 		return
 	}
 	set tmEnable 1
 	if [have grabber] {
 		tm_init $V(grabber) $V(encoder)
+		debug "DEBUG tm_enable: in \"have grabber\""
 	}
+	debug "********************* DEBUG tm_enable: leaving tm_enable *************************\n"
 }
 
 proc tm_disable {} {
 	global tmEnable V
+
+	debug "****************** DEBUG tm_disable: entering tm_disable ************************"
+
 	catch "unset tmEnable"
 	if [have grabber] {
 		# remove the title-maker from the path
 		# XXX this assumes the title-maker is the only
 		# intervening modules
 		$V(grabber) target $V(encoder)
+		debug "DEBUG tm_disable: in \"have grabber\""
 	}
+        debug "****************** DEBUG tm_disable: leaving tm_disable ************************\n"
 }
 
 proc tm_check id {
 	global tm_obj
+	debug "****************** DEBUG tm_check: into \"info exists tm_obj()\" *************\n"
 	return [info exists tm_obj($id)]
 }
 
 proc tm_create { id file width height } {
 puts create/$id/$file/$width/$height
+
+	debug "****************** DEBUG tm_create: entering tm_create ************************"
+
 	global tm_obj
 	if [tm_check $id] {
 		tm_destroy $id
@@ -102,6 +119,9 @@
 	#XXX check for error
 	$tm_obj($id) load $file $width $height
 	tm_bootstrap
+	
+	debug "****************** DEBUG tm_create: leaving tm_create ************************\n"
+
 }
 
 proc tm_transparent { id lum } {

Modified: vic/trunk/tcl/tkerror.tcl
==============================================================================
--- vic/trunk/tcl/tkerror.tcl	(original)
+++ vic/trunk/tcl/tkerror.tcl	Thu Aug  3 16:15:55 2006
@@ -45,7 +45,7 @@
 	puts $info
 	puts \
 "Please mail this error message and, if possible, an explanation\
-\nof what user-action caused it to $V(app)@cs.ucl.ac.uk."
+\nof what user-action caused it to $V(app)@cs.ucl.ac.uk.\n\n"
 }
 
 proc "" args {
@@ -56,5 +56,5 @@
 	puts $info
 	puts \
 "Please mail this error message and, if possible, an explanation\
-\nof what user-action caused it to $V(app)@cs.ucl.ac.uk."
+\nof what user-action caused it to $V(app)@cs.ucl.ac.uk.\n\n"
 }

Modified: vic/trunk/title-maker
==============================================================================
--- vic/trunk/title-maker	(original)
+++ vic/trunk/title-maker	Thu Aug  3 16:15:55 2006
@@ -3,6 +3,7 @@
 proc ppm_load { object infile outfile } {
 	set ppm [new ppm]
 	set f [open $infile r]
+	puts stderr "opened file $infile"
 	$ppm load $f
 	close $f
 	set f [open $outfile w]
@@ -17,14 +18,14 @@
 		 \"$object_width($object)\" \"$object_height($object)\""
 }
 
-set channel 1
-set cb [new confbus $channel]
-$cb send tm_enable
-ppm_load name name.ppm /tmp/name
-ppm_load logo lbl-logo.ppm /tmp/logo
-$cb send "tm_transparent name 255"
-$cb send "tm_transparent logo 1"
-after 1000 "float_graphic name"
+set channel 1
+set cb [new confbus $channel]
+$cb send tm_enable
+ppm_load name name.ppm /tmp/name
+ppm_load logo lbl-logo.ppm /tmp/logo
+$cb send "tm_transparent name 255"
+$cb send "tm_transparent logo 1"
+after 1000 "float_graphic name"
 
 proc place_graphic { o x y depth } {
 	global object_x object_y object_depth cb



More information about the Sumover-dev mailing list