improving fileselector

This commit is contained in:
Irmen de Jong
2024-12-29 23:19:34 +01:00
parent c84cc8f8c9
commit 10b9162dc5
17 changed files with 288 additions and 272 deletions

View File

@@ -21,7 +21,7 @@ dependencies {
// implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
// implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlinx:kotlinx-cli:0.3.6")
implementation("com.michael-bull.kotlin-result:kotlin-result-jvm:2.0.0")
implementation("com.michael-bull.kotlin-result:kotlin-result-jvm:2.0.1")
testImplementation(project(":codeCore"))
testImplementation(project(":intermediate"))
@@ -94,4 +94,4 @@ tasks.compileKotlin {
tasks.compileJava {
dependsOn(tasks.createVersionFile)
}
}

View File

@@ -162,6 +162,9 @@ io_error:
; After the last filename one additional 0 byte is placed to indicate the end of the list.
; Returns number of files (it skips 'dir' entries i.e. subdirectories).
; Also sets carry on exit: Carry clear = all files returned, Carry set = directory has more files that didn't fit in the buffer.
; Note that no list of pointers of some form is returned, the names are just squashed together.
; If you really need a list of pointers to the names, that is pretty straightforward to construct by iterating over the names
; and registering when the next one starts after the 0-byte separator.
uword buffer_start = filenames_buffer
ubyte files_found = 0
filenames_buffer[0]=0

View File

@@ -140,7 +140,10 @@ io_error:
; After the last filename one additional 0 byte is placed to indicate the end of the list.
; Returns number of files (it skips 'dir' entries i.e. subdirectories).
; Also sets carry on exit: Carry clear = all files returned, Carry set = directory has more files that didn't fit in the buffer.
uword buffer_start = filenames_buffer
; Note that no list of pointers of some form is returned, the names are just squashed together.
; If you really need a list of pointers to the names, that is pretty straightforward to construct by iterating over the names
; and registering when the next one starts after the 0-byte separator.
uword buffer_start = filenames_buffer
ubyte files_found = 0
if lf_start_list(pattern_ptr) {
while lf_next_entry() {

View File

@@ -24,6 +24,9 @@ diskio {
; After the last filename one additional 0 byte is placed to indicate the end of the list.
; Returns number of files (it skips 'dir' entries i.e. subdirectories).
; Also sets carry on exit: Carry clear = all files returned, Carry set = directory has more files that didn't fit in the buffer.
; Note that no list of pointers of some form is returned, the names are just squashed together.
; If you really need a list of pointers to the names, that is pretty straightforward to construct by iterating over the names
; and registering when the next one starts after the 0-byte separator.
txt.print("@TODO: list_filenames\n")
sys.clear_carry()
return 0