From 9adc7f2bcff873f58132d021ef0e02529e390643 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Fri, 1 Nov 2024 18:10:20 +0100 Subject: [PATCH] fix tabs --- core/sys/posix/dirent.odin | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/core/sys/posix/dirent.odin b/core/sys/posix/dirent.odin index 836800397..73351b29d 100644 --- a/core/sys/posix/dirent.odin +++ b/core/sys/posix/dirent.odin @@ -30,12 +30,12 @@ foreign lib { panic(string(posix.strerror(posix.errno()))) } defer posix.free(list) - + entries := list[:ret] - for entry in entries { - log.info(entry) - posix.free(entry) - } + for entry in entries { + log.info(entry) + posix.free(entry) + } [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/scandir.html ]] */ @@ -90,16 +90,16 @@ foreign lib { Returns nil when the end is reached or an error occurred (which sets errno). Example: - posix.set_errno(.NONE) - entry := posix.readdir(dirp) - if entry == nil { - if errno := posix.errno(); errno != .NONE { - panic(string(posix.strerror(errno))) - } else { - fmt.println("end of directory stream") - } - } else { - fmt.println(entry) + posix.set_errno(.NONE) + entry := posix.readdir(dirp) + if entry == nil { + if errno := posix.errno(); errno != .NONE { + panic(string(posix.strerror(errno))) + } else { + fmt.println("end of directory stream") + } + } else { + fmt.println(entry) } [[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html ]]