1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

833 Commits

Author SHA1 Message Date
4c9c515f8b parser: remove hardcoded check for function calls for C.stat, C.sigaction, etc (#18535) 2023-06-24 08:03:12 +03:00
caee3935a5 os: fix truncate() on windows (#18262) 2023-05-25 14:37:53 +03:00
190f5c69ea os: fix open_file() on windows (fix #18245) (#18253) 2023-05-25 02:50:52 +02:00
a82fc5bea0 os: make SignalHandler public (#18115) 2023-05-06 14:59:06 +03:00
13b4cd9d58 os: fix memleak from getline on Linux (#18022) 2023-04-26 22:02:09 +03:00
c6947fde57 os: implement Process.set_work_folder/0 to set the initial working folder of the new child process (#17946) 2023-04-13 14:48:32 +03:00
3d99f1f2c2 checker: disallow struct int to ptr outside unsafe (#17923) 2023-04-13 07:38:21 +02:00
580d9cedc7 termios: new termios module (#17792)
* termio: new termio module

move the tcgetattr and tcsetattr functions in a new termio module.
The code needed refactoring as different OS have different fields
size, position and number for the C.termios structure, which
could not be correctly expressed consitently otherwise.

It has the positive side effect to reduce the number of unsafe calls.
New testing code was also added for the readline module as it is
relying of the feature.

* apply 2023 copyright to the new files too
2023-03-30 08:58:52 +03:00
6756d28595 all: 2023 copyright 2023-03-28 22:55:57 +02:00
54a1b66b94 os: add create_no_window parameter to Process (#17726) 2023-03-21 11:24:40 +02:00
daa9034583 os: return the long path for os.temp_dir() on windows, even for folders like c:\someth~1 (#17623) 2023-03-14 00:51:52 +02:00
0bd094292f v: add support for _qnx.c.v overriding _default.c.v (#17611) 2023-03-12 19:48:36 +02:00
784592af83 os: fix typo in os.v (#17519) 2023-03-07 08:30:37 +01:00
17000ef7b6 checker: check option fn returning error (fix #17423) (#17438) 2023-03-02 15:49:50 +02:00
acfd21e4e0 os: add #include <sys/types.h> to debugger_darwin.c.v, to fix bootstrapping on macOS <= 11 (#17446) 2023-03-01 00:06:12 +02:00
l-m
0625caad56 wasm: add a webassembly compiler backend, based on using binaryen (#17368) 2023-02-28 23:58:53 +02:00
15cb18cbd2 os: make hostname and loginname functions return Result (#17414) 2023-02-27 05:21:23 +03:00
612ac69486 ci: fix bootstrapping on macos/freebsd etc 2023-02-21 12:30:35 +02:00
82c4338b76 os: move pub fn debugger_present() bool{ to platform-specific files (better ptrace portability handling) (#17373) 2023-02-21 10:55:03 +02:00
cb976c7e17 os: fix the declaration of C.ptrace (the 4th parameter is a pointer, not an integer) (#17366) 2023-02-20 12:29:49 +02:00
e9a3817aed checker: disallow enum initalization (#17361) 2023-02-19 22:22:07 +01:00
cad2cd5583 docs: fix typos using codespell (#17332) 2023-02-16 11:43:39 +02:00
b13f7118ab os,term: fix C.tcsetattr declaration (add missing int return type) 2023-02-13 15:16:23 +02:00
954843c486 os: fix default result of os.temp_dir() for termux (#17237) 2023-02-07 00:07:35 +02:00
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
f69b994c73 os: properly document os.uname, for both nix and windows 2023-01-22 13:18:28 +02:00
dd55365dee os: cleanup the output of os.uname() on windows (#17066)
* os: (WinOS) mimic current practices of `busybox` and `coreutils`

* os: trim any possible surounding whitespace
2023-01-22 11:59:42 +02:00
ba1b31700e os: add hint for mv_by_cp to mv (#17036) 2023-01-19 16:50:57 +02:00
0109fe66a6 os: make os.FileMode public (#16923) 2023-01-09 22:34:36 +02:00
868908b80d checker: require unsafe for Struct(voidptr) casts 2023-01-06 09:28:11 +03:00
3625a74ec5 os: add test for os.open_append (#16846)
* os: add test for os.open_append

* fix unclosed file in test_eof (it made os.open_append fail only on windows, since it got the previous file content, because the file was locked, and os.rm could not delete it)
2023-01-03 01:11:35 +02:00
b171102b03 os: minor optimization in os.v (#16791) 2022-12-28 10:28:47 +02:00
68883fc4d9 os: fix os.file_ext('/tmp/.gitignore') previously returning '.gitignore' => it now returns '' (#16771) 2022-12-26 12:53:38 +02:00
6a179a2926 checker: add int signedness mismatch checking for function call arguments (#16750) 2022-12-24 06:28:35 +02:00
e419faf746 all: fix dependant->dependent typos, cleanup comments 2022-12-02 12:51:10 +02:00
f16722596c all: replace generic '<>' with '[]' in error messages and comments (#16571) 2022-12-02 09:22:48 +02:00
ef5be22f81 all: replace generic <> with [] - part 2 (#16536) 2022-11-26 18:23:26 +02:00
9bb1867be0 os: refactor err == IError(os.Eof{}) to err is os.Eof 2022-11-16 00:53:45 +02:00
017ace6ea7 vfmt: change all '$expr' to '${expr}' (#16428) 2022-11-15 16:53:13 +03:00
26d643fc5d all: rollback to old interpolation (step 3) (#16380) 2022-11-10 15:05:34 +03:00
ca484430e0 checker: check int overflow for const vars (#16332) 2022-11-06 08:22:28 +03:00
f427a5241a os,tools: add os.vtmp_dir()
Use it to consistently place all temporary files created by tests in a overridable folder specific to the user, that is easy to cleanup later.

NOTE: os.temp_dir() on macos returns `/tmp`, and using `/tmp/v` is a problem when multiple unix users are trying to access/create/write to it.
2022-11-03 10:19:51 +02:00
c6158e4519 all: remove unnecessary IError() casts 2022-10-28 19:08:30 +03:00
a134c09718 os: fix font.v compilation 2022-10-27 11:13:43 +03:00
2083e6b04c os: cleanup APIs returning !bool to either return ! or bool (#16111) 2022-10-20 13:56:06 +03:00
71bff213ef builtin: make the C. WIN32 API declarations more precise, to catch errors earlier (#16090) 2022-10-17 20:23:33 +03:00
556244576d checker: check unused last expression in if (fix #16084) (#16088) 2022-10-17 18:15:01 +03:00
78e9362d74 ci: workaround for a VLS failing test, that stops symbol registration after the first fn()! { 2022-10-16 13:38:20 +03:00
f6844e9766 all: change optional to result of io (#16075) 2022-10-16 09:28:57 +03:00
3e4cfc7343 os: add os.to_slash and os.from_slash functions (#16055) 2022-10-14 10:22:36 +03:00