exit 12
}
-proc badoption {msg} {
+proc badoption {} {
variable lastarg
- badusage "unknown option $msg"
+ badusage "unknown option $lastarg"
}
proc next {} {
}
}
-set w 50
-set h 50
-set orientation horizontal
-set bc darkblue
-set bw 1
-
-proc generalarg {} {
- switch -exact $arg {
- -width { set w [next_num] }
- -height { set h [next_num] }
- -horizontal - -vertical { set orientation $arg }
- -borderColour - -borderColor { set bc [next] }
- -borderWidth { set bw [next_num] }
+proc generalarg {arg} {
+ switch -exact -- $arg {
+ -width { set applet::w [next_num] }
+ -height { set applet::h [next_num] }
+ -horizontal - -vertical { set applet::deforient $arg }
+ -borderColour - -borderColor { set applet::border_colour [next] }
+ -borderWidth { set applet::border_width [next_num] }
+ -debug { debug::setup puts }
default { return 0 }
}
return 1