OXYGENHUB
◆ main openmsx / share / scripts / _backwards_compatibility.tcl
903 B · Tcl · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 1
# Provide 'quit' command for backwards compatibility. The preferred command is
2
# now 'exit'. Tcl normally only has a 'exit' command. Also most shells have
3
# exit but no quit.
4
proc quit {} {
5
	# wouter: I prefer to not deprecate this, because I occasionally still
6
	# use this myself.
7
	exit
8
}
9
10
proc decr {var {num 1}} {
11
	puts stderr "This command ('decr $var $num') has been deprecated (and may be removed in a future release), please use 'incr $var -$num' instead!"
12
	uplevel incr $var [expr {-$num}]
13
}
14
proc restoredefault {var} {
15
	puts stderr "This command ('restoredefault $var') has been deprecated (and may be removed in a future release), please use 'unset $var' instead!"
16
	uplevel unset $var
17
}
18
proc alias {cmd body} {
19
	puts stderr "This command ('alias $cmd $body') has been deprecated (and may be removed in a future release), please define a proc instead: proc $cmd {} $body"
20
	proc $cmd {} $body
21
}