This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
One of the simplest and most effecient ways of storing a file in memory is | |
with a gap buffer. The file is broken into three parts in one big array: The | |
beginning, the gap and the end. The beginning and end parts are just normal | |
text stored in an array: if the size of the gap is zero, then the buffer | |
looks like a file loaded simply into an array. The gap lets you insert and | |
delete characters without moving any large amount of data. All you have to do | |
is change the size of the gap. You do have to move the gap if it's not at the | |
spot you want to insert or delete, however. If you can get away with it, it's | |
a good idea to always keep the gap at the cursor. (I.E., so moving the cursor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc chdir {} { | |
diska . | |
set ::throttle on | |
} | |
proc remove_all_breaks {} { | |
foreach i [split [debug_list_all_breaks] "\n"] { | |
if [llength $i] {debug remove_bp [lindex $i 0]}} | |
} | |
proc reboot {} { |