[tcl] replaced ext_ with int_ prefix

This commit is contained in:
Luxferre
2026-06-13 13:36:32 +03:00
parent d113eff60f
commit b792bcfc5d
+12 -12
View File
@@ -259,7 +259,7 @@ proc lttb_EN {stmt} {
# Interactive-only routines start here
proc ext_LIST {} {
proc int_LIST {} {
global progmem
loop i 1 32768 {
if {[dict exists $progmem $i]} {
@@ -268,7 +268,7 @@ proc ext_LIST {} {
}
}
proc ext_RUN {} {
proc int_RUN {} {
global progmem ip
set ip 1
while {$ip > 0 && $ip < 32768} {
@@ -277,20 +277,20 @@ proc ext_RUN {} {
}
}
proc ext_CLEAR {} {
proc int_CLEAR {} {
global progmem callstack vars ip
lassign {{} {} {} 0} progmem callstack vars ip
loop i 65 91 {set vars([format {%c} $i]) 0}
}
proc ext_LOAD {fname} {
proc int_LOAD {fname} {
if {$fname eq {}} {
puts -nonewline "File name? "
stdout flush
stdin gets fname
}
if {[file exists $fname]} {
ext_CLEAR
int_CLEAR
set fh [open $fname r]
while {![eof $fh]} {
$fh gets progline
@@ -302,7 +302,7 @@ proc ext_LOAD {fname} {
} else {puts {Given file doesn't exist, skipping!}}
}
proc ext_SAVE {} {
proc int_SAVE {} {
global progmem
puts -nonewline "File name? "
stdout flush
@@ -327,7 +327,7 @@ puts {-----------------------------
All wrongs reserved
-----------------------------}
if {$argc > 0} {ext_LOAD [lindex $argv 0]} else {ext_CLEAR}
if {$argc > 0} {int_LOAD [lindex $argv 0]}
while {1} {
puts -nonewline {> }
@@ -335,11 +335,11 @@ while {1} {
set cmd [string toupper [string trim [stdin gets]]]
switch -exact -- $cmd {
BYE {puts "Bye!"; break}
RUN {ext_RUN; continue}
LIST {ext_LIST; continue}
NEW - CLEAR {ext_CLEAR; continue}
LOAD {ext_LOAD {}; continue}
SAVE {ext_SAVE; continue}
RUN {int_RUN; continue}
LIST {int_LIST; continue}
NEW - CLEAR {int_CLEAR; continue}
LOAD {int_LOAD {}; continue}
SAVE {int_SAVE; continue}
default {lttb_proginput $cmd}
}
}