You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by da...@apache.org on 2002/07/10 20:11:53 UTC

cvs commit: tcl-site/websh/examples emailform.html emailform_ws3.txt memory.html memory.ws3 memory_ws3.txt ws3tohtml.tcl

davidw      2002/07/10 11:11:52

  Modified:    websh/examples emailform.html emailform_ws3.txt memory.html
                        memory.ws3 memory_ws3.txt ws3tohtml.tcl
  Log:
  Updated examples.
  
  Revision  Changes    Path
  1.2       +1 -1      tcl-site/websh/examples/emailform.html
  
  Index: emailform.html
  ===================================================================
  RCS file: /home/cvs/tcl-site/websh/examples/emailform.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- emailform.html	9 Jul 2002 06:54:53 -0000	1.1
  +++ emailform.html	10 Jul 2002 18:11:52 -0000	1.2
  @@ -30,7 +30,7 @@
   <I><FONT COLOR="#B22222"># define where to send log messages to. Here we use a file
   </FONT></I><I><FONT COLOR="#B22222"># and again define a log destination based filter, which is again
   </FONT></I><I><FONT COLOR="#B22222"># &quot;*.-debug&quot; as above
  -</FONT></I>web::logdest add *.-debug <B><FONT COLOR="#A020F0">file</FONT></B> ../../logs/emailform.log
  +</FONT></I>web::logdest add *.-debug <B><FONT COLOR="#A020F0">file</FONT></B> /tmp/emailform.log
   
   
   <I><FONT COLOR="#B22222"># utility command to handle an HTML page
  
  
  
  1.2       +1 -1      tcl-site/websh/examples/emailform_ws3.txt
  
  Index: emailform_ws3.txt
  ===================================================================
  RCS file: /home/cvs/tcl-site/websh/examples/emailform_ws3.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- emailform_ws3.txt	9 Jul 2002 07:09:49 -0000	1.1
  +++ emailform_ws3.txt	10 Jul 2002 18:11:52 -0000	1.2
  @@ -19,7 +19,7 @@
   # define where to send log messages to. Here we use a file
   # and again define a log destination based filter, which is again
   # "*.-debug" as above
  -web::logdest add *.-debug file ../../logs/emailform.log
  +web::logdest add *.-debug file /tmp/emailform.log
   
   
   # utility command to handle an HTML page
  
  
  
  1.2       +3 -3      tcl-site/websh/examples/memory.html
  
  Index: memory.html
  ===================================================================
  RCS file: /home/cvs/tcl-site/websh/examples/memory.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- memory.html	9 Jul 2002 06:54:53 -0000	1.1
  +++ memory.html	10 Jul 2002 18:11:52 -0000	1.2
  @@ -287,7 +287,7 @@
   
       <B><FONT COLOR="#A020F0">upvar</FONT></B> $<FONT COLOR="#B8860B">vImg</FONT> img
   
  -    <B><FONT COLOR="#A020F0">return</FONT></B> [<B><FONT COLOR="#A020F0">string</FONT></B> range $<FONT COLOR="#B8860B">img</FONT> [<B><FONT COLOR="#A020F0">expr</FONT></B> $<FONT COLOR="#B8860B">pos</FONT>*2] [<B><FONT COLOR="#A020F0">expr</FONT></B> $<FONT COLOR="#B8860B">pos</FONT>*2 + 1]]
  +    <B><FONT COLOR="#A020F0">return</FONT></B> [<B><FONT COLOR="#A020F0">string</FONT></B> range $<FONT COLOR="#B8860B">img</FONT> [<B><FONT COLOR="#A020F0">expr</FONT></B> {$<FONT COLOR="#B8860B">pos</FONT> * 2}] [<B><FONT COLOR="#A020F0">expr</FONT></B> {$<FONT COLOR="#B8860B">pos</FONT> * 2 + 1}]]
   }
   
   <I><FONT COLOR="#B22222"># getStat -- helper to pick status for a given picture
  @@ -306,7 +306,7 @@
       <B><FONT COLOR="#A020F0">set</FONT></B> res [<B><FONT COLOR="#A020F0">string</FONT></B> range $<FONT COLOR="#B8860B">status</FONT> 0 [<B><FONT COLOR="#A020F0">expr</FONT></B> $<FONT COLOR="#B8860B">pos</FONT> - 1]]
       <B><FONT COLOR="#A020F0">set</FONT></B> res $<FONT COLOR="#B8860B">res</FONT>$<FONT COLOR="#B8860B">new</FONT>
       <B><FONT COLOR="#A020F0">set</FONT></B> res $<FONT COLOR="#B8860B">res</FONT>[<B><FONT COLOR="#A020F0">string</FONT></B> range \
  -		     $<FONT COLOR="#B8860B">status</FONT> [<B><FONT COLOR="#A020F0">expr</FONT></B> $<FONT COLOR="#B8860B">pos</FONT> + 1] [<B><FONT COLOR="#A020F0">string</FONT></B> length $<FONT COLOR="#B8860B">status</FONT>]]
  +		     $<FONT COLOR="#B8860B">status</FONT> [<B><FONT COLOR="#A020F0">expr</FONT></B> {$<FONT COLOR="#B8860B">pos</FONT> + 1}] [<B><FONT COLOR="#A020F0">string</FONT></B> length $<FONT COLOR="#B8860B">status</FONT>]]
       <B><FONT COLOR="#A020F0">set</FONT></B> status $<FONT COLOR="#B8860B">res</FONT>
   }
   
  @@ -457,7 +457,7 @@
   
   		    <B><FONT COLOR="#A020F0">for</FONT></B> {<B><FONT COLOR="#A020F0">set</FONT></B> j 0} {$<FONT COLOR="#B8860B">j</FONT> &lt; $<FONT COLOR="#B8860B">numY</FONT>} {<B><FONT COLOR="#A020F0">incr</FONT></B> j} {
   
  -			<B><FONT COLOR="#A020F0">set</FONT></B> tmpCnt [<B><FONT COLOR="#A020F0">expr</FONT></B> $<FONT COLOR="#B8860B">i</FONT> * $<FONT COLOR="#B8860B">numY</FONT> + $<FONT COLOR="#B8860B">j</FONT>]
  +			<B><FONT COLOR="#A020F0">set</FONT></B> tmpCnt [<B><FONT COLOR="#A020F0">expr</FONT></B> {$<FONT COLOR="#B8860B">i</FONT> * $<FONT COLOR="#B8860B">numY</FONT> + $<FONT COLOR="#B8860B">j</FONT>}]
   
   			<B><FONT COLOR="#A020F0">set</FONT></B> timg [getImageFromArray img $<FONT COLOR="#B8860B">tmpCnt</FONT>]
   
  
  
  
  1.3       +3 -3      tcl-site/websh/examples/memory.ws3
  
  Index: memory.ws3
  ===================================================================
  RCS file: /home/cvs/tcl-site/websh/examples/memory.ws3,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- memory.ws3	21 Jun 2002 13:43:07 -0000	1.2
  +++ memory.ws3	10 Jul 2002 18:11:52 -0000	1.3
  @@ -276,7 +276,7 @@
   
       upvar $vImg img
   
  -    return [string range $img [expr $pos*2] [expr $pos*2 + 1]]
  +    return [string range $img [expr {$pos * 2}] [expr {$pos * 2 + 1}]]
   }
   
   # getStat -- helper to pick status for a given picture
  @@ -295,7 +295,7 @@
       set res [string range $status 0 [expr $pos - 1]]
       set res $res$new
       set res $res[string range \
  -		     $status [expr $pos + 1] [string length $status]]
  +		     $status [expr {$pos + 1}] [string length $status]]
       set status $res
   }
   
  @@ -446,7 +446,7 @@
   
   		    for {set j 0} {$j < $numY} {incr j} {
   
  -			set tmpCnt [expr $i * $numY + $j]
  +			set tmpCnt [expr {$i * $numY + $j}]
   
   			set timg [getImageFromArray img $tmpCnt]
   
  
  
  
  1.2       +3 -3      tcl-site/websh/examples/memory_ws3.txt
  
  Index: memory_ws3.txt
  ===================================================================
  RCS file: /home/cvs/tcl-site/websh/examples/memory_ws3.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- memory_ws3.txt	9 Jul 2002 07:09:49 -0000	1.1
  +++ memory_ws3.txt	10 Jul 2002 18:11:52 -0000	1.2
  @@ -276,7 +276,7 @@
   
       upvar $vImg img
   
  -    return [string range $img [expr $pos*2] [expr $pos*2 + 1]]
  +    return [string range $img [expr {$pos * 2}] [expr {$pos * 2 + 1}]]
   }
   
   # getStat -- helper to pick status for a given picture
  @@ -295,7 +295,7 @@
       set res [string range $status 0 [expr $pos - 1]]
       set res $res$new
       set res $res[string range \
  -		     $status [expr $pos + 1] [string length $status]]
  +		     $status [expr {$pos + 1}] [string length $status]]
       set status $res
   }
   
  @@ -446,7 +446,7 @@
   
   		    for {set j 0} {$j < $numY} {incr j} {
   
  -			set tmpCnt [expr $i * $numY + $j]
  +			set tmpCnt [expr {$i * $numY + $j}]
   
   			set timg [getImageFromArray img $tmpCnt]
   
  
  
  
  1.3       +5 -1      tcl-site/websh/examples/ws3tohtml.tcl
  
  Index: ws3tohtml.tcl
  ===================================================================
  RCS file: /home/cvs/tcl-site/websh/examples/ws3tohtml.tcl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ws3tohtml.tcl	9 Jul 2002 07:09:49 -0000	1.2
  +++ ws3tohtml.tcl	10 Jul 2002 18:11:52 -0000	1.3
  @@ -1,7 +1,11 @@
  +#!/bin/sh
  +# the next line restarts using tclsh \
  +    exec tclsh "$0" "$@"
  +
   foreach ws3 [glob *.ws3] {
       puts "processing $ws3"
       catch {
   	exec /usr/bin/enscript -h -B -t [file root $ws3] --color -Etcl -B --language=html -o [file rootname $ws3].html $ws3
       }
  -    file copy $ws3 "[file rootname $ws3]_ws3.txt"
  +    file copy -force $ws3 "[file rootname $ws3]_ws3.txt"
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tcl-site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: tcl-site-cvs-help@tcl.apache.org