aboutsummaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Release v0.5.1HEADv0.5.1masterThijs Schreijer3 days1-1/+1
|
* fix(random): on old glibc < 2.25, falback to /dev/urandomThijs Schreijer3 days1-4/+9
|
* Release v0.5.0v0.5.0Thijs Schreijer13 days1-1/+1
|
* refactor(term): feature check, not platform checkThijs Schreijer13 days1-28/+43
|
* Add support for OpenBSD+FreeBSD platformscos2025-02-251-0/+25
|
* Reverse conditional compilation of non-POSIXcos2025-02-252-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* refactor(random): on linux+bsd use api instead of /dev/urandomThijs Schreijer2025-02-101-5/+29
| | | | the api is faster and equally good
* chore(random): replace deprecated Windows APIThijs Schreijer2025-02-101-15/+4
|
* feat(terminal): also accept codepoint integers for width checkThijs Schreijer2025-02-101-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 variableThijs2025-02-061-1/+1
|
* fix(terminal): failing NetBSD compilation, missing symbolsThijs Schreijer2025-02-061-5/+9
| | | | fixes #43
* Release v0.4.5v0.4.5Hisham Muhammad2024-12-181-1/+1
|
* fix: suppress -Wexpansion-to-defined warningHisham Muhammad2024-12-181-1/+5
| | | | See https://stackoverflow.com/questions/42074035/how-to-deal-with-clangs-3-9-wexpansion-to-defined-warning
* fix: do not rely on luaconf.h to include limits.hHisham Muhammad2024-12-181-1/+1
| | | | Fixes #38.
* Release v0.4.4 (#37)v0.4.4Thijs Schreijer2024-09-031-1/+1
|
* fix(makefile): include all objects (#36)Thijs Schreijer2024-09-031-1/+1
|
* Release v0.4.3 (#34)v0.4.3Thijs Schreijer2024-08-281-1/+1
|
* Re-add FreeBSD support (broken since c1a64c1) (#33)Thijs Schreijer2024-08-281-3/+16
| | | | Co-authored-by: cos <cos>
* chore(term): add descriptive error on Windows for lack of VT (#32)Thijs Schreijer2024-07-311-0/+5
|
* Release v0.4.2 (#31)v0.4.2Thijs Schreijer2024-07-111-1/+1
|
* fix(term): headers on yet another MinGW version (#30)Thijs Schreijer2024-07-112-1/+3
|
* Release v0.4.1v0.4.1Thijs2024-06-251-1/+1
|
* fix(*): msys2 requires conio.h headerThijs2024-06-251-3/+4
|
* Release v0.4.0 (#24)v0.4.0Thijs Schreijer2024-06-201-1/+4
|
* add system.CODEPAGE_UTF8 for 65001 codepageThijs Schreijer2024-06-191-2/+2
|
* switch termsize results to standard; rows, colsThijs Schreijer2024-06-081-3/+3
|
* fix docs, merging modulesThijs2024-06-034-4/+20
|
* cleanup and documentationThijs Schreijer2024-05-231-6/+13
|
* Windows fixes, some manual testsThijs2024-05-233-4/+25
|
* fix several testsThijs Schreijer2024-05-233-18/+46
|
* fix windows (manual) testsThijs2024-05-221-13/+10
|
* fixThijs Schreijer2024-05-221-0/+11
|
* drop debug lineThijs Schreijer2024-05-221-1/+0
|
* implement getconsoleflags testsThijs2024-05-201-2/+8
|
* add example for reading a line from the terminal, non-blockingThijs Schreijer2024-05-203-17/+619
| | | | Handles utf8, and character width
* chore(keypressed): remove function keypressedThijs Schreijer2024-05-071-28/+0
| | | | easier to handle this on the Lua side
* fix(readkey): add proper error handlingThijs Schreijer2024-05-071-4/+25
|
* switch "has" to "has_all_of" and "has_any_of"Thijs Schreijer2024-05-042-20/+44
|
* review: bitflags no comparison, extra testsThijs Schreijer2024-04-301-25/+10
|
* feat(term): getting/setting terminal config flagsThijs2024-04-305-5/+1086
|
* chore(config): update editorconfig (#20)Thijs Schreijer2024-03-211-10/+10
| | | | Lua was duplicated and C was missing. Updated the 1 C file that deviated in whitespace as well.
* Release v0.3.0 (#11)v0.3.0Thijs Schreijer2023-12-161-1/+1
|
* fix(mingw): fix the windows build with MinGW (#10)Thijs Schreijer2023-12-151-4/+10
|
* feat(tty): add isatty()Thijs2023-11-153-1/+40
|
* feat(*): add environment variable and random functionsThijs Schreijer2023-11-156-31/+391
|
* Release v0.2.1v0.2.1Oscar Lim2016-10-021-1/+1
|
* Fix `clock_gettime` for Mac OS X 10.12Oscar Lim2016-09-281-1/+9
|
* Fix macOS 10.12 having `clock_gettime`Adam Grandquist2016-07-231-0/+2
| | | See https://github.com/Homebrew/homebrew-core/issues/1957 for similar issues.
* Release v0.2.0v0.2.0Oscar Lim2016-05-081-1/+1
|
* Support for monotimeOscar Lim2016-05-083-8/+124
| | | | Provide `monotime` function with at least 1 millisecond resolution.