Adjustments to offset convention (don't want 1s based addresssing to mess with the spec defined encoding)

This commit is contained in:
ed
2026-07-21 20:52:13 -04:00
parent e70361b548
commit f6b4d9895e
4 changed files with 101 additions and 101 deletions
+3 -3
View File
@@ -228,7 +228,9 @@ end
-- Section 3: I/O primitives
-- ════════════════════════════════════════════════════════════════════════════
-- TODO(Ed): Review - Convert to use lfs, or remove if not utilized.
-- File contents intentionally use io.open below. LuaFileSystem handles path
-- metadata, directory iteration, the current directory, and mkdir; it does not
-- expose file-content read/write streams.
function M.read_file(path)
local f = io.open(path, "r")
if not f then error("Cannot open " .. path) end
@@ -236,14 +238,12 @@ function M.read_file(path)
return content
end
-- TODO(Ed): Review - Convert to use lfs, or remove if not utilized.
function M.write_file(path, content)
local f = io.open(path, "w")
if not f then error("Cannot write " .. path) end
f:write(content); f:close()
end
-- TODO(Ed): Review - Convert to use lfs, or remove if not utilized.
-- Write content to disk in binary mode so LF line endings are preserved on Windows
-- (text mode would convert LF -> CRLF, breaking byte-identical diffs against git-tracked gen/*.h files which are stored as LF).
-- @param path string