File: _backwards_compatibility.tcl

package info (click to toggle)
openmsx 21.0%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: forky
  • size: 28,132 kB
  • sloc: cpp: 244,928; xml: 54,344; tcl: 15,603; python: 5,335; perl: 281; sh: 78; makefile: 57
file content (21 lines) | stat: -rw-r--r-- 903 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Provide 'quit' command for backwards compatibility. The preferred command is
# now 'exit'. Tcl normally only has a 'exit' command. Also most shells have
# exit but no quit.
proc quit {} {
	# wouter: I prefer to not deprecate this, because I occasionally still
	# use this myself.
	exit
}

proc decr {var {num 1}} {
	puts stderr "This command ('decr $var $num') has been deprecated (and may be removed in a future release), please use 'incr $var -$num' instead!"
	uplevel incr $var [expr {-$num}]
}
proc restoredefault {var} {
	puts stderr "This command ('restoredefault $var') has been deprecated (and may be removed in a future release), please use 'unset $var' instead!"
	uplevel unset $var
}
proc alias {cmd body} {
	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"
	proc $cmd {} $body
}