mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ad...@apache.org
Subject [12/51] [partial] incubator-mynewt-site git commit: remove untarred files for openocd
Date Thu, 16 Jun 2016 21:57:16 GMT
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/autosetup/local.tcl
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/autosetup/local.tcl b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/autosetup/local.tcl
deleted file mode 100644
index a5da8b0..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/autosetup/local.tcl
+++ /dev/null
@@ -1,203 +0,0 @@
-# The complex extension checking is done here.
-
-global withinfo
-global extdb
-
-# Final determination of module status
-dict set extdb status {}
-
-# Returns 1 if the extension has the attribute
-proc ext-has {ext attr} {
-    expr {$attr in [dict get $::extdb attrs $ext]}
-}
-
-# Returns an entry from the extension 'info' table, or $default otherwise
-proc ext-get {ext key {default {}}} {
-    if {[dict exists $::extdb info $ext $key]} {
-        return [dict get $::extdb info $ext $key]
-    } else {
-        return $default
-    }
-}
-
-# Set the status of the extension to the given value, and returns the value
-proc ext-set-status {ext value} {
-    dict set ::extdb status $ext $value
-    return $value
-}
-
-# Returns the status of the extension, or ? if unknown
-proc ext-get-status {ext} {
-    if {[dict exists $::extdb status $ext]} {
-        return [dict get $::extdb status $ext]
-    }
-    return ?
-}
-
-proc check-extension-status {ext required} {
-    global withinfo
-
-    set status [ext-get-status $ext]
-
-    if {$ext in $withinfo(without)} {
-        # Disabled without further ado
-        msg-result "Extension $ext...disabled"
-        return [ext-set-status $ext n]
-    }
-
-    if {$status in {m y n}} {
-        return $status
-    }
-
-    # required is "required" if this extension *must* be enabled
-    # required is "wanted" if it is not fatal for this extension
-    # not to be enabled
-
-    array set depinfo {m 0 y 0 n 0}
-
-    # Stash the current value of LIBS
-    set LIBS [get-define LIBS]
-
-    # Check direct dependencies
-    if [ext-get $ext check 1] {
-        # "check" conditions are met
-    } else {
-        # not met
-        incr depinfo(n)
-    }
-
-    if {$ext in $withinfo(mod)} {
-        # This is a module, so ignore LIBS
-        # LDLIBS_$ext will contain the appropriate libs for this module
-        define LIBS $LIBS
-    }
-
-    if {$depinfo(n) == 0} {
-        # Now extension dependencies
-        foreach i [ext-get $ext dep] {
-            set status [check-extension-status $i $required]
-            #puts "$ext: dep $i $required => $status"
-            incr depinfo($status)
-            if {$depinfo(n)} {
-                break
-            }
-        }
-    }
-
-    #parray depinfo
-
-    if {$depinfo(n)} {
-        msg-checking "Extension $ext..."
-        if {$required eq "required"} {
-            user-error "dependencies not met"
-        }
-        msg-result "disabled (dependencies)"
-        return [ext-set-status $ext n]
-    }
-
-    # Selected as a module?
-    if {$ext in $withinfo(mod)} {
-        if {[ext-has $ext tcl]} {
-            # Easy, a Tcl module
-            msg-result "Extension $ext...tcl"
-        } elseif {[ext-has $ext static]} {
-            user-error "Extension $ext can't be a module"
-        } else {
-            msg-result "Extension $ext...module"
-            foreach i [ext-get $ext libdep] {
-                define-append LDLIBS_$ext [get-define $i ""]
-            }
-        }
-        return [ext-set-status $ext m]
-    }
-
-    # Selected as a static extension?
-    if {[ext-has $ext shared]} {
-        user-error "Extension $ext can only be selected as a module"
-    } elseif {$ext in $withinfo(ext) || $required eq "$required"} {
-        msg-result "Extension $ext...enabled"
-    } elseif {$ext in $withinfo(maybe)} {
-        msg-result "Extension $ext...enabled (default)"
-    } else {
-        # Could be selected, but isn't (yet)
-        return [ext-set-status $ext x]
-    }
-    foreach i [ext-get $ext libdep] {
-        define-append LDLIBS [get-define $i ""]
-    }
-    return [ext-set-status $ext y]
-}
-
-# Examines the user options (the $withinfo array)
-# and the extension database ($extdb) to determine
-# what is selected, and in what way.
-#
-# The results are available via ext-get-status
-# And a dictionary is returned containing four keys:
-#   static-c     extensions which are static C
-#   static-tcl   extensions which are static Tcl
-#   module-c     extensions which are C modules
-#   module-tcl   extensions which are Tcl modules
-proc check-extensions {} {
-    global extdb withinfo
-
-    # Check valid extension names
-    foreach i [concat $withinfo(ext) $withinfo(mod)] {
-        if {![dict exists $extdb attrs $i]} {
-            user-error "Unknown extension: $i"
-        }
-    }
-
-    set extlist [lsort [dict keys [dict get $extdb attrs]]]
-
-    set withinfo(maybe) {}
-
-    # Now work out the default status. We have.
-    # normal case, include !optional if possible
-    # --without=default, don't include optional
-    if {$withinfo(nodefault)} {
-        lappend withinfo(maybe) stdlib
-    } else {
-        foreach i $extlist {
-            if {![ext-has $i optional]} {
-                lappend withinfo(maybe) $i
-            }
-        }
-    }
-
-    foreach i $extlist {
-        define LDLIBS_$i ""
-    }
-
-    foreach i [concat $withinfo(ext) $withinfo(mod)] {
-        check-extension-status $i required
-    }
-    foreach i $withinfo(maybe) {
-        check-extension-status $i wanted
-    }
-
-    array set extinfo {static-c {} static-tcl {} module-c {} module-tcl {}}
-
-    foreach i $extlist {
-        set status [ext-get-status $i]
-        set tcl [ext-has $i tcl]
-        switch $status,$tcl {
-            y,1 {
-                define jim_ext_$i
-                lappend extinfo(static-tcl) $i
-            }
-            y,0 {
-                define jim_ext_$i
-                lappend extinfo(static-c) $i
-                # If there are any static C++ extensions, jimsh must be linked using
-                # the C++ compiler
-                if {[ext-has $i cpp]} {
-                    define HAVE_CXX_EXTENSIONS
-                }
-            }
-            m,1 { lappend extinfo(module-tcl) $i }
-            m,0 { lappend extinfo(module-c) $i }
-        }
-    }
-    return [array get extinfo]
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/autosetup/system.tcl
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/autosetup/system.tcl b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/autosetup/system.tcl
deleted file mode 100644
index 0166616..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/autosetup/system.tcl
+++ /dev/null
@@ -1,271 +0,0 @@
-# Copyright (c) 2010 WorkWare Systems http://www.workware.net.au/
-# All rights reserved
-
-# @synopsis:
-#
-# This module supports common system interrogation and options
-# such as --host, --build, --prefix, and setting srcdir, builddir, and EXEXT.
-#
-# It also support the 'feature' naming convention, where searching
-# for a feature such as sys/type.h defines HAVE_SYS_TYPES_H
-#
-module-options {
-	host:host-alias =>		{a complete or partial cpu-vendor-opsys for the system where
-							the application will run (defaults to the same value as --build)}
-	build:build-alias =>	{a complete or partial cpu-vendor-opsys for the system
-							where the application will be built (defaults to the
-							result of running config.guess)}
-	prefix:dir =>			{the target directory for the build (defaults to /usr/local)}
-
-	# These (hidden) options are supported for autoconf/automake compatibility
-	exec-prefix:
-	bindir:
-	sbindir:
-	includedir:
-	mandir:
-	infodir:
-	libexecdir:
-	datadir:
-	libdir:
-	sysconfdir:
-	sharedstatedir:
-	localstatedir:
-	maintainer-mode=0
-	dependency-tracking=0
-}
-
-# Returns 1 if exists, or 0 if  not
-#
-proc check-feature {name code} {
-	msg-checking "Checking for $name..."
-	set r [uplevel 1 $code]
-	define-feature $name $r
-	if {$r} {
-		msg-result "ok"
-	} else {
-		msg-result "not found"
-	}
-	return $r
-}
-
-# @have-feature name ?default=0?
-#
-# Returns the value of the feature if defined, or $default if not.
-# See 'feature-define-name' for how the feature name
-# is translated into the define name.
-#
-proc have-feature {name {default 0}} {
-	get-define [feature-define-name $name] $default
-}
-
-# @define-feature name ?value=1?
-#
-# Sets the feature 'define' to the given value.
-# See 'feature-define-name' for how the feature name
-# is translated into the define name.
-#
-proc define-feature {name {value 1}} {
-	define [feature-define-name $name] $value
-}
-
-# @feature-checked name
-#
-# Returns 1 if the feature has been checked, whether true or not
-#
-proc feature-checked {name} {
-	is-defined [feature-define-name $name]
-}
-
-# @feature-define-name name ?prefix=HAVE_?
-#
-# Converts a name to the corresponding define,
-# e.g. sys/stat.h becomes HAVE_SYS_STAT_H.
-#
-# Converts * to P and all non-alphanumeric to underscore.
-#
-proc feature-define-name {name {prefix HAVE_}} {
-	string toupper $prefix[regsub -all {[^a-zA-Z0-9]} [regsub -all {[*]} $name p] _]
-}
-
-# If $file doesn't exist, or it's contents are different than $buf,
-# the file is written and $script is executed.
-# Otherwise a "file is unchanged" message is displayed.
-proc write-if-changed {file buf {script {}}} {
-	set old [readfile $file ""]
-	if {$old eq $buf && [file exists $file]} {
-		msg-result "$file is unchanged"
-	} else {
-		writefile $file $buf\n
-		uplevel 1 $script
-	}
-}
-
-# @make-template template ?outfile?
-#
-# Reads the input file <srcdir>/$template and writes the output file $outfile.
-# If $outfile is blank/omitted, $template should end with ".in" which
-# is removed to create the output file name.
-#
-# Each pattern of the form @define@ is replaced the the corresponding
-# define, if it exists, or left unchanged if not.
-# 
-# The special value @srcdir@ is substituted with the relative
-# path to the source directory from the directory where the output
-# file is created, while the special value @top_srcdir@ is substituted
-# with the relative path to the top level source directory.
-#
-# Conditional sections may be specified as follows:
-## @if name == value
-## lines
-## @else
-## lines
-## @endif
-#
-# Where 'name' is a defined variable name and @else is optional.
-# If the expression does not match, all lines through '@endif' are ignored.
-#
-# The alternative forms may also be used:
-## @if name
-## @if name != value
-#
-# Where the first form is true if the variable is defined, but not empty or 0
-#
-# Currently these expressions can't be nested.
-#
-proc make-template {template {out {}}} {
-	set infile [file join $::autosetup(srcdir) $template]
-
-	if {![file exists $infile]} {
-		user-error "Template $template is missing"
-	}
-
-	# Define this as late as possible
-	define AUTODEPS $::autosetup(deps)
-
-	if {$out eq ""} {
-		if {[file ext $template] ne ".in"} {
-			autosetup-error "make_template $template has no target file and can't guess"
-		}
-		set out [file rootname $template]
-	}
-
-	set outdir [file dirname $out]
-
-	# Make sure the directory exists
-	file mkdir $outdir
-
-	# Set up srcdir and top_srcdir to be relative to the target dir
-	define srcdir [relative-path [file join $::autosetup(srcdir) $outdir] $outdir]
-	define top_srcdir [relative-path $::autosetup(srcdir) $outdir]
-
-	set mapping {}
-	foreach {n v} [array get ::define] {
-		lappend mapping @$n@ $v
-	}
-	set result {}
-	foreach line [split [readfile $infile] \n] {
-		if {[info exists cond]} {
-			set l [string trimright $line]
-			if {$l eq "@endif"} {
-				unset cond
-				continue
-			}
-			if {$l eq "@else"} {
-				set cond [expr {!$cond}]
-				continue
-			}
-			if {$cond} {
-				lappend result $line
-			}
-			continue
-		}
-		if {[regexp {^@if\s+(\w+)(.*)} $line -> name expression]} {
-			lassign $expression equal value
-			set varval [get-define $name ""]
-			if {$equal eq ""} {
-				set cond [expr {$varval ni {"" 0}}]
-			} else {
-				set cond [expr {$varval eq $value}]
-				if {$equal ne "=="} {
-					set cond [expr {!$cond}]
-				}
-			}
-			continue
-		}
-		lappend result $line
-	}
-	writefile $out [string map $mapping [join $result \n]]\n
-
-	msg-result "Created [relative-path $out] from [relative-path $template]"
-}
-
-# build/host tuples and cross-compilation prefix
-set build [opt-val build]
-define build_alias $build
-if {$build eq ""} {
-	define build [config_guess]
-} else {
-	define build [config_sub $build]
-}
-
-set host [opt-val host]
-define host_alias $host
-if {$host eq ""} {
-	define host [get-define build]
-	set cross ""
-} else {
-	define host [config_sub $host]
-	set cross $host-
-}
-define cross [get-env CROSS $cross]
-
-# Do "define defaultprefix myvalue" to set the default prefix *before* the first "use"
-set prefix [opt-val prefix [get-define defaultprefix /usr/local]]
-
-# These are for compatibility with autoconf
-define target [get-define host]
-define prefix $prefix
-define builddir $autosetup(builddir)
-define srcdir $autosetup(srcdir)
-# Allow this to come from the environment
-define top_srcdir [get-env top_srcdir [get-define srcdir]]
-
-# autoconf supports all of these
-set exec_prefix [opt-val exec-prefix $prefix]
-define exec_prefix $exec_prefix
-foreach {name defpath} {
-	bindir /bin
-	sbindir /sbin
-	libexecdir /libexec
-	libdir /lib
-} {
-	define $name [opt-val $name $exec_prefix$defpath]
-}
-foreach {name defpath} {
-	datadir /share
-	sysconfdir /etc
-	sharedstatedir /com
-	localstatedir /var
-	infodir /share/info
-	mandir /share/man
-	includedir /include
-} {
-	define $name [opt-val $name $prefix$defpath]
-}
-
-define SHELL [get-env SHELL [find-an-executable sh bash ksh]]
-
-# Windows vs. non-Windows
-switch -glob -- [get-define host] {
-	*-*-ming* - *-*-cygwin - *-*-msys {
-		define-feature windows
-		define EXEEXT .exe
-	}
-	default {
-		define EXEEXT ""
-	}
-}
-
-# Display
-msg-result "Host System...[get-define host]"
-msg-result "Build System...[get-define build]"

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/autosetup/test-tclsh
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/autosetup/test-tclsh b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/autosetup/test-tclsh
deleted file mode 100644
index 75126d2..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/autosetup/test-tclsh
+++ /dev/null
@@ -1,20 +0,0 @@
-# A small Tcl script to verify that the chosen
-# interpreter works. Sometimes we might e.g. pick up
-# an interpreter for a different arch.
-# Outputs the full path to the interpreter
-
-if {[catch {info version} version] == 0} {
-	# This is Jim Tcl
-	if {$version >= 0.72} {
-		# Ensure that regexp works
-		regexp (a.*?) a
-		puts [info nameofexecutable]
-		exit 0
-	}
-} elseif {[catch {info tclversion} version] == 0} {
-	if {$version >= 8.5 && ![string match 8.5a* [info patchlevel]]} {
-		puts [info nameofexecutable]
-		exit 0
-	}
-}
-exit 1

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/bench.tcl
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/bench.tcl b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/bench.tcl
deleted file mode 100644
index f39bef1..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/bench.tcl
+++ /dev/null
@@ -1,580 +0,0 @@
-set batchmode 0
-set benchmarks {}
-
-proc bench {title script} {
-    global benchmarks batchmode
-
-    set Title [string range "$title                     " 0 20]
-
-    set failed [catch {time $script} res]
-    if {$failed} {
-        if {!$batchmode} {puts "$Title - This test can't run on this interpreter ($res)"}
-        lappend benchmarks $title F
-    } else {
-        set t [expr [lindex $res 0] / 1000]
-        lappend benchmarks $title $t
-        set ts "          $t"
-        set ts [string range $ts [expr {[string length $ts]-10}] end]
-        if {!$batchmode} {puts "$Title -$ts ms per iteration"}
-    }
-    catch { collect }
-}
-
-### BUSY LOOP ##################################################################
-
-proc whilebusyloop {} {
-    set i 0
-    while {$i < 1850000} {
-        set a 2
-	incr i
-    }
-}
-
-proc forbusyloop {} {
-    for {set i 0} {$i < 1850000} {incr i} {
-        set a 2
-    }
-}
-
-### FIBONACCI ##################################################################
-
-proc fibonacci {x} {
-    if {$x <= 1} {
-	expr 1
-    } else {
-	expr {[fibonacci [expr {$x-1}]] + [fibonacci [expr {$x-2}]]}
-    }
-}
-
-### HEAPSORT ###################################################################
-
-set IM 139968
-set IA   3877
-set IC  29573
-
-set last 42
-
-proc make_gen_random {} {
-    global IM IA IC
-    set params [list IM $IM IA $IA IC $IC]
-    set body [string map $params {
-        global last
-        expr {($max * [set last [expr {($last * IA + IC) % IM}]]) / IM}
-    }]
-    proc gen_random {max} $body
-}
-
-proc heapsort {ra_name} {
-    upvar 1 $ra_name ra
-    set n [llength $ra]
-    set l [expr {$n / 2}]
-    set ir [expr {$n - 1}]
-    while 1 {
-        if {$l} {
-            set rra [lindex $ra [incr l -1]]
-        } else {
-	    set rra [lindex $ra $ir]
-	    lset ra $ir [lindex $ra 0]
-	    if {[incr ir -1] == 0} {
-                lset ra 0 $rra
-		break
-            }
-        }
-	set i $l
-	set j [expr {(2 * $l) + 1}]
-        while {$j <= $ir} {
-	    set tmp [lindex $ra $j]
-	    if {$j < $ir} {
-		if {$tmp < [lindex $ra [expr {$j + 1}]]} {
-		    set tmp [lindex $ra [incr j]]
-		}
-	    }
-            if {$rra >= $tmp} {
-		break
-	    }
-	    lset ra $i $tmp
-	    incr j [set i $j]
-        }
-        lset ra $i $rra
-    }
-}
-
-proc heapsort_main {} {
-    set n 6100
-    make_gen_random
-
-    set data {}
-    for {set i 1} {$i <= $n} {incr i} {
-	lappend data [gen_random 1.0]
-    }
-    heapsort data
-}
-
-### SIEVE ######################################################################
-
-proc sieve {num} {
-    while {$num > 0} {
-	incr num -1
-	set count 0
-	for {set i 2} {$i <= 8192} {incr i} {
-	    set flags($i) 1
-	}
-	for {set i 2} {$i <= 8192} {incr i} {
-	    if {$flags($i) == 1} {
-		# remove all multiples of prime: i
-		for {set k [expr {$i+$i}]} {$k <= 8192} {incr k $i} {
-		    set flags($k) 0
-		}
-		incr count
-	    }
-	}
-    }
-    return $count
-}
-
-proc sieve_dict {num} {
-    while {$num > 0} {
-	incr num -1
-	set count 0
-	for {set i 2} {$i <= 8192} {incr i} {
-	    dict set flags $i 1
-	}
-	for {set i 2} {$i <= 8192} {incr i} {
-	    if {[dict get $flags $i] == 1} {
-		# remove all multiples of prime: i
-		for {set k [expr {$i+$i}]} {$k <= 8192} {incr k $i} {
-		    dict set flags $k 0
-		}
-		incr count
-	    }
-	}
-    }
-    return $count
-}
-
-### ARY ########################################################################
-
-proc ary n {
-    for {set i 0} {$i < $n} {incr i} {
-	set x($i) $i
-    }
-    set last [expr {$n - 1}]
-    for {set j $last} {$j >= 0} {incr j -1} {
-	set y($j) $x($j)
-    }
-}
-
-proc ary_dict n {
-    for {set i 0} {$i < $n} {incr i} {
-	dict set x $i $i
-    }
-    set last [expr {$n - 1}]
-    for {set j $last} {$j >= 0} {incr j -1} {
-	dict set y $j $x($j)
-    }
-}
-
-proc ary_static n {
-    for {set i 0} {$i < $n} {incr i} {
-        set a(b) $i
-        set a(c) $i
-    }
-}
-
-### REPEAT #####################################################################
-
-proc repeat {n body} {
-    for {set i 0} {$i < $n} {incr i} {
-	uplevel 1 $body
-    }
-}
-
-proc use_repeat {} {
-    set x 0
-    repeat {1000000} {incr x}
-}
-
-### UPVAR ######################################################################
-
-proc myincr varname {
-    upvar 1 $varname x
-    incr x
-}
-
-proc upvartest {} {
-    set y 0
-    for {set x 0} {$x < 100000} {myincr x} {
-	myincr y
-    }
-}
-
-### NESTED LOOPS ###############################################################
-
-proc nestedloops {} {
-    set n 10
-    set x 0
-    incr n 1
-    set a $n
-    while {[incr a -1]} {
-	set b $n
-	while {[incr b -1]} {
-	    set c $n
-	    while {[incr c -1]} {
-		set d $n
-		while {[incr d -1]} {
-		    set e $n
-		    while {[incr e -1]} {
-			set f $n
-			while {[incr f -1]} {
-			    incr x
-			}
-		    }
-		}
-	    }
-	}
-    }
-}
-
-### ROTATE #####################################################################
-
-proc rotate {count} {
-    set v 1
-    for {set n 0} {$n < $count} {incr n} {
-	set v [expr {$v <<< 1}]
-    }
-}
-
-### DYNAMICALLY GENERATED CODE #################################################
-
-proc dyncode {} {
-    for {set i 0} {$i < 100000} {incr i} {
-        set script "lappend foo $i"
-        eval $script
-    }
-}
-
-proc dyncode_list {} {
-    for {set i 0} {$i < 100000} {incr i} {
-        set script [list lappend foo $i]
-        eval $script
-    }
-}
-
-### PI DIGITS ##################################################################
-
-proc pi_digits {N} {
- set n [expr {$N * 3}]
- set e 0
- set f {}
- for { set b 0 } { $b <= $n } { incr b } {
-     lappend f 2000
- }
- for { set c $n } { $c > 0 } { incr c -14 } {
-     set d 0
-     set g [expr { $c * 2 }]
-     set b $c
-     while 1 {
-         incr d [expr { [lindex $f $b] * 10000 }]
-         lset f $b [expr {$d % [incr g -1]}]
-         set d [expr { $d / $g }]
-         incr g -1
-         if { [incr b -1] == 0 } break
-         set d [expr { $d * $b }]
-     }
-     append result [string range 0000[expr { $e + $d / 10000 }] end-3 end]
-     set e [expr { $d % 10000 }]
- }
- #puts $result
-}
-
-### EXPAND #####################################################################
-
-proc expand {} {
-    set a [list a b c d e f]
-    for {set i 0} {$i < 100000} {incr i} {
-        lappend b {*}$a
-    }
-}
-
-### MINLOOPS ###################################################################
-
-proc miniloops {} {
-    for {set i 0} {$i < 100000} {incr i} {
-        set sum 0
-        for {set j 0} {$j < 10} {incr j} {
-            # something of more or less real
-            incr sum $j
-        }
-    }
-}
-
-### wiki.tcl.tk/8566 ###########################################################
-
- # Internal procedure that indexes into the 2-dimensional array t,
- # which corresponds to the sequence y, looking for the (i,j)th element.
-
- proc Index { t y i j } {
-     set indx [expr { ([llength $y] + 1) * ($i + 1) + ($j + 1) }]
-     return [lindex $t $indx]
- }
-
- # Internal procedure that implements Levenshtein to derive the longest
- # common subsequence of two lists x and y.
-
- proc ComputeLCS { x y } {
-     set t [list]
-     for { set i -1 } { $i < [llength $y] } { incr i } {
-         lappend t 0
-     }
-     for { set i 0 } { $i < [llength $x] } { incr i } {
-         lappend t 0
-         for { set j 0 } { $j < [llength $y] } { incr j } {
-             if { [string equal [lindex $x $i] [lindex $y $j]] } {
-                 set lastT [Index $t $y [expr { $i - 1 }] [expr {$j - 1}]]
-                 set nextT [expr {$lastT + 1}]
-             } else {
-                 set lastT1 [Index $t $y $i [expr { $j - 1 }]]
-                 set lastT2 [Index $t $y [expr { $i - 1 }] $j]
-                 if { $lastT1 > $lastT2 } {
-                     set nextT $lastT1
-                 } else {
-                     set nextT $lastT2
-                 }
-             }
-             lappend t $nextT
-         }
-     }
-     return $t
- }
-
- # Internal procedure that traces through the array built by ComputeLCS
- # and finds a longest common subsequence -- specifically, the one that
- # is lexicographically first.
-
- proc TraceLCS { t x y } {
-     set trace {}
-     set i [expr { [llength $x] - 1 }]
-     set j [expr { [llength $y] - 1 }]
-     set k [expr { [Index $t $y $i $j] - 1 }]
-     while { $i >= 0 && $j >= 0 } {
-         set im1 [expr { $i - 1 }]
-         set jm1 [expr { $j - 1 }]
-         if { [Index $t $y $i $j] == [Index $t $y $im1 $jm1] + 1
-              && [string equal [lindex $x $i] [lindex $y $j]] } {
-             lappend trace xy [list $i $j]
-             set i $im1
-             set j $jm1
-         } elseif { [Index $t $y $im1 $j] > [Index $t $y $i $jm1] } {
-             lappend trace x $i
-             set i $im1
-         } else {
-             lappend trace y $j
-             set j $jm1
-         }
-     }
-     while { $i >= 0 } {
-         lappend trace x $i
-         incr i -1
-     }
-     while { $j >= 0 } {
-         lappend trace y $j
-         incr j -1
-     }
-     return $trace
- }
-
- # list::longestCommonSubsequence::compare --
- #
- #       Compare two lists for the longest common subsequence
- #
- # Arguments:
- #       x, y - Two lists of strings to compare
- #       matched - Callback to execute on matched elements, see below
- #       unmatchedX - Callback to execute on unmatched elements from the
- #                    first list, see below.
- #       unmatchedY - Callback to execute on unmatched elements from the
- #                    second list, see below.
- #
- # Results:
- #       None.
- #
- # Side effects:
- #       Whatever the callbacks do.
- #
- # The 'compare' procedure compares the two lists of strings, x and y.
- # It finds a longest common subsequence between the two.  It then walks
- # the lists in order and makes the following callbacks:
- #
- # For an element that is common to both lists, it appends the index in
- # the first list, the index in the second list, and the string value of
- # the element as three parameters to the 'matched' callback, and executes
- # the result.
- #
- # For an element that is in the first list but not the second, it appends
- # the index in the first list and the string value of the element as two
- # parameters to the 'unmatchedX' callback and executes the result.
- #
- # For an element that is in the second list but not the first, it appends
- # the index in the second list and the string value of the element as two
- # parameters to the 'unmatchedY' callback and executes the result.
-
- proc compare { x y
-                                                matched
-                                                unmatchedX unmatchedY } {
-     set t [ComputeLCS $x $y]
-     set trace [TraceLCS $t $x $y]
-     set i [llength $trace]
-     while { $i > 0 } {
-         set indices [lindex $trace [incr i -1]]
-         set type [lindex $trace [incr i -1]]
-         switch -exact -- $type {
-             xy {
-                 set c $matched
-                 eval lappend c $indices
-                 lappend c [lindex $x [lindex $indices 0]]
-                 uplevel 1 $c
-             }
-             x {
-                 set c $unmatchedX
-                 lappend c $indices
-                 lappend c [lindex $x $indices]
-                 uplevel 1 $c
-             }
-             y {
-                 set c $unmatchedY
-                 lappend c $indices
-                 lappend c [lindex $y $indices]
-                 uplevel 1 $c
-             }
-         }
-     }
-     return
- }
-
- proc umx { index value } {
-     global lastx
-     global xlines
-     append xlines "< " $value \n
-     set lastx $index
- }
-
- proc umy { index value } {
-     global lasty
-     global ylines
-     append ylines "> " $value \n
-     set lasty $index
- }
-
- proc matched { index1 index2 value } {
-     global lastx
-     global lasty
-     global xlines
-     global ylines
-     if { [info exists lastx] && [info exists lasty] } {
-     #puts "[expr { $lastx + 1 }],${index1}c[expr {$lasty + 1 }],${index2}"
-     #puts -nonewline $xlines
-     #puts "----"
-     #puts -nonewline $ylines
-     } elseif { [info exists lastx] } {
-     #puts "[expr { $lastx + 1 }],${index1}d${index2}"
-     #puts -nonewline $xlines
-     } elseif { [info exists lasty] } {
-     #puts  "${index1}a[expr {$lasty + 1 }],${index2}"
-     #puts -nonewline $ylines
-     }
-     catch { unset lastx }
-     catch { unset xlines }
-     catch { unset lasty }
-     catch { unset ylines }
- }
-
- # Really, we should read the first file in like this:
- #    set f0 [open [lindex $argv 0] r]
- #    set x [split [read $f0] \n]
- #    close $f0
- # But I'll just provide some sample lines:
-
-proc commonsub_test {} {
- set x {}
- for { set i 0 } { $i < 20 } { incr i } {
-     lappend x a r a d e d a b r a x
- }
-
- # The second file, too, should be read in like this:
- #    set f1 [open [lindex $argv 1] r]
- #    set y [split [read $f1] \n]
- #    close $f1
- # Once again, I'll just do some sample lines.
-
- set y {}
- for { set i 0 } { $i < 20 } { incr i } {
-     lappend y a b r a c a d a b r a
- }
-
- compare $x $y matched umx umy
- matched [llength $x] [llength $y] {}
-}
-
-### MANDEL #####################################################################
-
-proc mandel {xres yres infx infy supx supy} {
-    set incremx [expr {(0.0+$supx-$infx)/$xres}]
-    set incremy [expr {(0.0+$supy-$infy)/$yres}]
-
-    for {set j 0} {$j < $yres} {incr j} {
-	set cim [expr {$infy+$incremy*$j}]
-	set line {}
-	for {set i 0} {$i < $xres} {incr i} {
-	    set counter 0
-	    set zim 0
-	    set zre 0
-	    set cre [expr {$infx+$incremx*$i}]
-	    while {$counter < 255} {
-		set dam [expr {$zre*$zre-$zim*$zim+$cre}]
-		set zim [expr {2*$zim*$zre+$cim}]
-		set zre $dam
-		if {$zre*$zre+$zim*$zim > 4} break
-		incr counter
-	    }
-	    # output pixel $i $j
-	}
-    }
-}
-
-### RUN ALL ####################################################################
-
-if {[string compare [lindex $argv 0] "-batch"] == 0} {
-    set batchmode 1
-    set argv [lrange $argv 1 end]
-}
-set ver [lindex $argv 0]
-
-bench {[while] busy loop} {whilebusyloop}
-bench {[for] busy loop} {forbusyloop}
-bench {mini loops} {miniloops}
-bench {fibonacci(25)} {fibonacci 25}
-bench {heapsort} {heapsort_main}
-bench {sieve} {sieve 10}
-bench {sieve [dict]} {sieve_dict 10}
-bench {ary} {ary 100000}
-bench {ary [dict]} {ary_dict 100000}
-bench {ary [static]} {ary_static 1000000}
-bench {repeat} {use_repeat}
-bench {upvar} {upvartest}
-bench {nested loops} {nestedloops}
-bench {rotate} {rotate 100000}
-bench {dynamic code} {dyncode}
-bench {dynamic code (list)} {dyncode_list}
-bench {PI digits} {pi_digits 300}
-bench {expand} {expand}
-bench {wiki.tcl.tk/8566} {commonsub_test}
-bench {mandel} {mandel 60 60 -2 -1.5 1 1.5}
-
-if {$batchmode} {
-    if {$ver == ""} {
-        if {[catch {info patchlevel} ver]} {
-            set ver Jim[info version]
-        }
-    }
-    puts [list $ver $benchmarks]
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/binary.tcl
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/binary.tcl b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/binary.tcl
deleted file mode 100644
index edc6eb1..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/binary.tcl
+++ /dev/null
@@ -1,278 +0,0 @@
-# Implements the 'binary scan' and 'binary format' commands.
-#
-# (c) 2010 Steve Bennett <steveb@workware.net.au>
-#
-# See LICENCE in this directory for licensing.
-
-package require pack
-package require regexp
-
-proc binary {cmd args} {
-	tailcall "binary $cmd" {*}$args
-}
-
-proc "binary format" {formatString args} {
-	set bitoffset 0
-	set result {}
-	# This RE is too unreliable...
-	foreach {conv t u n} [regexp -all -inline {([^[:space:]])(u)?([*0-9]*)} $formatString] {
-		switch -exact -- $t {
-			a -
-			A {
-				set value [binary::nextarg args]
-				set sn [string bytelength $value]
-				if {$n ne "*"} {
-					if {$n eq ""} {
-						set n 1
-					}
-					if {$n > $sn} {
-						# Need to pad the string with spaces or nulls
-						append value [string repeat [dict get {A " " a \x00} $t] $($n - $sn)]
-					}
-				} else {
-					set n $sn
-				}
-				if {$n} {
-					set bitoffset [pack result $value -str $(8 * $n) $bitoffset]
-				}
-			}
-			x {
-				if {$n eq "*"} {
-					return -code error {cannot use "*" in format string with "x"}
-				}
-				if {$n eq ""} {
-					set n 1
-				}
-				loop i 0 $n {
-					set bitoffset [pack result 0 -intbe 8 $bitoffset]
-				}
-			}
-			@ {
-				if {$n eq ""} {
-					return -code error {missing count for "@" field specifier}
-				}
-				if {$n eq "*"} {
-					set bitoffset $(8 * [string bytelength $result])
-				} else {
-					# May need to pad it out
-					set max [string bytelength $result]
-					append result [string repeat \x00 $($n - $max)]
-					set bitoffset $(8 * $n)
-				}
-			}
-			X {
-				if {$n eq "*"} {
-					set bitoffset 0
-				} elseif {$n eq ""} {
-					incr bitoffset -8
-				} else {
-					incr bitoffset $($n * -8)
-				}
-				if {$bitoffset < 0} {
-					set bitoffset 0
-				}
-			}
-			default {
-				if {![info exists ::binary::scalarinfo($t)]} {
-					return -code error "bad field specifier \"$t\""
-				}
-
-				# A scalar (integer or float) type
-				lassign $::binary::scalarinfo($t) type convtype size prefix
-				set value [binary::nextarg args]
-
-				if {$type in {bin hex}} {
-					set value [split $value {}]
-				}
-				set vn [llength $value]
-				if {$n eq "*"} {
-					set n $vn
-				} elseif {$n eq ""} {
-					set n 1
-					set value [list $value]
-				} elseif {$vn < $n} {
-					if {$type in {bin hex}} {
-						# Need to pad the list with zeros
-						lappend value {*}[lrepeat $($n - $vn) 0]
-					} else {
-						return -code error "number of elements in list does not match count"
-					}
-				} elseif {$vn > $n} {
-					# Need to truncate the list
-					set value [lrange $value 0 $n-1]
-				}
-
-				set convtype -$::binary::convtype($convtype)
-
-				foreach v $value {
-					set bitoffset [pack result $prefix$v $convtype $size $bitoffset]
-				}
-				# Now pad out with zeros to the end of the current byte
-				if {$bitoffset % 8} {
-					set bitoffset [pack result 0 $convtype $(8 - $bitoffset % 8) $bitoffset]
-				}
-			}
-		}
-	}
-	return $result
-}
-
-proc "binary scan" {value formatString {args varName}} {
-	# Pops the next arg from the front of the list and returns it.
-	# Throws an error if no more args
-	set bitoffset 0
-	set count 0
-	# This RE is too unreliable...
-	foreach {conv t u n} [regexp -all -inline {([^[:space:]])(u)?([*0-9]*)} $formatString] {
-		set rembytes $([string bytelength $value] - $bitoffset / 8)
-		switch -exact -- $t {
-			a -
-			A {
-				if {$n eq "*"} {
-					set n $rembytes
-				} elseif {$n eq ""} {
-					set n 1
-				}
-				if {$n > $rembytes} {
-					break
-				}
-
-				set var [binary::nextarg varName]
-
-				set result [unpack $value -str $bitoffset $($n * 8)]
-				incr bitoffset $([string bytelength $result] * 8)
-				if {$t eq "A"} {
-					set result [string trimright $result]
-				}
-			}
-			x {
-				# Skip bytes
-				if {$n eq "*"} {
-					set n $rembytes
-				} elseif {$n eq ""} {
-					set n 1
-				}
-				if {$n > $rembytes} {
-					set n $rembytes
-				}
-				incr bitoffset $($n * 8)
-				continue
-			}
-			X {
-				# Back up bytes
-				if {$n eq "*"} {
-					set bitoffset 0
-					continue
-				}
-				if {$n eq ""} {
-					set n 1
-				}
-				if {$n * 8 > $bitoffset} {
-					set bitoffset 0
-					continue
-				}
-				incr bitoffset -$($n * 8)
-				continue
-			}
-			@ {
-				if {$n eq ""} {
-					return -code error {missing count for "@" field specifier}
-				}
-				if {$n eq "*" || $n > $rembytes + $bitoffset / 8} {
-					incr bitoffset $($rembytes * 8)
-				} elseif {$n < 0} {
-					set bitoffset 0
-				} else {
-					set bitoffset $($n * 8)
-				}
-				continue
-			}
-			default {
-				if {![info exists ::binary::scalarinfo($t)]} {
-					return -code error "bad field specifier \"$t\""
-				}
-				# A scalar (integer or float) type
-				lassign $::binary::scalarinfo($t) type convtype size prefix
-				set var [binary::nextarg varName]
-
-				if {$n eq "*"} {
-					set n $($rembytes * 8 / $size)
-				} else {
-					if {$n eq ""} {
-						set n 1
-					}
-				}
-				if {$n * $size > $rembytes * 8} {
-					break
-				}
-
-				if {$type in {hex bin}} {
-					set u u
-				}
-				set convtype -$u$::binary::convtype($convtype)
-
-				set result {}
-				loop i 0 $n {
-					set v [unpack $value $convtype $bitoffset $size]
-					if {$type in {bin hex}} {
-						append result [lindex {0 1 2 3 4 5 6 7 8 9 a b c d e f} $v]
-					} else {
-						lappend result $v
-					}
-					incr bitoffset $size
-				}
-				# Now skip to the end of the current byte
-				if {$bitoffset % 8} {
-					incr bitoffset $(8 - ($bitoffset % 8))
-				}
-			}
-		}
-		uplevel 1 [list set $var $result]
-		incr count
-	}
-	return $count
-}
-
-# Pops the next arg from the front of the list and returns it.
-# Throws an error if no more args
-proc binary::nextarg {&arglist} {
-	if {[llength $arglist] == 0} {
-		return -level 2 -code error "not enough arguments for all format specifiers"
-	}
-	set arglist [lassign $arglist arg]
-	return $arg
-}
-
-set binary::scalarinfo {
-	c {int be 8}
-	s {int le 16}
-	t {int host 16}
-	S {int be 16}
-	i {int le 32}
-	I {int be 32}
-	n {int host 32}
-	w {int le 64}
-	W {int be 64}
-	m {int host 64}
-	h {hex le 4 0x}
-	H {hex be 4 0x}
-	b {bin le 1}
-	B {bin be 1}
-	r {float fle 32}
-	R {float fbe 32}
-	f {float fhost 32}
-	q {float fle 64}
-	Q {float fbe 64}
-	d {float fhost 64}
-}
-set binary::convtype {
-	be intbe
-	le intle
-	fbe floatbe
-	fle floatle
-}
-if {$::tcl_platform(byteOrder) eq "bigEndian"} {
-	array set binary::convtype {host intbe fhost floatbe}
-} else {
-	array set binary::convtype {host intle fhost floatle}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/bootstrap.tcl
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/bootstrap.tcl b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/bootstrap.tcl
deleted file mode 100644
index e7adf4b..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/bootstrap.tcl
+++ /dev/null
@@ -1,3 +0,0 @@
-# No need for package support in the bootstrap jimsh, but
-# Tcl extensions call package require
-proc package {args} {}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/build-jim-ext
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/build-jim-ext b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/build-jim-ext
deleted file mode 100755
index 4bcb5b5..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/build-jim-ext
+++ /dev/null
@@ -1,255 +0,0 @@
-#!/usr/bin/env jimsh
-
-# Separate command line arguments into options and source files
-set opts {}
-set sources {}
-
-proc usage {{msg {}}} {
-	puts stderr "Usage: build-jim-ext ?--notest? ?--install? ?--static? ?cc-options? ?-o modname? sources..."
-	if {$msg ne ""} {
-		puts stderr \n$msg
-	}
-	exit 1
-}
-
-proc readfile {filename {default_value ""}} {
-	set result $default_value
-	catch {
-		set f [open $filename]
-		set result [$f read -nonewline]
-		$f close
-	}
-	return $result
-}
-
-set linker "cc"
-set testmod 1
-set install 0
-set static 0
-set verbose 0
-set keep 0
-set includepaths {}
-set libpaths {}
-set libs {}
-for {set i 0} {$i < [llength $argv]} {incr i} {
-	set arg [lindex $argv $i]
-	switch -glob -- $arg {
-		*.c {
-			lappend sources $arg
-		}
-		*.cpp {
-			lappend sources $arg
-			set linker "c++"
-		}
-		--notest {
-			set testmod 0
-		}
-		--install {
-			set install 1
-		}
-		--static {
-			set static 1
-		}
-		--verbose {
-			set verbose 1
-		}
-		--keep {
-			set keep 1
-		}
-		--help {
-			usage "Easily builds dynamic (loadable) modules for jim"
-		}
-		-o {
-			incr i
-			set modname [file rootname [lindex $argv $i]]
-			if {$modname eq ""} {
-				usage "Option -o requires an argument"
-			}
-		}
-		-I* {
-			lappend includepaths $arg
-			if {$arg eq "-I"} {
-				lappend includepaths [lindex $argv $i]
-			}
-		}
-		-L* {
-			lappend libpaths $arg
-			if {$arg eq "-L"} {
-				lappend libpaths [lindex $argv $i]
-			}
-		}
-		-l* {
-			lappend libs $arg
-		}
-		-* {
-			lappend opts $arg
-		}
-		default {
-			usage "Unexpected '$arg'"
-		}
-	}
-}
-
-if {$sources eq ""} {
-	usage "No sources provided"
-}
-if {![info exists modname]} {
-	set modname [file rootname [file tail [lindex $sources 0]]]
-	# Remove jim- prefix if one exists
-	regsub "^jim-" $modname "" modname
-}
-
-if {$static} {
-	set target libjim-$modname.a
-} else {
-	set target $modname.so
-}
-puts "Building $target from $sources\n"
-
-# Now add the standard location after any user include paths
-lappend includepaths -I/usr/local/include
-
-set CPPFLAGS "-D_GNU_SOURCE"
-
-set ljim ""
-set shobj_cflags ""
-set shobj_ldflags ""
-if {!$static} {
-	set shobj_cflags "-dynamic -fno-common"
-	if {"1" eq "1"} {
-		puts stderr "Warning: libjim is static. Dynamic module may not work on some platforms.\n"
-		set shobj_ldflags "-bundle -undefined dynamic_lookup"
-	} else {
-		# If shared, link against the shared libjim to resolve symbols
-		set ljim -ljim
-		set shobj_ldflags "-bundle"
-	}
-}
-
-set objs {}
-foreach source $sources {
-	set obj [file rootname [file tail $source]].o
-	if {[string match *.c $source]} {
-		set compiler "cc"
-	} else {
-		set compiler "c++"
-	}
-	set compile "$compiler -g -O2 $CPPFLAGS $shobj_cflags $includepaths $opts -c -o $obj $source"
-	puts "Compile: $obj"
-	lappend objs $obj
-	flush stdout
-	set rc [catch {
-		if {$verbose} {
-			puts $compile
-		}
-		exec 2>jimerr.out {*}$compile
-	} msg]
-
-	set errmsg [readfile jimerr.out]
-	file delete jimerr.out
-
-	if {$rc} {
-		if {!$verbose} {
-			puts stderr $compile
-		}
-		puts stderr $msg
-		if {$errmsg ne ""} {
-			puts stderr $errmsg
-		}
-		file delete {*}$objs
-		exit 1
-	} else {
-		if {$errmsg ne ""} {
-			puts $errmsg
-		}
-	}
-}
-
-if {$static} {
-	set ar "ar cq $target $objs"
-	set ranlib "ranlib $target"
-
-	puts "Ar:      $target"
-	set rc [catch {
-		file delete $target
-		exec {*}$ar
-		exec {*}$ranlib
-		if {$verbose} {
-			puts stderr $ar
-		}
-	} msg]
-
-	file delete {*}$objs
-
-	if {$rc} {
-		puts stderr $ar
-		puts stderr $ranlib
-		puts stderr $msg
-		file delete $target
-		exit 1
-	}
-} else {
-	# Add the standard location after any user lib paths
-	lappend libpaths -L/usr/local/lib
-
-	set link "$linker -g -O2  $shobj_ldflags $libpaths $opts -o $target $objs $ljim  $libs"
-
-	puts "Link:    $target"
-	set rc [catch {
-		if {$verbose} {
-			puts stderr $link
-		}
-		exec 2>jimerr.out {*}$link
-	} msg]
-
-	set errmsg [readfile jimerr.out]
-	file delete jimerr.out
-
-	if {!$keep} {
-		file delete {*}$objs
-	}
-
-	if {$rc} {
-		file delete $target
-		puts stderr $link
-		puts stderr $msg
-		if {$errmsg ne ""} {
-			puts stderr $errmsg
-		}
-		exit 1
-	}
-	if {$errmsg ne ""} {
-		puts $errmsg
-	}
-
-	if {$testmod} {
-		# Now, is testing even possible?
-		# We must be running a compatible jimsh with the load command at least
-		set testmod 0
-		set rc [catch {
-			# This will avoid attempting on Tcl and on jimsh without load
-			# How to tell if we are cross compiling?
-			if {[info version] > 0.73 && [exists -command load]} {
-				set testmod 1
-			}
-		} msg]
-	}
-
-	set rc [catch {
-		if {$testmod} {
-			puts "Test:    load $target"
-			load ./$target
-		}
-		if {$install} {
-			set dest [env DESTDIR ""]/usr/local/lib/jim
-			puts "Install: $target => $dest"
-			file mkdir $dest
-			file copy $target $dest/$target
-		}
-		puts "\nSuccess!"
-	} msg]
-	if {$rc} {
-		puts stderr $msg
-		exit 1
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/build-jim-ext.in
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/build-jim-ext.in b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/build-jim-ext.in
deleted file mode 100644
index 087ec23..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/build-jim-ext.in
+++ /dev/null
@@ -1,255 +0,0 @@
-#!/usr/bin/env jimsh
-
-# Separate command line arguments into options and source files
-set opts {}
-set sources {}
-
-proc usage {{msg {}}} {
-	puts stderr "Usage: build-jim-ext ?--notest? ?--install? ?--static? ?cc-options? ?-o modname? sources..."
-	if {$msg ne ""} {
-		puts stderr \n$msg
-	}
-	exit 1
-}
-
-proc readfile {filename {default_value ""}} {
-	set result $default_value
-	catch {
-		set f [open $filename]
-		set result [$f read -nonewline]
-		$f close
-	}
-	return $result
-}
-
-set linker "@CC@"
-set testmod 1
-set install 0
-set static 0
-set verbose 0
-set keep 0
-set includepaths {}
-set libpaths {}
-set libs {}
-for {set i 0} {$i < [llength $argv]} {incr i} {
-	set arg [lindex $argv $i]
-	switch -glob -- $arg {
-		*.c {
-			lappend sources $arg
-		}
-		*.cpp {
-			lappend sources $arg
-			set linker "@CXX@"
-		}
-		--notest {
-			set testmod 0
-		}
-		--install {
-			set install 1
-		}
-		--static {
-			set static 1
-		}
-		--verbose {
-			set verbose 1
-		}
-		--keep {
-			set keep 1
-		}
-		--help {
-			usage "Easily builds dynamic (loadable) modules for jim"
-		}
-		-o {
-			incr i
-			set modname [file rootname [lindex $argv $i]]
-			if {$modname eq ""} {
-				usage "Option -o requires an argument"
-			}
-		}
-		-I* {
-			lappend includepaths $arg
-			if {$arg eq "-I"} {
-				lappend includepaths [lindex $argv $i]
-			}
-		}
-		-L* {
-			lappend libpaths $arg
-			if {$arg eq "-L"} {
-				lappend libpaths [lindex $argv $i]
-			}
-		}
-		-l* {
-			lappend libs $arg
-		}
-		-* {
-			lappend opts $arg
-		}
-		default {
-			usage "Unexpected '$arg'"
-		}
-	}
-}
-
-if {$sources eq ""} {
-	usage "No sources provided"
-}
-if {![info exists modname]} {
-	set modname [file rootname [file tail [lindex $sources 0]]]
-	# Remove jim- prefix if one exists
-	regsub "^jim-" $modname "" modname
-}
-
-if {$static} {
-	set target libjim-$modname.a
-} else {
-	set target $modname.so
-}
-puts "Building $target from $sources\n"
-
-# Now add the standard location after any user include paths
-lappend includepaths -I@prefix@/include
-
-set CPPFLAGS "-D_GNU_SOURCE"
-
-set ljim ""
-set shobj_cflags ""
-set shobj_ldflags ""
-if {!$static} {
-	set shobj_cflags "@SHOBJ_CFLAGS@"
-	if {"@JIM_STATICLIB@" eq "1"} {
-		puts stderr "Warning: libjim is static. Dynamic module may not work on some platforms.\n"
-		set shobj_ldflags "@SHOBJ_LDFLAGS@"
-	} else {
-		# If shared, link against the shared libjim to resolve symbols
-		set ljim -ljim
-		set shobj_ldflags "@SHOBJ_LDFLAGS_R@"
-	}
-}
-
-set objs {}
-foreach source $sources {
-	set obj [file rootname [file tail $source]].o
-	if {[string match *.c $source]} {
-		set compiler "@CC@"
-	} else {
-		set compiler "@CXX@"
-	}
-	set compile "$compiler @CFLAGS@ $CPPFLAGS $shobj_cflags $includepaths $opts -c -o $obj $source"
-	puts "Compile: $obj"
-	lappend objs $obj
-	flush stdout
-	set rc [catch {
-		if {$verbose} {
-			puts $compile
-		}
-		exec 2>jimerr.out {*}$compile
-	} msg]
-
-	set errmsg [readfile jimerr.out]
-	file delete jimerr.out
-
-	if {$rc} {
-		if {!$verbose} {
-			puts stderr $compile
-		}
-		puts stderr $msg
-		if {$errmsg ne ""} {
-			puts stderr $errmsg
-		}
-		file delete {*}$objs
-		exit 1
-	} else {
-		if {$errmsg ne ""} {
-			puts $errmsg
-		}
-	}
-}
-
-if {$static} {
-	set ar "@AR@ cq $target $objs"
-	set ranlib "@RANLIB@ $target"
-
-	puts "Ar:      $target"
-	set rc [catch {
-		file delete $target
-		exec {*}$ar
-		exec {*}$ranlib
-		if {$verbose} {
-			puts stderr $ar
-		}
-	} msg]
-
-	file delete {*}$objs
-
-	if {$rc} {
-		puts stderr $ar
-		puts stderr $ranlib
-		puts stderr $msg
-		file delete $target
-		exit 1
-	}
-} else {
-	# Add the standard location after any user lib paths
-	lappend libpaths -L@prefix@/lib
-
-	set link "$linker @CFLAGS@ @LDFLAGS@ $shobj_ldflags $libpaths $opts -o $target $objs $ljim @LIBS@ $libs"
-
-	puts "Link:    $target"
-	set rc [catch {
-		if {$verbose} {
-			puts stderr $link
-		}
-		exec 2>jimerr.out {*}$link
-	} msg]
-
-	set errmsg [readfile jimerr.out]
-	file delete jimerr.out
-
-	if {!$keep} {
-		file delete {*}$objs
-	}
-
-	if {$rc} {
-		file delete $target
-		puts stderr $link
-		puts stderr $msg
-		if {$errmsg ne ""} {
-			puts stderr $errmsg
-		}
-		exit 1
-	}
-	if {$errmsg ne ""} {
-		puts $errmsg
-	}
-
-	if {$testmod} {
-		# Now, is testing even possible?
-		# We must be running a compatible jimsh with the load command at least
-		set testmod 0
-		set rc [catch {
-			# This will avoid attempting on Tcl and on jimsh without load
-			# How to tell if we are cross compiling?
-			if {[info version] > 0.73 && [exists -command load]} {
-				set testmod 1
-			}
-		} msg]
-	}
-
-	set rc [catch {
-		if {$testmod} {
-			puts "Test:    load $target"
-			load ./$target
-		}
-		if {$install} {
-			set dest [env DESTDIR ""]@prefix@/lib/jim
-			puts "Install: $target => $dest"
-			file mkdir $dest
-			file copy $target $dest/$target
-		}
-		puts "\nSuccess!"
-	} msg]
-	if {$rc} {
-		puts stderr $msg
-		exit 1
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/config.log
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/config.log b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/config.log
deleted file mode 100644
index d87b29f..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/config.log
+++ /dev/null
@@ -1,63 +0,0 @@
-Invoked as: /Users/marko/tools/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/configure --disable-install-jim --disable-option-checking --prefix=/usr/local --enable-cmsis-dap --enable-openjtag_ftdi --enable-jlink --enable-stlink --cache-file=/dev/null --srcdir=.
-Failed: cc -g -O2 -g0 conftest__.c -o conftest__
-Undefined symbols for architecture x86_64:
-  "_execvpe", referenced from:
-      _main in conftest__-c56ae1.o
-ld: symbol(s) not found for architecture x86_64
-clang: error: linker command failed with exit code 1 (use -v to see invocation)
-child process exited abnormally
-============
-The failed code was:
-extern void execvpe(void);
-int main(void) {
-execvpe();
-return 0;
-}
-============
-Failed: cc -g -O2 -g0 conftest__.c -o conftest__
-Undefined symbols for architecture x86_64:
-  "_sysinfo", referenced from:
-      _main in conftest__-e14a78.o
-ld: symbol(s) not found for architecture x86_64
-clang: error: linker command failed with exit code 1 (use -v to see invocation)
-child process exited abnormally
-============
-The failed code was:
-extern void sysinfo(void);
-int main(void) {
-sysinfo();
-return 0;
-}
-============
-Failed: cc -g -O2 -c -g0 conftest__.c -o conftest__.o
-conftest__.c:3:15: error: '_x' declared as an array with a negative size
-static int _x[sizeof(off_t) == 4 ? 1 : -1] = { 1 };
-              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
-1 error generated.
-child process exited abnormally
-============
-The failed code was:
-#include <sys/types.h>
-int main(void) {
-static int _x[sizeof(off_t) == 4 ? 1 : -1] = { 1 };
-return 0;
-}
-============
-Failed: cc -g -O2 -c -g0 conftest__.c -o conftest__.o
-conftest__.c:4:15: error: too few arguments to function call, expected 2, have 1
-mkdir("/dummy");
-~~~~~         ^
-/usr/include/sys/stat.h:355:1: note: 'mkdir' declared here
-int     mkdir(const char *, mode_t);
-^
-1 error generated.
-child process exited abnormally
-============
-The failed code was:
-#include <sys/types.h>
-#include <sys/stat.h>
-int main(void) {
-mkdir("/dummy");
-return 0;
-}
-============

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/configure
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/configure b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/configure
deleted file mode 100755
index 8367bd8..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/configure
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-dir="`dirname "$0"`/autosetup"
-WRAPPER="$0"; export WRAPPER; exec "`$dir/find-tclsh`" "$dir/autosetup" "$@"

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/configure.ac
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/configure.ac b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/configure.ac
deleted file mode 100644
index b70b5d8..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/configure.ac
+++ /dev/null
@@ -1 +0,0 @@
-# Dummy configure.ac to make automake happy

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/configure.gnu
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/configure.gnu b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/configure.gnu
deleted file mode 100644
index aaaf327..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/configure.gnu
+++ /dev/null
@@ -1,2 +0,0 @@
--e #!/bin/sh
-exec "`dirname "$0"`/configure" --disable-install-jim "$@"

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/Makefile
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/Makefile b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/Makefile
deleted file mode 100644
index a7cc6d1..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-CFLAGS+= -Wall -g
-CFLAGS+= -I..
-LDLIBS += -L.. -ljim
-
-EXAMPLES=		\
-	jim_command	\
-	jim_hello	\
-	jim_list	\
-	jim_obj		\
-	jim_return
-
-all: $(EXAMPLES)
-
-clean:
-	rm -rf $(EXAMPLES)
-	rm -rf *.core

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/README
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/README b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/README
deleted file mode 100644
index d3fc8be..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/README
+++ /dev/null
@@ -1,36 +0,0 @@
-Jim examples
-============
-BSD 2-clause license, (c) 2010 Wojciech A. Koszek <wkoszek@FreeBSD.org>
-
-
-This directory contains examples of Jim interpreter API. In order to start
-working with Jim API one may just want to copy existing example .c file
-into new file, modify Makefile and start working on a new program.
-
-Existing examples
-=================
-
-jim_command
-	Simple command implementation in Jim's API. Command is then executed
-	in a script encoded within a program.
-
-jim_hello
-	Standard "Hello world!" program.
-
-jim_inline
-	Similar "Hello world!" program, but the result comes from a Tcl
-	script interpreted in Jim. Result is printed back on a terminal.
-
-jim_list
-	Will teach you how to create a list in Jim's API.  Once created,
-	will show how to name and export it, so that variable is visible in
-	the script's source code. Once done, interpretation of separate
-	print.tcl file is presented. As a result, the script can print a
-	list members created from within ANSI C program.
-
-jim_obj
-	Basic object creation in Jim.
-
-jim_return
-	Similar to jim_command example, but implemented command actually
-	returns a value.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_command.c
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_command.c b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_command.c
deleted file mode 100644
index 43dd8f4..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_command.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*-
- * Copyright (c) 2010 Wojciech A. Koszek <wkoszek@FreeBSD.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define JIM_EMBEDDED
-#include <jim.h>
-
-/*
- * Program which we want to get executed.
- */
-#define JIM_PROGRAM	"if {1 < 2} { MySampleCommand sample }"
-
-static int
-MySampleCommandFunc(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
-{
-	const char *str;
-	int len;
-
-	if (argc != 2) {
-		Jim_WrongNumArgs(interp, 1, argv, "string");
-		return (JIM_ERR);
-	}
-
-	str = Jim_GetString(argv[1], &len);
-	assert(str != NULL);
-	printf("%s\n", str);
-
-	return (JIM_OK);
-}
-
-/*
- * Now we try to write big enough code to duplication our array in Jim's
- * list implementation. Later, we try to load a sample script in Tcl that
- * could print our list.
- */
-int
-main(int argc, char **argv)
-{
-	Jim_Interp *interp;
-	int error;
-
-	/* Create an interpreter. */
-	interp = Jim_CreateInterp();
-	assert(interp != NULL && "couldn't create interpreter");
-
-	/* We register base commands, so that we actually implement Tcl. */
-	Jim_RegisterCoreCommands(interp);
-
-	/* And initialise any static extensions */
-	Jim_InitStaticExtensions(interp);
-
-	/* Register our Jim commands. */
-	Jim_CreateCommand(interp, "MySampleCommand", MySampleCommandFunc,
-	    NULL, NULL);
-
-	/* Run a script. */
-	error = Jim_Eval(interp, JIM_PROGRAM);
-	if (error == JIM_ERR) {
-		Jim_MakeErrorMessage(interp);
-		fprintf(stderr, "%s\n", Jim_GetString(Jim_GetResult(interp), NULL));
-		Jim_FreeInterp(interp);
-		exit(EXIT_FAILURE);
-	}
-
-	Jim_FreeInterp(interp);
-	return (EXIT_SUCCESS);
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_hello.c
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_hello.c b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_hello.c
deleted file mode 100644
index 831fcc7..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_hello.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * Copyright (c) 2010 Wojciech A. Koszek <wkoszek@FreeBSD.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <jim.h>
-
-int
-main(int argc, char **argv)
-{
-	Jim_Interp *interp;
-
-	interp = NULL;
-
-	/* Create Jim instance */
-	interp = Jim_CreateInterp();
-	assert(interp != NULL && "couldn't create interpreter!");
-
-	/* We register base commands, so that we actually implement Tcl. */
-	Jim_RegisterCoreCommands(interp);
-
-	/* And initialise any static extensions */
-	Jim_InitStaticExtensions(interp);
-
-
-	/* Print a string to standard output */
-	Jim_Eval(interp, "puts {Hello world!}");
-
-	/* Free the interpreter */
-	Jim_FreeInterp(interp);
-	return (EXIT_SUCCESS);
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_list.c
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_list.c b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_list.c
deleted file mode 100644
index 93999fd..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_list.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*-
- * Copyright (c) 2010 Wojciech A. Koszek <wkoszek@FreeBSD.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define JIM_EMBEDDED
-#include <jim.h>
-
-/*
- * We have a list of sample words in 'C'..
- */
-const char *strings[] = {
-	"simple",
-	"strings",
-	"which",
-	"should",
-	"get",
-	"interpreted",
-	"by",
-	"Jim",
-};
-
-/* 
- * We have macros which let us to easily obtain of array presented above
- */
-#define	ARRAY_SIZE(a)	(sizeof((a)) / sizeof((a)[0]))
-#define	SAMPLE_OBJS	ARRAY_SIZE(strings)
-
-/*
- * Now we try to write big enough code to duplication our array in Jim's
- * list implementation. Later, we try to load a sample script in Tcl that
- * could print our list.
- */
-int
-main(int argc, char **argv)
-{
-	Jim_Interp *interp;
-	Jim_Obj	*obj[SAMPLE_OBJS];
-	Jim_Obj	*list;
-	int i;
-	int error;
-
-	/* Create an interpreter */
-	interp = Jim_CreateInterp();
-
-	/* We register base commands, so that we actually implement Tcl. */
-	Jim_RegisterCoreCommands(interp);
-
-	/* And initialise any static extensions */
-	Jim_InitStaticExtensions(interp);
-
-	/* Create an empty list */
-	list = Jim_NewListObj(interp, NULL, 0);
-	assert(list != NULL);
-
-	/*
-	 * For each string..
-	 */
-	for (i = 0; i < SAMPLE_OBJS; i++) {
-		/* Duplicate it as an array member. */
-		obj[i] = Jim_NewStringObj(interp, strings[i], -1);
-		assert(obj[i] != NULL);
-
-		/* We append newly created object to the list */
-		Jim_ListAppendElement(interp, list, obj[i]);
-	}
-
-	/* 
-	 * We bind a Tcl's name with our list, so that Tcl script can
-	 * identify the variable.
-	 */
-	Jim_SetVariableStr(interp, "MYLIST", list);
-
-	/*
-	 * Parse a script
-	 */
-	error = Jim_EvalFile(interp, "./print.tcl");
-	if (error == JIM_ERR) {
-		Jim_MakeErrorMessage(interp);
-		fprintf(stderr, "%s\n", Jim_GetString(Jim_GetResult(interp), NULL));
-	}
-	Jim_FreeInterp(interp);
-	return (EXIT_SUCCESS);
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_obj.c
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_obj.c b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_obj.c
deleted file mode 100644
index 91d1e84..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_obj.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * Copyright (c) 2010 Wojciech A. Koszek <wkoszek@FreeBSD.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define JIM_EMBEDDED
-#include <jim.h>
-
-#define	OBJ_DESC	"hello world"
-
-int
-main(int argc, char **argv)
-{
-	Jim_Interp *interp;
-	Jim_Obj *obj;
-	const char *obj_desc;
-	int obj_size;
-
-	obj = NULL;
-	obj_desc = NULL;
-	obj_size = -1;
-
-	/* Create an interpreter */
-	interp = Jim_CreateInterp();
-
-	/* We register base commands, so that we actually implement Tcl. */
-	Jim_RegisterCoreCommands(interp);
-
-	/* And initialise any static extensions */
-	Jim_InitStaticExtensions(interp);
-
-	/* Create a string object */
-	obj = Jim_NewStringObj(interp, OBJ_DESC, strlen(OBJ_DESC));
-
-	/* Obtain internal representation of an object */
-	obj_desc = Jim_GetString(obj, &obj_size);
-	assert(obj_desc != NULL && "Jim should return NULL as a description");
-	printf("Object described as '%s'; object size is %d\n", obj_desc,
-	    obj_size);
-
-	Jim_FreeObj(interp, obj);
-	Jim_FreeInterp(interp);
-
-	return (EXIT_SUCCESS);
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_return.c
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_return.c b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_return.c
deleted file mode 100644
index 6ad1735..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/jim_return.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*-
- * Copyright (c) 2010 Wojciech A. Koszek <wkoszek@FreeBSD.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define JIM_EMBEDDED
-#include <jim.h>
-
-/*
- * Program which we want to get executed.
- */
-#define JIM_PROGRAM	"set l [CountChars Sample]; puts $l"
-
-/*
- * Our function.
- */
-static int
-CountCharsFunc(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
-{
-	if (argc != 2) {
-		Jim_WrongNumArgs(interp, 1, argv, "string");
-		return (JIM_ERR);
-	}
-	Jim_SetResult(interp, Jim_NewIntObj(interp, Jim_Length(argv[1])));
-	return (JIM_OK);
-}
-
-/*
- * Now we try to write big enough code to duplication our array in Jim's
- * list implementation. Later, we try to load a sample script in Tcl that
- * could print our list.
- */
-int
-main(int argc, char **argv)
-{
-	Jim_Interp *interp;
-	int error;
-
-	/* Create an interpreter. */
-	interp = Jim_CreateInterp();
-	assert(interp != NULL && "couldn't create interpreter");
-
-	/* We register base commands, so that we actually implement Tcl. */
-	Jim_RegisterCoreCommands(interp);
-
-	/* And initialise any static extensions */
-	Jim_InitStaticExtensions(interp);
-
-
-	/* Register our Jim command. */
-	Jim_CreateCommand(interp, "CountChars", CountCharsFunc,
-	    NULL, NULL);
-
-	/* Run a script. */
-	error = Jim_Eval(interp, JIM_PROGRAM);
-	if (error == JIM_ERR) {
-		Jim_MakeErrorMessage(interp);
-		fprintf(stderr, "%s\n", Jim_GetString(Jim_GetResult(interp), NULL));
-		Jim_FreeInterp(interp);
-		exit(EXIT_FAILURE);
-	}
-
-	Jim_FreeInterp(interp);
-	return (EXIT_SUCCESS);
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/print.tcl
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/print.tcl b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/print.tcl
deleted file mode 100644
index e05d48b..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.api/print.tcl
+++ /dev/null
@@ -1,5 +0,0 @@
-puts "-- List present in an array constructed from C program --"
-foreach {str} $MYLIST {
-	puts $str
-}
-puts "---------------------------------------------------------"

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.ext/Makefile
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.ext/Makefile b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.ext/Makefile
deleted file mode 100644
index fa5cfc6..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.ext/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-# Note that if cross compiling, build with:
-#
-#   make NOTEST=1
-#
-# to avoid trying to load the resulting module.
-# Also note that you will need a build-host version of jimsh in the
-# PATH in order to build the extension.
-
-# Prefer jimsh in the PATH because it is more likely to be built
-# for the build-host rather than the target.
-
-ifdef NOTEST
-BUILDOPTS := --notest
-endif
-
-export PATH := $(PATH):..
-
-all: helloworld.so
-
-helloworld.so: helloworld.c
-	../build-jim-ext -I.. -L.. $(BUILDOPTS) $^
-
-# Note: Currently we don't attempt to set LD_LIBRARY_PATH or equivalent
-
-test:
-	JIMLIB=. ../jimsh -e 'package require helloworld; hello'
-
-clean:
-	rm -f *.o *.so

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.ext/README
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.ext/README b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.ext/README
deleted file mode 100644
index 2317481..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.ext/README
+++ /dev/null
@@ -1,7 +0,0 @@
-This directory contains examples of C extensions for Jim.
-
-In general, do:
-
-  build-jim-ext extsource.c
-
-See the Makefile

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.ext/helloworld.c
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.ext/helloworld.c b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.ext/helloworld.c
deleted file mode 100644
index 371a23d..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples.ext/helloworld.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-  * hello.c -- A minimal Jim C extension.
-  */
-#include <jim.h>
-
-static int
-Hello_Cmd(Jim_Interp *interp, int objc, Jim_Obj *const objv[])
-{
-    Jim_SetResultString(interp, "Hello, World!", -1);
-    return JIM_OK;
-}
-
-/*
- * Jim_helloworldInit -- Called when Jim loads your extension.
- *
- * Note that the name *must* correspond exactly to the name of the extension:
- *  Jim_<extname>Init
- */
-int
-Jim_helloworldInit(Jim_Interp *interp)
-{
-    Jim_CreateCommand(interp, "hello", Hello_Cmd, NULL, NULL);
-    return JIM_OK;
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples/certificate.pem
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples/certificate.pem b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples/certificate.pem
deleted file mode 100644
index 9d7ac23..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples/certificate.pem
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICLDCCAdYCAQAwDQYJKoZIhvcNAQEEBQAwgaAxCzAJBgNVBAYTAlBUMRMwEQYD
-VQQIEwpRdWVlbnNsYW5kMQ8wDQYDVQQHEwZMaXNib2ExFzAVBgNVBAoTDk5ldXJv
-bmlvLCBMZGEuMRgwFgYDVQQLEw9EZXNlbnZvbHZpbWVudG8xGzAZBgNVBAMTEmJy
-dXR1cy5uZXVyb25pby5wdDEbMBkGCSqGSIb3DQEJARYMc2FtcG9AaWtpLmZpMB4X
-DTk2MDkwNTAzNDI0M1oXDTk2MTAwNTAzNDI0M1owgaAxCzAJBgNVBAYTAlBUMRMw
-EQYDVQQIEwpRdWVlbnNsYW5kMQ8wDQYDVQQHEwZMaXNib2ExFzAVBgNVBAoTDk5l
-dXJvbmlvLCBMZGEuMRgwFgYDVQQLEw9EZXNlbnZvbHZpbWVudG8xGzAZBgNVBAMT
-EmJydXR1cy5uZXVyb25pby5wdDEbMBkGCSqGSIb3DQEJARYMc2FtcG9AaWtpLmZp
-MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAL7+aty3S1iBA/+yxjxv4q1MUTd1kjNw
-L4lYKbpzzlmC5beaQXeQ2RmGMTXU+mDvuqItjVHOK3DvPK7lTcSGftUCAwEAATAN
-BgkqhkiG9w0BAQQFAANBAFqPEKFjk6T6CKTHvaQeEAsX0/8YHPHqH/9AnhSjrwuX
-9EBc0n6bVGhN7XaXd6sJ7dym9sbsWxb+pJdurnkxjx4=
------END CERTIFICATE-----

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0a2f3c5b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples/client-server.tcl
----------------------------------------------------------------------
diff --git a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples/client-server.tcl b/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples/client-server.tcl
deleted file mode 100644
index 01b1ed2..0000000
--- a/os/tutorials/downloads/openocd-code-89bf96ffe6ac66c80407af8383b9d5adc0dc35f4/jimtcl/examples/client-server.tcl
+++ /dev/null
@@ -1,83 +0,0 @@
-proc bgerror {msg} {
-	puts "bgerror: $msg"
-	#exit 0
-}
-
-proc verbose {msg} {
-	puts $msg
-}
-
-if {[os.fork] == 0} {
-	verbose "child: waiting a bit"
-
-	# This will be our client
-
-	sleep .1
-
-	set f [socket stream localhost:9876]
-	fconfigure $f -buffering line
-
-	set done 0
-
-	proc onread {f} {
-		if {[$f gets buf] > 0} {
-			verbose "child: read response '$buf'"
-		} else {
-			verbose "child: read got eof"
-			set ::done 1
-		}
-	}
-
-	proc onwrite {f} {
-		verbose "child: sending request"
-		$f puts -nonewline "GET / HTTP/1.0\r\n\r\n"
-		$f writable {}
-	}
-
-	$f writable [list onwrite $f]
-	$f readable [list onread $f]
-
-	alarm 10
-	catch -signal {
-		verbose "child: in event loop"
-		vwait done
-		verbose "child: done event loop"
-	}
-	alarm 0
-	$f close
-	exit 0
-}
-
-verbose "parent: opening socket"
-set done 0
-
-# This will be our server
-set f [socket stream.server 0.0.0.0:9876]
-
-proc server_onread {f} {
-	verbose "parent: onread (server) got connection on $f"
-	set cfd [$f accept]
-	verbose "parent: onread accepted $cfd"
-
-	verbose "parent: read request '[string trim [$cfd gets]]'"
-
-	$cfd puts "Thanks for the request"
-	$cfd close
-
-	verbose "parent: sent response"
-
-	incr ::done
-}
-
-$f readable [list server_onread $f]
-
-alarm 10
-catch -signal {
-	vwait done
-}
-alarm 0
-$f close
-
-sleep .5
-
-return "ok"


Mime
View raw message