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