Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | refactor(term): feature check, not platform check | Thijs Schreijer | 13 days | 1 | -28/+43 |
| | |||||
* | Reverse conditional compilation of non-POSIX | cos | 2025-02-25 | 1 | -15/+15 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As https://www.openbsd.org/faq/ports/guide.html#PortsGeneric states, it is inappropriate to base feature inclusion on a growing list (60b66fc, 9160d12) of excluded platforms. Thus this commit attempts to switch the assumption from Linux to a modern POSIX as the default target. Firstly, merely checking for __unix__ should be functionally equivalent of having a long lists of practically "all" operating systems. Apart from Windows, the primary non-standard code covers these termios related constants: I_IUCLC, O_OLCUC, O_OFILL, O_OFDEL, O_NLDLY, O_CRDLY and L_XCASE. A few of them are documented as LEGACY as they were removed from POSIX https://pubs.opengroup.org/onlinepubs/007904875/basedefs/termios.h.html over two decades ago. The other constants are part of the X/Open System Interfaces, which supposedly should be available when _XOPEN_UNIX is set to another value than -1. However on Linux they exist, yet the variable indicating their presence is undefined. In summary; It is hard to find any feature specific preprocessor variables indicating availability, but it is quite safe to limit their inclusion to Linux until patches arrive for other platforms. Executing `cpp -dM </dev/null | grep -i linux` on contemporary glibc and musl based distributions tend to give a few constants, where __linux__ likely is the one most suitable. Based on the previous state of the code, the following constants are expected to be available also on Apple: O_BSDLY, O_VTDLY and O_FFDLY. They do not appear be documented in termios(4) on macOS 13, but they actually exist in /Library/Developer/…/sys/termios.h. Lastly, O_TABDLY is kept excluded exclusively for NetBSD as that is the only currently supported platform lacking it. | ||||
* | feat(terminal): also accept codepoint integers for width check | Thijs Schreijer | 2025-02-10 | 1 | -15/+32 |
| | | | | | Lua utf8 functions return codepoints, hence it makes sense to accept those, instead of having to convert to utf8 string and back again. | ||||
* | fix(terminal): warning unused variable | Thijs | 2025-02-06 | 1 | -1/+1 |
| | |||||
* | fix(terminal): failing NetBSD compilation, missing symbols | Thijs Schreijer | 2025-02-06 | 1 | -5/+9 |
| | | | | fixes #43 | ||||
* | Re-add FreeBSD support (broken since c1a64c1) (#33) | Thijs Schreijer | 2024-08-28 | 1 | -3/+16 |
| | | | | Co-authored-by: cos <cos> | ||||
* | chore(term): add descriptive error on Windows for lack of VT (#32) | Thijs Schreijer | 2024-07-31 | 1 | -0/+5 |
| | |||||
* | fix(term): headers on yet another MinGW version (#30) | Thijs Schreijer | 2024-07-11 | 1 | -1/+2 |
| | |||||
* | fix(*): msys2 requires conio.h header | Thijs | 2024-06-25 | 1 | -3/+4 |
| | |||||
* | add system.CODEPAGE_UTF8 for 65001 codepage | Thijs Schreijer | 2024-06-19 | 1 | -2/+2 |
| | |||||
* | switch termsize results to standard; rows, cols | Thijs Schreijer | 2024-06-08 | 1 | -3/+3 |
| | |||||
* | fix docs, merging modules | Thijs | 2024-06-03 | 1 | -1/+4 |
| | |||||
* | cleanup and documentation | Thijs Schreijer | 2024-05-23 | 1 | -6/+13 |
| | |||||
* | Windows fixes, some manual tests | Thijs | 2024-05-23 | 1 | -4/+8 |
| | |||||
* | fix several tests | Thijs Schreijer | 2024-05-23 | 1 | -18/+11 |
| | |||||
* | fix windows (manual) tests | Thijs | 2024-05-22 | 1 | -13/+10 |
| | |||||
* | fix | Thijs Schreijer | 2024-05-22 | 1 | -0/+11 |
| | |||||
* | drop debug line | Thijs Schreijer | 2024-05-22 | 1 | -1/+0 |
| | |||||
* | implement getconsoleflags tests | Thijs | 2024-05-20 | 1 | -2/+8 |
| | |||||
* | add example for reading a line from the terminal, non-blocking | Thijs Schreijer | 2024-05-20 | 1 | -17/+313 |
| | | | | Handles utf8, and character width | ||||
* | chore(keypressed): remove function keypressed | Thijs Schreijer | 2024-05-07 | 1 | -28/+0 |
| | | | | easier to handle this on the Lua side | ||||
* | fix(readkey): add proper error handling | Thijs Schreijer | 2024-05-07 | 1 | -4/+25 |
| | |||||
* | switch "has" to "has_all_of" and "has_any_of" | Thijs Schreijer | 2024-05-04 | 1 | -3/+3 |
| | |||||
* | feat(term): getting/setting terminal config flags | Thijs | 2024-04-30 | 1 | -5/+817 |
| | |||||
* | feat(tty): add isatty() | Thijs | 2023-11-15 | 1 | -0/+37 |