1
0
mirror of https://github.com/janet-lang/janet synced 2026-03-14 03:39:49 +00:00
Commit Graph

70 Commits

Author SHA1 Message Date
Calvin Rose
883dde4fa5 Remove xprintf reference. 2026-01-22 20:14:46 -06:00
Calvin Rose
6111291ede Revert a number of minor, unneeded changes for persistent REPL history. 2026-01-22 20:13:49 -06:00
Calvin Rose
53b8bf2684 Disable persistent REPL history without JANET_HISTFILE. 2026-01-22 19:17:16 -06:00
Calvin Rose
0c402cf3d6 Add persistent repl history. 2026-01-22 19:17:16 -06:00
Michael Camilleri
6e4b0b9259 Update year in copyright disclaimer to 2026 2026-01-02 14:14:53 +09:00
Calvin Rose
7f9d92a73b Formatting 2025-12-13 06:00:16 -06:00
Noam Preil
04c96296b5 drop fixme, can worry about it later 2025-12-12 02:54:07 +00:00
Noam Preil
98bbe9f474 expose os/isatty, fix floating point math 2025-12-10 23:35:24 +00:00
Noam Preil
2f69678f2f 9front port 2025-12-10 12:18:17 +00:00
Tw
6e883b8972 shell: Prevent buggy moving zero column behavior
According to https://unix.stackexchange.com/a/559331,
moving zero column is implemented inconsistently between
different terminal emulators.

In order to fix this inconsistency,
we avoid using this escape sequence entirely.

Signed-off-by: Tw <tw19881113@gmail.com>
Change-Id: I73d4252f8472c769f0cf98b6bbdf2b3d6a6a6964
2025-12-04 08:51:15 +08:00
Michael Camilleri
4b5a2a14c0 Update year in copyright disclaimer to 2025 2025-03-04 11:24:09 +09:00
Calvin Rose
3894f4021a Update copyright date. 2024-09-29 16:07:24 -05:00
Calvin Rose
33f55dc32f Go back to ReadDirectoryChangesExW since it is better. 2024-08-18 05:29:08 -07:00
Naqua Darazaki
ae6b359109 Add ctrl + left/right arrow support to the REPL
Ctrl + left/right arrow would simply input "5D"/"5C" into the REPL
which was useless and confusing

With this change, it instead goes to the previous/next word which is
usually expected in readline-like interfaces
2024-07-03 14:17:57 +02:00
Andriamanitra
83204dc293 Change Alt-f in the REPL move to next end of word instead of beginning 2023-10-14 14:21:16 +03:00
Calvin Rose
9a2897e741 Run through astyle with manual corrections 2023-06-08 13:01:49 -05:00
Calvin Rose
7acb5c63e0 Remove bad windows10 check. 2023-05-29 18:17:22 -05:00
Calvin Rose
696efcb9e2 Add header file. 2023-04-30 12:19:55 -05:00
Calvin Rose
6e9cde8ac1 Add feature check for windows version shell.c
Tried to get console working on windows 7 and below
2023-04-30 10:36:42 -05:00
Calvin Rose
67c474fc7a More fixes to ev/gather (tested on httpf server). 2023-02-05 10:21:37 -06:00
Calvin Rose
f8ddea6452 Add msys2 testing with github actions. 2023-01-22 11:05:27 -06:00
bakpakin
93b469885a Initial Mingw support with Makefile.
Also add a macro JANET_MSVC to distinguish between
a windows build (JANET_WINDOWS) and a build with msvc.
2023-01-21 10:37:34 -06:00
Calvin Rose
a0f40042cb Update copyright year. 2023-01-07 15:03:35 -06:00
Calvin Rose
1900d8f843 Fix build warnings on Linux GCC version 12.1.0 x64 2022-07-20 08:04:03 -05:00
bakpakin
6a92e8b609 Update CHANGELOG and make tweaks to win32 shell 2022-07-09 11:39:06 -05:00
bakpakin
9da91a8217 Update shell.c to have smart behavior on windows. 2022-07-09 11:23:02 -05:00
Calvin Rose
3715d7a184 Auto update copyright date. 2022-03-21 18:22:59 -05:00
paulsnar
06f2e81dd5 shell: Handle EINTR on long reads
Many system I/O operations can fail due to being interrupted by a
signal. In the REPL's case, this poses a problem because in most cases
it's assumed that a read error is not recoverable and is equivalent to
EOF. This, however, is not the case for EINTR, in which case the I/O
should be tried again.

This commit fixes the most egregious violations of this, notably the
line getters, which would otherwise make the REPL exit on any signal,
even if the signal was caught and processed outside the REPL's purview.
2022-02-04 02:31:40 +02:00
Calvin Rose
6f7e81067c Address #876 Don't allow scheduling a fiber once it has been canceled already.
We were effectively cancelling the cancellation.
2021-11-18 20:06:29 -06:00
Calvin Rose
af946f398e Turn off raw mode in shell on ctrl-C. 2021-11-18 19:58:52 -06:00
Andrew Chambers
2ef49a92cc Use kill instead of raise for SIGINT.
Raise signals can only be handled by the current thread while
kill signals can be handled by background threads.
2021-11-15 20:38:23 +13:00
Andrew Chambers
5d75effb37 Allow C code to block SIGINT.
Previously the repl always exits on SIGINT, this change
means the repl will only exit on SIGINT if the SIGINT handler
causes it to exit.
2021-11-12 23:24:33 +13:00
Calvin Rose
55b8563c08 Add janet_loop_fiber C function to run a fiber to completion from C.
This is mainly meant for use as the entry point to a C wrapper for a
janet program. This maeans the programmer doesn't need to use an ifdef
to handle if the event loop is enabled.
2021-07-18 09:39:37 -05:00
Calvin Rose
bbae43f259 Update copyright dates. 2021-05-31 13:46:02 -05:00
Andrew Chambers
f4c9064b79 Add config support for custom allocators. 2021-03-23 23:00:48 +13:00
Calvin Rose
f22472a644 Begin work on allowing small binaries. 2021-01-23 17:08:11 -06:00
Calvin Rose
27b1f59aa9 Change Ctrl-C and move old behavior to Ctrl-Q
This lets Janet be a better unix citizen and lets Ctrl-C
raise an interrupt. Trying to make Janet behave superficially
like a shell by overriding Ctrl-C is not helpful.
2020-12-29 16:20:37 -06:00
Calvin Rose
aa0de01e5f Fix some formatting and undefined behavior. 2020-12-06 14:33:08 -06:00
Calvin Rose
785757f2f6 Remove pthreads from shell.c and update bsd build. 2020-12-06 13:51:06 -06:00
Calvin Rose
babfe50550 Merge branch 'master' into ev
Also add poll implementation for ev.
2020-09-07 12:52:50 -05:00
Calvin Rose
e8734c77b4 Fix bug by casting to unsigned char.
Higher unciode codepoints where being read as negative char values.
We need to cast to unsigned char before comparing to 0x20 to check
for unprintable characters.
2020-09-06 10:47:05 -05:00
Calvin Rose
1eb00a9f74 Remove restriction on bytes being input to getline. 2020-09-06 10:36:38 -05:00
Calvin Rose
86e00e865e Merge branch 'master' into ev 2020-08-23 11:25:04 -05:00
Calvin Rose
b1d8ee19ca Enable mutliline paste in shell.c with TCSADRAIN.
Replaces TCSAFLUSH.
2020-08-22 11:39:57 -05:00
Calvin Rose
1213990b7d Merge branch 'master' into ev 2020-08-07 19:51:37 -05:00
Calvin Rose
76cfbde933 Add JANET_HASHSEED environment variable. 2020-08-03 20:56:11 -05:00
Andrew Chambers
4d4ca7bb36 Initialize PRF with random data when it is enabled. 2020-08-04 12:13:36 +12:00
Calvin Rose
a4de83b3a3 Merge branch 'master' into ev 2020-07-05 10:11:23 -05:00
Calvin Rose
c97d3cf359 Fix minimum meson build. 2020-07-03 20:30:09 -05:00
Calvin Rose
4721337c7c issues with gettime on mach kernel. 2020-07-03 20:19:36 -05:00