Commit graph

71 commits

Author SHA1 Message Date
Turiiya
8aa9314a99
vlib: refactor empty string checks to use s == '' or s != '', instead of s.len == 0 (#21300) 2024-04-18 02:44:31 +03:00
Felipe Pena
3db7b44894
os: fix double free in os.get_raw_line() (used by os.input), with -autofree (#21204) 2024-04-08 18:48:05 +03:00
Turiiya
f77bb32044
all: fix typos (#21089) 2024-03-25 12:18:27 +02:00
syrmel
410bd9db71
os: refactor to use os.stat and os.lstat instead of unsafe C calls (#20759) 2024-02-08 19:27:49 +02:00
syrmel
b7b47fe130
os: make os.SystemError struct public so the os.error_* functions can be used by other modules (#20754) 2024-02-08 13:20:50 +02:00
syrmel
382d7658cd
os: add error_posix() and error_win32() for explicit platform error handling and default behavior (#20694) 2024-01-31 07:25:07 +02:00
Delyan Angelov
bf7b29a53b
os: improve os.executable() on OpenBSD (#20356) 2024-01-02 22:12:03 +02:00
Delyan Angelov
8359df0a01
os: small cleanup in the FreeBSD branch of os.executable/0: use fixed array for the sysctl params, instead of allocating a dynamic one (#20353) 2024-01-02 19:39:33 +02:00
Delyan Angelov
de3b2b00a3
os, net.http.file: add a folder listing to the http static file server, started by file.serve/1 (#20192) 2023-12-16 08:06:30 +02:00
Turiiya
5b74f3af3e
vlib: use the builtin flush functions, instead of the C. ones (#20108) 2023-12-07 18:24:27 +02:00
gym603
dc3ea0f87f
os: flush stdout and stderr before calling _wsystem (on windows), as the MSDN doc advices (#20034) 2023-11-29 19:25:41 +02:00
Turiiya
b088f43033
os: update comments (#19989) 2023-11-26 09:39:51 +03:00
Alexander Medvednikov
f09826e928 all: unwrap const() blocks 2023-11-25 10:02:51 +03:00
Joe C
757929392e
all: update attributes to use new syntax 2023-11-15 16:16:01 +11:00
Turiiya
9051ac8921
all: fix typos (#19634) 2023-10-23 21:21:15 +03:00
Delyan Angelov
eb82a72012
ci: vfmt vlib/os/process_windows.c.v and vlib/os/os.c.v 2023-10-16 01:48:35 +03:00
Delyan Angelov
f54f156d25 clipboard: fix v -cstrict -cc gcc vlib/clipboard/clipboard_test.v 2023-10-15 21:21:29 +03:00
Alexander Medvednikov
545ee1ae23 checker: stricter rules for C types; C aliases; sokol fixes 2023-10-14 18:31:44 +03:00
Delyan Angelov
24278d82ba
os, v.builder: show more details, when a program ran by v run file.v, exits by a signal (fix #19412) (#19471) 2023-09-29 22:02:59 +03:00
Kim Shrier
b4d0e12c4c
os: include sys/sysctl.h on FreeBSD to avoid implicit definition of sysctl function (#19293) 2023-09-07 16:08:18 +03:00
yuyi
18e60e77de
fmt: remove inline comments (#19263) 2023-09-03 23:51:56 +03:00
Turiiya
f755118e7c
vlib: update doc comments (#19231) 2023-08-30 08:50:00 +03:00
Delyan Angelov
4c9c515f8b
parser: remove hardcoded check for function calls for C.stat, C.sigaction, etc (#18535) 2023-06-24 08:03:12 +03:00
yuyi
caee3935a5
os: fix truncate() on windows (#18262) 2023-05-25 14:37:53 +03:00
yuyi
190f5c69ea
os: fix open_file() on windows (fix #18245) (#18253) 2023-05-25 02:50:52 +02:00
Felipe Pena
13b4cd9d58
os: fix memleak from getline on Linux (#18022) 2023-04-26 22:02:09 +03:00
l-m
0625caad56
wasm: add a webassembly compiler backend, based on using binaryen (#17368) 2023-02-28 23:58:53 +02:00
Thomas Peißl
3aeb6179b7
os: rework mv so it works with different partitions (add fallback to os.mv_by_cp + tests) (#17065) 2023-01-22 19:02:04 +02:00
Thomas Peißl
ba1b31700e
os: add hint for mv_by_cp to mv (#17036) 2023-01-19 16:50:57 +02:00
yuyi
ef5be22f81
all: replace generic <> with [] - part 2 (#16536) 2022-11-26 18:23:26 +02:00
Delyan Angelov
9bb1867be0
os: refactor err == IError(os.Eof{}) to err is os.Eof 2022-11-16 00:53:45 +02:00
yuyi
017ace6ea7
vfmt: change all '$expr' to '${expr}' (#16428) 2022-11-15 16:53:13 +03:00
Delyan Angelov
71bff213ef
builtin: make the C. WIN32 API declarations more precise, to catch errors earlier (#16090) 2022-10-17 20:23:33 +03:00
yuyi
f6844e9766
all: change optional to result of io (#16075) 2022-10-16 09:28:57 +03:00
Dominik Pytlewski
721328ef58
os: fix os.read_file and os.read_bytes for 0 sized /proc/ files on Linux (fix #15852) (#15853) 2022-09-25 22:54:46 +03:00
Delyan Angelov
69c9d47a40
pref,os,sokol,cgen: ease compilation of 2048 with -os wasm32_emscripten (#15820) 2022-09-20 00:17:13 +03:00
Delyan Angelov
a689641c1b
os: rewrite os.walk and os.walk_with_context to use iteration, instead of recursion 2022-08-22 17:27:14 +03:00
Delyan Angelov
7ed3389fa8
ci: fix -cstrict checks after 7585e86 2022-08-17 18:40:15 +03:00
Delyan Angelov
7585e86868 os: reduce heap allocations done by os.real_path, os.executable, os.getwd 2022-08-17 17:06:38 +03:00
Bastian Buck
4ab72ccb69
os: add a security advisory for potential TOCTOU risks when using os.is_writable, os.is_executable etc (#15222) 2022-07-26 12:02:48 +03:00
Andrew Compton
f9385f6300
os: make get_raw_line() should not break lines on \r on windows (fix #5900) (#15205) 2022-07-25 08:03:07 +03:00
Alexander Medvednikov
9099594a49 all: wrap up unsafe { nil } (p. 3) 2022-07-21 21:01:30 +03:00
Alexander Medvednikov
819b6f475a os: remove unnecessary unsafes 2022-07-06 07:07:48 +03:00
Alexander Medvednikov
163c7ba2bb checker: stricter []&Type{len:x} check 2022-07-05 23:51:29 +03:00
Wertzui123
c10ba6d81a
os: add .cmd to the list of Windows executable suffixes (#14839) 2022-06-23 20:12:29 +03:00
Wertzui123
587101a1ea
os: fix find_abs_path_of_executable function (on Windows) (#14835) 2022-06-23 03:36:15 +03:00
Daniel Däschle
d679146a80
fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
Alexander Medvednikov
d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
Alexander Medvednikov
014c3c97f0 all: byte => u8 2022-04-15 14:45:52 +03:00
pancake
5369379738
repl: handle exit(n) (#13930) 2022-04-04 16:22:34 +03:00