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 2003/06/11 16:07:55 UTC

cvs commit: tcl-site/presentations/rivet arch arch.png bullet1.png bullet2.png c-code1.png c-code2.png c-code3.png common.tcl confs.png dowhile.tcl embed-tcl.tcl example1.tcl globals.tcl left.gif left.png logo.gif logo.png logoLarge.png namespaces.tcl next.png order.txt out.png prev.png requestflow.gif requestflow.png right.gif right.png simplehandler.c style.css tcl-connector.png

davidw      2003/06/11 07:07:55

  Added:       presentations/rivet arch arch.png bullet1.png bullet2.png
                        c-code1.png c-code2.png c-code3.png common.tcl
                        confs.png dowhile.tcl embed-tcl.tcl example1.tcl
                        globals.tcl left.gif left.png logo.gif logo.png
                        logoLarge.png namespaces.tcl next.png order.txt
                        out.png prev.png requestflow.gif requestflow.png
                        right.gif right.png simplehandler.c style.css
                        tcl-connector.png
  Log:
  Added more stuff to Rivet presentation.
  
  Revision  Changes    Path
  1.1                  tcl-site/presentations/rivet/arch
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/arch.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/bullet1.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/bullet2.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/c-code1.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/c-code2.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/c-code3.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/common.tcl
  
  Index: common.tcl
  ===================================================================
  file stat [info script] statinfo
  
  if { ! [info exists ::mtime] || $::mtime < $statinfo(mtime) } {
      proc ::getorder { } {
  	set fl [open order.txt]
  	set data [split [read $fl] \n]
  	close $fl
  	foreach ln $data {
  	    lappend ret [string trim $ln]
  	}
  
  	return $ret
      }
  
      proc ::makeindex {} {
  	puts "<ul>"
  	set i 0
  	foreach fl [getorder] {
  	    set flttml "$fl.rvt?index=$i"
  	    puts [subst {
  		<li style="font-size:small ; list-style-type:square ; list-style-image: none"><a href="$flttml">$fl</a></li>
  	    }]
  	    incr i
  	}
  	puts "</ul>"
      }
  
      proc ::nexturl { } {
  	return "[lindex $::urls $::next].rvt?index=$::next"
      }
  
      proc ::prevurl { } {
  	return "[lindex $::urls $::prev].rvt?index=$::prev"
      }
  
      proc ::prevnext { title } {
  	set ::urls [getorder]
  	if { [var exists index] } {
  	    set ::index [var get index]
  	    if { ! [string is integer $::index] } {
  		error "Index must be a number!"
  	    }
  	} else {
  	    set ::index 0
  	}
  
  	set ::next [expr $::index + 1]
  	set ::prev [expr $::index - 1]
  	if { $::next >= [llength $::urls] } {
  	    incr ::next -1
  	}
  	if { $::prev < 0 } {
  	    incr ::prev
  	}
  
  	set str {
  	    <table align="center" width="90%">
  	    <tr>
  	    <td align="left">
  	    <a href="[prevurl]"><img src="left.gif" alt="previous"></a>
  	    </td>
  	    <td align="center">
  	    $title
  	    </td>
  	    <td align="right">
  	    <a href="[nexturl]"><img src="right.gif" alt="next"></a>
  	    </td>
  	    </tr>
  	    </table>
  	}
  	puts [subst $str]
      }
  
      proc ::footer {} {
  	puts {
  	    <p align="center" style="font-size:small">
  	    <a href="list.rvt">INDEX</a>
  	    </p>
  	}
      }
  
      set ::mtime $statinfo(mtime)
  }
  
  
  1.1                  tcl-site/presentations/rivet/confs.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/dowhile.tcl
  
  Index: dowhile.tcl
  ===================================================================
  proc do {body while expression} {
      uplevel $body
      while { [uplevel expr $expression] } {
  	uplevel $body
      }
  }
  
  set i 0
  do {
      puts $i
      incr i
  } while {$i < 0}
  
  
  1.1                  tcl-site/presentations/rivet/embed-tcl.tcl
  
  Index: embed-tcl.tcl
  ===================================================================
  puts -nonewline "
  <html>
    <body>
      <h1>Rivet Example</h1>"
  
  puts "The time is now:"
  puts [clock format [clock seconds]]
  puts -nonewline "
  
    </body>
  </html>"
  
  
  
  1.1                  tcl-site/presentations/rivet/example1.tcl
  
  Index: example1.tcl
  ===================================================================
  proc Serve {chan addr port} {
      fconfigure $chan -translation {auto binary}
      set line [gets $chan]
      if { [catch { set fl [open ".[lindex $line 1]" r] } err] } {
          puts $chan "HTTP/1.0 404 Not Found\r\n"
      } else {
          puts $chan "HTTP/1.0 200 OK"
  	puts $chan "Content-Type: text/html\r\n\r\n[read $fl]"
      }
      close $chan
  }
  
  set sk [socket -server Serve 5151]
  fconfigure $sk -buffering line
  vwait forever
  
  
  
  1.1                  tcl-site/presentations/rivet/globals.tcl
  
  Index: globals.tcl
  ===================================================================
  namespace eval request {
      set ::global_data [clock seconds]
  }
  namespace delete request
  
  namespace eval request {
      puts "The last person to access this child process came at:"
      puts [clock format $::global_data]
  }
  namespace delete request
  
  
  1.1                  tcl-site/presentations/rivet/left.gif
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/left.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/logo.gif
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/logo.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/logoLarge.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/namespaces.tcl
  
  Index: namespaces.tcl
  ===================================================================
  namespace eval foo {
      set foovar 1
      namespace eval bar {
  	set barvar 1
      }
  }
  
  puts $::foo::bar::barvar
  puts $::foo::foovar
  
  namespace eval request {
      set greeting "Hello, World"
      puts -nonewline $greeting
  }
  
  namespace eval request {
      puts -nonewline $greeting
  }
  
  
  1.1                  tcl-site/presentations/rivet/next.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/order.txt
  
  Index: order.txt
  ===================================================================
  index
  intro
  apache-introduction
  about-apache
  apache-platform
  tcl-intro
  tcl-scripting
  tcl-features
  tcl-c-features
  tcl-example-1
  tcl-example-2
  apache-1.3
  writing-modules
  apache-architecture
  module-struct
  init-handler
  child-init
  configuration
  configcode
  serverconfig
  dirconfig
  userconfig
  handlers
  simple-handler
  handler-problems
  namespace-pages
  tcl-namespaces
  global-data
  embed-tcl
  embed-tcl-solution
  normal-tcl-scripts
  channelstruct
  outputproc
  conclusion
  further-information
  
  
  
  1.1                  tcl-site/presentations/rivet/out.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/prev.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/requestflow.gif
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/requestflow.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/right.gif
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/right.png
  
  	<<Binary file>>
  
  
  1.1                  tcl-site/presentations/rivet/simplehandler.c
  
  Index: simplehandler.c
  ===================================================================
  static int Send_Page(request_rec *r)
  {
      if (r->method_number != M_GET && r->method_number != M_POST) {
  	return DECLINED;
      }
      ap_rputs("Hello, Braga!", r);
      return OK;
  }
  
  
  
  1.1                  tcl-site/presentations/rivet/style.css
  
  Index: style.css
  ===================================================================
  
  body {
      font-family: Arial, sans-serif;
      font-style: normal;
      font-size: 200%;
      #    color: #ffffff;
      #    background-color: #000000;
      #    background: url(logo.png)
  }
  
  body.splash {
      font-size: 300%;
      #    background: url(logo.gif);
      background-position: bottom center;
      background-repeat: no-repeat;
  }
  
  
  A:link {
      color: #2277ee;
  }
  A:visited {
      color : #cc3300;
  }
  A:hover {
      color : #000000 ;
      background-color : #aaaaaa
  }
  
  LI {
      margin-bottom: 0.5em;
  }
  
  #UL LI { list-style-image: url(bullet1.png) }
  #UL UL LI { list-style-image: url(bullet2.png) }
  
  LI LI { font-size: smaller }
  
  h1 {
      color: #0000aa;
      text-align: center;
  }
  
  h1.splash {
      color: #cc3300;
  }
  
  h2.splash {
      color: #2277ee;
  }
  
  h3 {
      font-family: Arial, sans-serif;
  }
  
  b {
      font-weight: bold;
  }
  
  td {
      font-size: 200%;
  }
  th {
      font-size: 200%;
  }
  
  code {
      color: #00aa00;
  }
  
  div.box {
      font-size: smaller;
      border-width: medium;
      padding: 0.25em;
      background-color: #dddddd;
  }
  
  pre {
      font-weight: bold;
      color: #ffffff;
      background-color: #000000;
      margin: 1em;
      padding: 1em;
  }
  
  span.string {
      color: #696969;
  }
  
  span.function-name {
      color: #87cefa;
  }
  
  span.keyword {
      color: #00ffff;
  }
  
  span.comment {
      color: #ff7f24;
  } /* font-lock-comment-face */
  span.variable-name {
      color: #228b22;
  } /* font-lock-variable-name-face */
  span.type {
      color: #4682b4;
  } /* font-lock-type-face */
  span.builtin {
      color: #b0c4de;
  } /* font-lock-builtin-face */
  
  
  
  1.1                  tcl-site/presentations/rivet/tcl-connector.png
  
  	<<Binary file>>
  
  

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