Commit Graph

178 Commits

Author SHA1 Message Date
gingerBill
6616882708 Correct reading from a console on Windows
e.g. `os.read(os.stdin, buf[:])`
2021-11-27 14:59:35 +00:00
gingerBill
c9c197ba08 Add os.read_at_least and os_read_full utility procedures. 2021-11-27 14:57:49 +00:00
Yawning Angel
61c581baeb core/sys/unix: Add syscalls_linux.odin
Linux is in the unfortunate situation where the system call number is
architecture specific.  This consolidates the system call number
definitions in a single location, adds some wrappers, and hopefully
fixes the existing non-portable invocations of the syscall intrinsic.
2021-11-17 14:00:00 +00:00
Jeroen van Rijn
dd88104a81 Fix os.walk for UNC paths. 2021-11-10 14:59:54 +01:00
gingerBill
321d93bff1 Merge branch 'master' into target-js_wasm32 2021-11-09 18:06:19 +00:00
Jeroen van Rijn
0a3b75c5f5 [core:os/os2] Keep -vet happy. 2021-11-09 14:06:14 +01:00
gingerBill
518460af66 Begin work in semi-standardized js_wasm32 target 2021-11-07 19:56:01 +00:00
gingerBill
3224d04df8 Stub out os.open for wasi 2021-10-31 15:22:54 +00:00
gingerBill
c13c30b466 Update wasi to use string and slice types 2021-10-31 15:21:39 +00:00
gingerBill
22982586f1 Add basic support for wasi in package os 2021-10-31 13:45:00 +00:00
gingerBill
9a5216921c Add wasi_wasm32 2021-10-31 01:08:17 +00:00
zhibog
c632125d82 Added a read_entire_file proc that only takes a handle and turned it into a proc group with the one, that takes a path 2021-10-16 18:45:25 +02:00
gingerBill
94a27224b2 Deprecate strings.write_quoted_* in favour of io.write_quoted_*; make reflect.write_type a little more robust with io.Error handling 2021-09-29 13:42:58 +01:00
gingerBill
ee876ad66b Strip semicolons 2021-09-19 11:59:44 +01:00
gingerBill
ceebd7b23c Correct context.allocator usage 2021-09-19 11:59:31 +01:00
Jeroen van Rijn
72fe1e88a3 Make sure to delete on the right allocator. 2021-09-19 12:19:01 +02:00
Ricardo Silva
01aa0c4151 Fix read_dir on OSX 2021-09-13 12:34:36 +01:00
Ricardo Silva
87408aedb5 replace lstat/fstat with lstat64/fstat64 since they return the correct values 2021-09-10 14:18:08 +01:00
Ricardo Silva
43c578d8b7 Fix absolute_path_from_handle on OSX 2021-09-09 17:12:26 +01:00
gingerBill
8ff898079f Minor correct for freebsd 2021-09-08 13:14:23 +01:00
gingerBill
ca33cb990b Strip semicolons in core which were missing 2021-09-08 13:12:38 +01:00
gingerBill
720884e0f1 Strip even more semicolons if followed by a } or ) on the same line 2021-08-31 23:47:57 +01:00
gingerBill
251da264ed Remove unneeded semicolons from the core library 2021-08-31 22:21:13 +01:00
gingerBill
5f29288254 Remove Syscall type 2021-08-29 15:00:35 +01:00
gingerBill
7c108dbf48 Update usage of syscall to use the intrinsics 2021-08-29 14:56:47 +01:00
gingerBill
037cc679c4 Keep -vet happy 2021-08-22 16:58:12 +01:00
gingerBill
445ed9be2b Use multi-pointers when appropriate 2021-08-22 12:54:04 +01:00
gingerBill
f0437a4242 Enforce core:builtin and core:intrinsics for imports 2021-08-21 13:44:16 +01:00
Jeroen van Rijn
bb86b0f526 os: Add Windows 11 detection. 2021-08-21 14:08:22 +02:00
gingerBill
21cbac755e Make or_else and or_return operators (binary and suffix respectively) 2021-08-15 17:14:35 +01:00
gingerBill
19aefa6a40 Add assignment statement to #no_bounds_check etc rules. Correct os_linux.odin usage. 2021-08-15 11:14:34 +01:00
gingerBill
4d00c2b800 Allocator_Error.Mode_Not_Implemented; Minor improvement to map runtime procedures 2021-08-08 14:29:45 +01:00
gingerBill
9b3a0251ca Use or_else in the core library when it makes sense 2021-07-05 16:33:01 +01:00
gingerBill
af95381bf8 Add missing -> ! annotation 2021-06-16 12:12:24 +01:00
gingerBill
9f8a63cb43 More minor stylization changes (remove unneeded parentheses) 2021-06-14 11:34:31 +01:00
gingerBill
86649e6b44 Core library clean up: Make range expressions more consistent and replace uses of .. with ..= 2021-06-14 11:15:25 +01:00
gingerBill
16eaa17ed9 Fix -target:js_wasm32 for core:runtime 2021-06-08 11:20:39 +01:00
gingerBill
ba6c63e366 Fix full_path_from_name allocator behaviour 2021-06-08 10:14:35 +01:00
Daniel Gavin
44ee0f2cdc Merge branch 'master' into prototype-fmt 2021-05-20 12:15:14 +02:00
gingerBill
24c89b3eee Minor change 2021-05-16 00:29:22 +01:00
gingerBill
85e5be03d1 Redesign os2.Error to work with the new extended union behaviour 2021-05-16 00:25:47 +01:00
gingerBill
465b6139d5 Temporarily fix syscall in Linux and Freebsd (eventually to be replaced with a proper implementation) 2021-05-13 12:05:23 +01:00
Daniel Gavin
51b198aa56 Merge remote-tracking branch 'upstream/master' into prototype-fmt 2021-04-27 00:06:30 +02:00
gingerBill
6667b78c12 Correct core:os/os2 mock-up 2021-04-26 22:08:15 +01:00
gingerBill
ad953c4670 Add cast on S_ISDIR 2021-04-24 21:08:15 +01:00
gingerBill
bd31a99bf7 Remove redundant auto_cast 2021-04-23 09:50:26 +01:00
Daniel Gavin
f10f7ebbf1 Merge remote-tracking branch 'upstream/master' into prototype-fmt 2021-04-23 10:24:05 +02:00
gingerBill
e9b1d4f633 Fix #906 2021-04-20 10:34:41 +01:00
gingerBill
f98c4d6837 Improve the Allocator interface to support returning Allocator_Error to allow for safer calls
Virtually all code (except for user-written custom allocators) should work as normal. Extra features will need to be added to make the current procedures support the `Allocator_Error` return value (akin to #optional_ok)
2021-04-19 12:31:31 +01:00
Daniel Gavin
c708f649ec Merge remote-tracking branch 'upstream/master' into prototype-fmt 2021-04-19 02:13:29 +02:00