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

17 Commits

Author SHA1 Message Date
Thomas Mangin
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
Delyan Angelov
b13f7118ab
os,term: fix C.tcsetattr declaration (add missing int return type) 2023-02-13 15:16:23 +02:00
Delyan Angelov
6adafbb6ea
term: add a separate term.set_tab_title/1 API for controling the current tab title in emulators like Konsole, that support many tabs 2023-01-14 12:00:39 +02:00
Delyan Angelov
7c571c0945
term: fix set_terminal_title on nix 2023-01-14 11:08:49 +02:00
yuyi
992b502198
db, json, time, term: change optional to result (#16201) 2022-10-26 11:26:28 +03:00
Delyan Angelov
0f3b2c2ae7
builtin: use C.fwrite (buffered) for _write_buf_to_fd (#14558) 2022-05-30 19:15:05 +03:00
Alexander Medvednikov
d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
Delyan Angelov
166dd61e90
Revert "Revert "term: obtain the cursor position via termios.h (#11372)""
This reverts commit 0376cbf6bd.
2021-09-06 19:04:14 +03:00
Alexander Medvednikov
0376cbf6bd Revert "term: obtain the cursor position via termios.h (#11372)"
This reverts commit af28d09630.
2021-09-06 18:21:55 +03:00
AAAA
af28d09630
term: obtain the cursor position via termios.h (#11372) 2021-09-06 17:24:39 +03:00
crthpl
14434cc86a
all: bare metal support (fix -freestanding) (#9624) 2021-04-14 07:50:50 +02:00
Delyan Angelov
d7049ae2da
os: deprecate os.exec (returning ?os.Result), in favour of os.execute, which returns os.Result (#8974) 2021-03-08 20:52:13 +02:00
joe-conigliaro
2d73411396
checker: define missing C fn args & check C & JS args (#8770) 2021-03-05 17:41:11 +03:00
Swastik Baranwal
6de78ecb59
term: implement term.clear() for windows (#8650) 2021-02-09 14:25:31 +02:00
Delyan Angelov
f3732b730a term: replace assert with panic to enable build-module for it too 2020-10-21 08:49:07 +03:00
bpryer
3f7970db52
term: add get_cursor_position and set_terminal_title (#6279)
* added functions

added:
  - get_cursor_position()
  - set_terminal_title(title string)

* implement term.get_cursor_position and term.set_terminal_title on unix

* Cleanup

* make x,y fields of term.Coord mutable

* fix vrepl compilation

* use more descriptive var names in term_test.v

* do not change the current terminal title in dumb terminals; do not test term.set_terminal_title outside of CI

* unix: in term.set_terminal_title, return true even for dumb terminals

Co-authored-by: Brent Pryer <brent@pryermachine.com>
Co-authored-by: Delyan Angelov <delian66@gmail.com>
2020-09-08 22:00:10 +03:00
lutherwenxu
dc4db87be3
vlib: use new filename format 2020-04-11 19:51:32 +02:00