aboutsummaryrefslogtreecommitdiff
path: root/core/os/errors.odin
Commit message (Collapse)AuthorAgeFilesLines
* Fix up ABI name for core:os and core:os/oldJeroen van Rijn6 days1-1/+1
|
* core:os -> core:os/old && core:os/os2 -> core:osJeroen van Rijn6 days1-214/+43
|
* Move some of the os&os2 errors into `io.Error`; Rename Empty to UnsupportedgingerBill2025-11-141-13/+5
|
* Add bring-your-own-buffer versions of `os.lookup_env` and `os.get_env`Jeroen van Rijn2025-06-161-0/+4
| | | | | | | | | | | | | | | | | And make `core:terminal` use it so that `core:log` can be imported with `-default-to-nil-allocator`, in which the actual allocator is set up in `main()`. Windows was tricky because of the utf-8 <> utf-16 conversion, so we use some temporary stack buffers for that purpose, limiting the non-allocating version there to 512 utf-16 characters each for the key and environment value. In general the value is (obviously) limited to the size of the supplied buffer, and a `.Buffer_Full` error is returned if that buffer is insufficient. If the key is not found, the procedure returns `.Env_Var_Not_Found`. TODO: - Factor out buffer-backed utf8 + utf16 conversion to `core:sys/util` to more easily apply this pattern. - Add similar `lookup_env` and `get_env` procedures to `core:os/os2`. Fixes #5336
* Add `@(require_results)`gingerBill2024-08-041-0/+6
|
* Move errors to where appropriategingerBill2024-08-041-0/+5
|
* Improve `_error_string` for LinuxgingerBill2024-08-041-21/+165
|
* Add read_at/write_at to missing platformsgingerBill2024-08-041-1/+9
|
* Move error stuff to `errors.odin`gingerBill2024-08-041-0/+159