あとパッケージ類も、最新のバージョンではなかったりする。
今のところkbs.tclでは自動的にダウンロードができない(fossil.exeを使えばよいのだが。) 一時的な回避策として、ローカルウェブサーバを立ててダウンロードさせる必要があった。
| proc stringfy_version {bin} { | |
| binary scan $bin s4 v | |
| foreach {fv2 fv1 fv4 fv3} $v break | |
| set fv "$fv1.$fv2.$fv3.$fv4" | |
| return $fv | |
| } | |
| proc binary_version {v} { | |
| foreach {fv1 fv2 fv3 fv4} [split $v .] break | |
| binary format s4 [list $fv2 $fv1 $fv4 $fv3] |
| set d [dict create] | |
| set str1 "abcdefghijklmnopqrstuvwxyz" | |
| for {set i 0} {$i < 10000} {incr i} { | |
| set str2 [format "${str1}%4d" $i] | |
| set ary($i) $str2 | |
| dict set d $i $str2 | |
| } | |
| proc test1 {_ary} { |
あとパッケージ類も、最新のバージョンではなかったりする。
今のところkbs.tclでは自動的にダウンロードができない(fossil.exeを使えばよいのだが。) 一時的な回避策として、ローカルウェブサーバを立ててダウンロードさせる必要があった。
| #! /bin/sh | |
| ## | |
| # @file kbs.tcl | |
| # Kitgen Build System | |
| # @mainpage | |
| # @synopsis{kbs.tcl ?-option? .. ?command? ..} | |
| # | |
| # For available options and commands see help() or type './kbs.tcl help'. | |
| # Online documentation can be found at http://wiki.tcl.tk/18146 | |
| # |
| using System; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; | |
| using System.IO; | |
| namespace TestGetPrivateProfileSectionNames | |
| { | |
| public class Program | |
| { | |
| [DllImport("kernel32.dll")] |
| proc read_inifile_section_names {f} { | |
| set sections {} | |
| set ch [open $f r] | |
| while {[gets $ch line] != -1} { | |
| if {[regexp {^\[(.+)\]$} $line -> section]} { | |
| lappend sections $section | |
| } | |
| } | |
| close $ch | |
| return $sections |
| proc reformat {tclcode {pad 4}} { | |
| set lines [split $tclcode \n] | |
| set out "" | |
| set continued no | |
| set oddquotes 0 | |
| set line [lindex $lines 0] | |
| set indent [expr {([string length $line]-[string length [string trimleft $line \ \t]])/$pad}] | |
| set pad [string repeat " " $pad] | |
| foreach orig $lines { |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| def accum(n, x, y) | |
| t,s=STDIN.gets.split.map(&:to_i) | |
| case t | |
| when 1 | |
| x+=s | |
| when 2 | |
| y+=s | |
| when 3 | |
| sum=x+y | |
| x=x-s*x/sum |
| proc backtrace {} { | |
| set frames [list] | |
| for {set i 1} {$i < [info level]} {incr i} { | |
| lappend frames [dict get [info frame $i] cmd] | |
| } | |
| return $frames | |
| } |