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

41 Commits

Author SHA1 Message Date
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
e9a3817aed checker: disallow enum initalization (#17361) 2023-02-19 22:22:07 +01:00
017ace6ea7 vfmt: change all '$expr' to '${expr}' (#16428) 2022-11-15 16:53:13 +03:00
992b502198 db, json, time, term: change optional to result (#16201) 2022-10-26 11:26:28 +03:00
b584e1df98 checker: allow EnumName(number) casts only inside unsafe{} blocks (#15932) 2022-10-02 22:39:11 +03:00
9099594a49 all: wrap up unsafe { nil } (p. 3) 2022-07-21 21:01:30 +03:00
90197fd58a term.ui: make C. unions and structs public (solve conflicts with term on windows) 2022-07-04 10:50:19 +03:00
c160ba2a8d checker: stricter mutable reference check (fix #14803) (#14805) 2022-06-21 13:23:21 +03:00
0f3b2c2ae7 builtin: use C.fwrite (buffered) for _write_buf_to_fd (#14558) 2022-05-30 19:15:05 +03:00
17bba712bd checker: ban unsafe pointer/fn comparison (#14462) 2022-05-20 18:30:16 +03:00
d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
28ddd8440a term.ui: add support for multi byte/UTF-8 events (#13274) 2022-01-25 14:46:48 +02:00
166dd61e90 Revert "Revert "term: obtain the cursor position via termios.h (#11372)""
This reverts commit 0376cbf6bd.
2021-09-06 19:04:14 +03:00
0376cbf6bd Revert "term: obtain the cursor position via termios.h (#11372)"
This reverts commit af28d09630.
2021-09-06 18:21:55 +03:00
af28d09630 term: obtain the cursor position via termios.h (#11372) 2021-09-06 17:24:39 +03:00
60c880a0cc vlib: use malloc_noscan() where possible (#10465) 2021-06-15 14:47:11 +03:00
453fb1b08b term.ui: use os.signal_opt instead of os.signal 2021-05-18 11:59:57 +03:00
8a380f4699 tools: make v test-cleancode test everything by default (#10050) 2021-05-08 13:32:29 +03:00
14434cc86a all: bare metal support (fix -freestanding) (#9624) 2021-04-14 07:50:50 +02:00
ae6420afc7 tools: fix substring in s usages, preventing v -W build-tools 2021-03-23 13:36:50 +02:00
2d73411396 checker: define missing C fn args & check C & JS args (#8770) 2021-03-05 17:41:11 +03:00
a64d9b3e12 termui: add show_cursor() and hide_cursor() (#9087) 2021-03-04 12:31:26 +02:00
b712af56fd all: bring back panic(err.msg) -> panic(err) (#9022) 2021-03-01 00:18:14 +01:00
d63b7bc35a all: update repo to use the new error handling syntax (#8950) 2021-02-28 23:20:21 +03:00
3a2d696fac time: time.wait() => time.sleep() 2021-02-27 20:41:06 +03:00
ac4791045f time: consolidate the different sleep functions into time.wait(Duration) (#8853) 2021-02-21 17:05:03 +02:00
260f677469 term.ui: use the new [flag] enums (#8881) 2021-02-21 16:07:49 +02:00
ea803113c3 checker: check unsafe V function calls (#8752) 2021-02-14 19:31:42 +01:00
e233911a7b term.ui: native Windows console implementation (#8359) 2021-01-27 13:52:39 +01:00
e5a84719ca all: require calling optfn() ? / optfn() or {...} for fn optfn() ? {} 2021-01-26 16:43:17 +02:00
dbf84520f1 all: update assoc syntax (#8274) 2021-01-22 23:24:48 +01:00
63557d0d02 checker: disallow op= and infix on a voidptr (#7175) 2020-12-07 22:43:38 +02:00
6563535a3d term.ui: simplify/fix the truecolor feature test (#6963) 2020-11-26 23:52:20 +01:00
e03ae19372 term.ui: approximate colors into ansi if rgb isn't supported (#6951) 2020-11-26 00:28:57 +01:00
ac8a2ff12d term.ui: feature-detect the SU spec (#6844) 2020-11-16 14:48:08 +02:00
1ead130eed term.ui: render to the alternate buffer (#6832) 2020-11-14 21:05:22 +02:00
827fb62c29 examples/text_editor: edit multiple files (#6827) 2020-11-14 19:39:59 +02:00
6b47c61fe4 term.ui: handle middle mouse button events and modifier keys (#6821) 2020-11-14 09:14:54 +02:00
c315218ed1 term.ui: allow setting the terminal title (#6809) 2020-11-13 15:30:47 +02:00
f6e54dc027 term.ui: improve Ctrl-Z + fg handling 2020-11-13 10:27:53 +02:00
24f743ee12 term: add term.ui module (part 2) (#6798) 2020-11-12 12:12:51 +01:00